CN112807695B - Game scene generation method and device, readable storage medium and electronic equipment - Google Patents

Game scene generation method and device, readable storage medium and electronic equipment Download PDF

Info

Publication number
CN112807695B
CN112807695B CN202110209339.2A CN202110209339A CN112807695B CN 112807695 B CN112807695 B CN 112807695B CN 202110209339 A CN202110209339 A CN 202110209339A CN 112807695 B CN112807695 B CN 112807695B
Authority
CN
China
Prior art keywords
game
game scene
model data
model
dynamic model
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110209339.2A
Other languages
Chinese (zh)
Other versions
CN112807695A (en
Inventor
刘振方
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202110209339.2A priority Critical patent/CN112807695B/en
Publication of CN112807695A publication Critical patent/CN112807695A/en
Application granted granted Critical
Publication of CN112807695B publication Critical patent/CN112807695B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/60Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The disclosure relates to a game scene generation method and device, a readable storage medium and electronic equipment, and relates to the technical field of space rendering, wherein the method comprises the following steps: responding to a current game scene generation instruction, and generating a query request of dynamic model data through a first identification of a current game role corresponding to the game client and a second identification of the current game scene; sending the query request of the dynamic model data to a server, and receiving the dynamic model data corresponding to the query request sent by the server; generating a first game model corresponding to the current game scene by using the dynamic model data, the path of the dynamic model data and the attribute information of the dynamic model data; rendering the first game model into the current game scene to generate a target game scene. The present disclosure improves reusability of game scenes.

Description

Game scene generation method and device, readable storage medium and electronic equipment
Technical Field
The embodiment of the invention relates to the technical field of space rendering, in particular to a game scene generation method, a game scene generation device, a readable storage medium and electronic equipment.
Background
In a game, a game scene is a virtual reality world, which is a space where a virtual object of a player is active in the game world, and a rich game scene includes different game models.
In order to provide a realistic game scene for a player, in the prior art, a game model in the game scene is designed and arranged in the game scene by a scene designer in a scene editing stage, a corresponding configuration file is derived after the design is completed, the configuration file is configured at a client of the player, and when the player enters the game scene, the configuration file is read, so that the game scene is loaded.
However, loading the game scene by using the configuration file can result in low reusability of the game scene, different game scenes need to generate different configuration files, and then the configuration files are downloaded to the client of the player, so that the process is complex and the online repair of the game scene is not facilitated.
Accordingly, it is desirable to provide a new game scene generation method.
It should be noted that the information of the present invention in the above background section is only for enhancing the understanding of the background of the present invention and thus may include information that does not form the prior art that is already known to those of ordinary skill in the art.
Disclosure of Invention
The present invention aims to provide a game scene generation method, a game scene generation device, a readable storage medium and an electronic device, which further overcome at least to some extent the problem of low game scene reusability caused by the limitations and disadvantages of the related art.
According to an aspect of the present disclosure, there is provided a game scene generation method, which is applied to a game client, the game scene generation method including:
Responding to a current game scene generation instruction, and generating a query request of dynamic model data through a first identification of a current game role corresponding to the game client and a second identification of the current game scene;
sending the query request of the dynamic model data to a server, and receiving the dynamic model data corresponding to the query request sent by the server;
generating a first game model corresponding to the current game scene by using the dynamic model data, the path of the dynamic model data and the attribute information of the dynamic model data;
Rendering the first game model into the current game scene to generate a target game scene.
In an exemplary embodiment of the present disclosure, in response to the current game scene generation instruction, the game scene generation method further includes:
And acquiring configuration information corresponding to the current game scene according to the second identifier, generating a second game model by using model information included in the configuration information, and rendering the second game model into the current game scene, wherein the second game model is a static model in the current game scene.
In one exemplary embodiment of the present disclosure, generating a first game model corresponding to the current game scene using the dynamic model data, a path of the dynamic model data, and attribute information of the dynamic model data, includes:
Performing deserialization on the dynamic model data corresponding to the query request sent by the server to obtain dynamic model data corresponding to the current game scene;
the dynamic model data corresponding to the current game scene are put into a queue, and the dynamic model data corresponding to the loading number is obtained according to the preset loading number;
And generating one or more first game models corresponding to the current game scene according to the acquired dynamic model data, the paths of the acquired dynamic model data and the attribute information.
In an exemplary embodiment of the present disclosure, generating a first game model corresponding to the current game scene according to the acquired dynamic model data, a path of the acquired dynamic model data, and attribute information, includes:
And the acquired model generation interface takes the acquired dynamic model data, the path of the acquired dynamic model data and the attribute information as parameters, and transmits the parameters into the model generation interface to generate one or more first game models corresponding to the current game scene.
In one exemplary embodiment of the present disclosure, rendering the first game model into the current game scene includes:
Generating a rendering model corresponding to the first game model according to the unique identification, the position and the orientation of the first game model;
and rendering the one or more first game models into the current game scene through dynamic batch by utilizing the rendering models.
In one exemplary embodiment of the present disclosure, rendering the first game model into the current game scene by dynamic pooling using the rendering model includes:
transforming vertex information included in a first game model into world space when the current game scene contains any one of the first game models with the same materials;
and drawing an open graphic library on the vertex information converted into world space based on a rendering model corresponding to the first game model, so that a plurality of game models identical to any one of the first game models are generated in the current game scene.
In an exemplary embodiment of the present disclosure, after rendering the first game model into the current game scene to generate a target game scene, the game scene generation method further includes:
editing a game model included in the target game scene to obtain a first target game scene;
Acquiring first model data corresponding to the first target game scene, and comparing the first model data with model data corresponding to the target game scene to obtain changed model data;
and serializing the changed model data and sending the serialized model data to the server to finish updating the changed model data.
According to an aspect of the present disclosure, there is provided a game scene generation apparatus, which is applied to a game client, the game scene generation apparatus including:
the dynamic model data query module is used for responding to the current game scene generation instruction and generating a query request of dynamic model data through a first identifier of a current game role corresponding to the game client and a second identifier of the current game scene;
the dynamic model data acquisition module is used for sending the query request of the dynamic model data to a server and receiving the dynamic model data corresponding to the query request sent by the server;
A game model generating module, configured to generate a first game model corresponding to the current game scene by using the dynamic model data, a path of the dynamic model data, and attribute information of the dynamic model data;
And the game model rendering module is used for rendering the first game model into the current game scene so as to generate a target game scene.
According to one aspect of the present disclosure, there is provided a readable storage medium having stored thereon a computer program, characterized in that the computer program, when executed by a processor, implements the game scene generation method.
According to an aspect of the present disclosure, there is provided an electronic apparatus, including:
A processor; and
A memory for storing executable instructions of the processor;
wherein the processor is configured to perform the game scene generation method via execution of the executable instructions.
In the game scene generation method provided by the embodiment of the invention, on one hand, in response to a current game scene generation instruction, a query request of dynamic model data is generated through a first identifier of a current game role corresponding to the game client and a second identifier of the current game scene; sending the query request of the dynamic model data to a server, and receiving the dynamic model data corresponding to the query request sent by the server; generating a first game model corresponding to the current game scene by using the dynamic model data, the path of the dynamic model data and the attribute information of the dynamic model data; rendering the first game model into the current game scene to generate a target game scene, wherein dynamic model data corresponding to the current game scene is obtained according to a first identifier of a current user and a second identifier of the current game scene, the first game model corresponding to the current game scene is generated according to the dynamic model data, and the first game model is rendered into the current game scene to generate the target game scene, so that the reusability of the game scene is improved; on the other hand, as the first game model is generated according to the acquired dynamic model data, the configuration file does not need to be generated in advance and then is loaded to the game client, and the efficiency of generating the game scene is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention as claimed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention. It is evident that the drawings in the following description are only some embodiments of the present invention and that other drawings may be obtained from these drawings without inventive effort for a person of ordinary skill in the art.
Fig. 1 schematically shows a flow chart of a game scene generation method according to an exemplary embodiment of the invention.
Fig. 2 schematically shows a block diagram of a game scene generation system according to an exemplary embodiment of the invention.
Fig. 3 schematically shows a flow chart of a method of generating a first game model corresponding to a current game scenario according to an exemplary embodiment of the invention.
FIG. 4 schematically illustrates a flow chart of a method of rendering a first game model to a current game scene according to an example embodiment of the invention.
FIG. 5 schematically illustrates a flow chart of a method of rendering a first game model on a current game scene by dynamic pooling according to an example embodiment of the invention.
Fig. 6 schematically shows a flowchart of a scene generation method after generating a target game scene according to an exemplary embodiment of the invention.
Fig. 7 schematically shows a block diagram of a game scene generation apparatus according to an exemplary embodiment of the present invention.
Fig. 8 schematically shows an electronic device for implementing the above-described game scene generation method according to an exemplary embodiment of the present invention.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments may be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the invention. One skilled in the relevant art will recognize, however, that the invention may be practiced without one or more of the specific details, or with other methods, components, devices, steps, etc. In other instances, well-known aspects have not been shown or described in detail to avoid obscuring aspects of the invention.
Furthermore, the drawings are merely schematic illustrations of the present invention and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus a repetitive description thereof will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software or in one or more hardware modules or integrated circuits or in different networks and/or processor devices and/or microcontroller devices.
One rich game scenario includes a variety of game models, such as houses, trees, waters, etc., which are designed by a scene designer and arranged in a game scenario in a scene editing stage, and after the scene design is completed, configuration files corresponding to the game scenario are exported, and downloaded to a user's game client as the game is updated, and when the user enters the game scenario, the game engine loads and reads the configuration files of the game scenario, thereby rendering different game models in the game scenario.
However, the manner in which the game scene is loaded by using the configuration file has the following disadvantages: on one hand, the position, the size and the direction of the game model included in the scene are fixed, and dynamic adjustment is difficult to carry out, so that the expansibility of the game scene is not high; on the other hand, different game scenes require a designer to design and generate different configuration files, and finally the configuration files are downloaded to a game client of a user, so that the process is complex and is not beneficial to on-line repair, and the reusability of the game scenes is low.
Based on one or more of the above problems, in this exemplary embodiment, there is provided a game scenario generation method, which may be executed on a device terminal, where the device terminal may include a PC end, a mobile end, and the like; of course, those skilled in the art may also operate the method of the present invention on other platforms as required, and this is not a particular limitation in the present exemplary embodiment. Referring to fig. 1, the game scene generation method may include the steps of:
S110, responding to a current game scene generation instruction, and generating a query request of dynamic model data through a first identifier of a current game role corresponding to the game client and a second identifier of the current game scene;
s120, sending a query request of the dynamic model data to a server, and receiving dynamic model data corresponding to the query request sent by the server;
s130, generating a first game model corresponding to the current game scene by using the dynamic model data, the path of the dynamic model data and attribute information of the dynamic model data;
and S140, rendering the first game model into the current game scene to generate a target game scene.
In the game scene generation method, on one hand, in response to a current game scene generation instruction, a query request of dynamic model data is generated through a first identifier of a current game role corresponding to the game client and a second identifier of the current game scene; sending the query request of the dynamic model data to a server, and receiving the dynamic model data corresponding to the query request sent by the server; generating a first game model corresponding to the current game scene by using the dynamic model data, the path of the dynamic model data and the attribute information of the dynamic model data; rendering the first game model into the current game scene to generate a target game scene, wherein dynamic model data corresponding to the current game scene is obtained according to a first identifier of a current user and a second identifier of the current game scene, the first game model corresponding to the current game scene is generated according to the dynamic model data, and the first game model is rendered into the current game scene to generate the target game scene, so that the reusability of the game scene is improved; on the other hand, as the first game model is generated according to the acquired dynamic model data, the configuration file does not need to be generated in advance and then is loaded to the game client, and the efficiency of generating the game scene is improved.
Hereinafter, each step involved in the game scene generation method of the exemplary embodiment of the present disclosure is explained and explained in detail.
First, an application scenario and an object of the exemplary embodiment of the present disclosure are explained and explained.
Specifically, the exemplary embodiments of the present disclosure may be used for a game client of a user, when the user enters a game scene, a dynamic game model of the game scene is generated, and the user may modify the game model included in a target game scene at the game client to improve the expandability of the game scene.
According to the embodiment of the invention, the dynamic model data sent by the server side is taken as the basis, the game client side of the user performs deserialization on the dynamic model data sent by the server side to obtain the dynamic model data corresponding to the current game scene where the user is located, and the dynamic game model is generated based on the dynamic model data, so that the reusability of the game scene is improved. The specific reasons are as follows: on one hand, request information of dynamic model data is generated according to the unique identification of a user and the unique identification of a game client where the user is located, the dynamic model data sent by a server is obtained according to the request information, a dynamic game model corresponding to a current fixed game scene is generated by utilizing the dynamic model data, the dynamic game model is rendered in the current game scene, a target game scene is obtained, and the reusability and the generation efficiency of the game scene are improved; on the other hand, the user can change the size, the position and the direction of the game model included in the target game scene based on the game client, so that the expansibility of the game scene is improved.
Next, explanation and explanation are made of a game scene generation system involved in an exemplary embodiment of the present disclosure. Referring to fig. 2, the game scene generation system may include: model editing module 210, model management module 220, data communication module 230, and data storage module 240. Wherein. The model editing module 210 is configured to provide a visual operation interface, in which a game model included in a fixed game scene generated based on a configuration file can be destroyed, moved, resized, oriented, etc., and a new game model can be created through the interface, and for a user, a scene model can be customized through the model editing module, and for a designer designing a game scene, the game scene can be rapidly designed through the model editing module; the model management module 220 is in network connection with the model editing module 210, and is configured to generate a model according to model data by calling an interface corresponding to the game engine when the model is generated, modify model data of the changed game model when the game model of the user game client is changed, and delete the game model by calling an interface corresponding to the game engine when the game model is deleted from the user game client; the data communication module 230 is in network connection with the model management module 220, and is used for sending the model data of the changed game model to the server, notifying each user in the game scene through broadcasting after the server receives the changed model data so as to update the game scene, and sending the model data acquired from the server to the game client when the game client inquires the model data; the data storage module 240 is connected to the data communication module 230 in a network manner, and is used for updating the changed model data.
Hereinafter, the steps S110 to S140 will be explained and described in detail with reference to fig. 2.
In step S110, in response to the current game scene generation instruction, a query request of dynamic model data is generated by a first identification of a current game character corresponding to the game client and a second identification of the current game scene.
The method comprises the steps that when a user enters a game, the game client responds to the current game scene of the user, a data table stored in the game client is inquired according to the unique identification of the current game scene, whether the current game scene needs to generate a dynamic model is judged, and when the current game scene needs to generate the dynamic game model, a certain game scene is possibly exclusive to a certain user, so that an inquiry request of dynamic model data can be generated through a first identification of the user and a second identification of the current game scene of the user.
In this example embodiment, in response to the current game scene generation instruction, the game scene generation method further includes:
And acquiring configuration information corresponding to the current game scene according to the second identifier, generating a second game model by using model information included in the configuration information, and rendering the second game model into the current game scene, wherein the second game model is a static model in the current game scene.
Specifically, the generating instructions of the current game scene include generating a dynamic game model instruction and generating a static game model instruction, when the current game scene where the user is located needs to generate a static game model, a fixed game scene needs to be loaded according to a configuration file, the fixed game scene is designed in advance by a scene designer, and a configuration file is generated according to the designed game scene, the configuration file is placed in a game client of the user and is loaded together with the game scene, and belongs to a game model with unchanged attribute, and specifically, loading the game scene according to the configuration file may include: firstly, acquiring a configuration file corresponding to a current game scene according to a second identification of the current game scene where a user is located, reading configuration information included in the configuration file, generating a second game model corresponding to the current game scene, namely a static game model, by utilizing the configuration information, and rendering the fixed game model in the current game scene through a rendering model, wherein the life cycle of the fixed game model is consistent with that of the game scene.
In step S120, the query request of the dynamic model data is sent to a server, and the dynamic model data corresponding to the dynamic query request sent by the server is received.
The game client sends a query request of dynamic model data generated according to the unique identifier of the user and the unique identifier of the current game scene where the user is located to the server, the server queries in a data table stored in the server according to the query request to obtain dynamic model data corresponding to the unique identifier of the user and the unique identifier of the current game scene, sequences the obtained dynamic model data, and sends the serialized dynamic model data to the game client through the data communication module 230.
In step S130, a first game model corresponding to the current game scene is generated using the dynamic model data, the path of the dynamic model data, and the attribute information of the dynamic model data.
The dynamic model data is serialized dynamic model data, the path of the dynamic model data is the position of the dynamic model data in a data table stored in the server, and the attribute information of the dynamic model data is the attribute information of the position, the size, the orientation and the like of the dynamic game model corresponding to the dynamic model data.
In the present exemplary embodiment, referring to fig. 3, a first game model corresponding to the current game scene is generated using the dynamic model data, the path of the dynamic model data, and attribute information of the dynamic model data, including steps S310-S330:
In step S310, deserializing the dynamic model data corresponding to the query request sent by the server to obtain dynamic model data corresponding to the current game scene;
in step S320, the dynamic model data corresponding to the current game scene is put into a queue, and the dynamic model data corresponding to the loading number is obtained according to the preset loading number;
in step S330, one or more first game models corresponding to the current game scene are generated according to the acquired dynamic model data, the path of the acquired dynamic model data, and the attribute information.
Step S310 to step S330 will be explained and explained below. Specifically, the game client performs deserialization on the received serialized dynamic model data to obtain dynamic model data of a data structure corresponding to the current game scene, in this example, the dynamic model data corresponding to different game scenes are different, so that the number of generated game models is different, in order to avoid instantaneously generating a large number of game models, the dynamic model data obtained by deserialization may be put into a queue, and then time-sharing processing is adopted, and the method specifically includes: and adding the dynamic model data obtained by deserialization into a queue, acquiring dynamic model data corresponding to the loading number from the queue according to the loading number preset during time-sharing processing, and generating one or more first game models corresponding to the loading number according to the acquired dynamic model data, the paths of the dynamic model data and the attribute information.
For example, when the number of loads preset in the time-sharing process is 3, firstly, after the game client obtains the deserialized dynamic model data, the deserialized dynamic model data can be put into the queue, 3 dynamic model data are sequentially obtained from the queue according to the preset number of loads, 3 first game models are generated according to the 3 dynamic model data, the paths of the dynamic model data and the attribute information, and after the 3 dynamic model data are processed, 3 dynamic model data can be obtained from the queue again, and the processing is performed again until the number of the dynamic model data in the queue is 0. By adopting time sharing processing, the situation that a large number of game models are created in the same time period to cause the game client of the user to be blocked is avoided, and the game experience of the user is improved.
In this example embodiment, further, generating a first game model corresponding to the current game scene according to the acquired dynamic model data, the path of the acquired dynamic model data, and the attribute information may include:
And the acquired model generation interface takes the acquired dynamic model data, the path of the acquired dynamic model data and the attribute information as parameters, and transmits the parameters into the model generation interface to generate one or more first game models corresponding to the current game scene.
Specifically, the model generation interface provided by the game engine included in the model management module 220 is first obtained, and the dynamic model data, the path of the dynamic model data, and the attribute information are transmitted as parameters to the model generation interface provided by the game engine, so as to generate one or more first game models. The game engine may be Unity 3D, a fantasy engine, or CRY ENGINE c, which is not specifically limited in this exemplary embodiment.
In step S140, the first game model is rendered into the current game scene to generate a target game scene.
In this example embodiment, referring to fig. 4, rendering the first game model into the current game scene may include step S410 and step S420:
in step S410, a rendering model corresponding to the first game model is generated according to the unique identifier, the position and the orientation of the first game model;
In step S420, the one or more first game models are rendered into the current game scene by dynamic pooling using the rendering models.
Hereinafter, step S410 and step S420 will be explained and explained. Specifically, before the dynamic game model is displayed on the game client, a model for rendering is first generated, the generated rendering model is placed outside the visual range of the game client, the rendering model corresponding to the first game model can be generated according to the unique identification of the first game model, the position and the orientation of the first game model on the game client, and after the rendering model is obtained, the rendering model can be utilized to render the first game model in the current game scene. Wherein, during rendering, a dynamic batch-mixing technology can be adopted to carry out batch-mixing treatment on game models with the same material; the material of the game model is essentially a data set, comprising a mapping texture, an illumination algorithm and the like, and is used for providing data and the illumination algorithm for a renderer; the game models with the same material are game models with the same texture map; referring to fig. 5, rendering the first game model in the current game scene by dynamic pooling using the rendering model may include step S510 and step S520:
in step S510, when the current game scene includes any one of the plurality of first game models with the same material, vertex information included in the first game model is transformed into world space;
In step S520, the vertex information converted into world space is drawn into an open graphic library based on the rendering model corresponding to the first game model, so that a plurality of game models identical to any one of the first game models are generated in the current game scene.
Hereinafter, step S510 and step S520 will be explained and explained. Specifically, firstly, a data table stored in a game client is queried, whether any first game model with the same material as one or more generated first game models is contained in a current game scene is judged, when any first game model with the same material is contained in the current game scene, vertex information contained in any first game model is transformed into world space, and based on a rendering model, one Draw call (a process of preparing data by a CPU and notifying a GPU each time is called one Draw call) is performed on the vertex information transformed into the world space, namely, a plurality of game models corresponding to any first game model are rendered through OpenGL (open graphics library). By dynamic batch processing, batch rendering can be performed on game models with the same material, and the rendering efficiency of the game client is greatly improved.
In this example embodiment, referring to fig. 6, after the first game model is rendered into the current game scene to generate a target game scene, the game scene generation method further includes steps S610 to S630:
in step S610, editing a game model included in the target game scene to obtain a first target game scene;
in step S620, first model data corresponding to the first target game scene is acquired, and the first model data is compared with model data corresponding to the target game scene to obtain changed model data;
In step S630, the changed model data is serialized and sent to the server, so as to complete updating of the changed model data.
Step S610 to step S630 are explained and explained below. Specifically, after the target game scene is generated, the user can modify the game model included in the target game scene at the game client through the model editing module 210, so as to obtain that the game model modified by the first target game scene has information such as unique identification, position, orientation, scaling and the like in the game scene; when the game model included in the target game scene is changed, the model data corresponding to the game model is changed, so that first model data corresponding to the game model included in the first target game scene can be obtained, and the first model data is compared with the model data corresponding to the target game scene to obtain the changed data of the game model; and serializing the data of the changed game model, and sending the serialized data of the changed game model to the server. By transmitting the changed data, the network transmission flow is reduced, and the data transmission efficiency is improved.
The server receives the serialized changed game model data sent by the game client, deserializes the data, and verifies the deserialized data, wherein the verification content comprises: the unique identification of the game model, the position and other information in the game scene, after verifying the data, can update the data table stored by the server according to the changed data of the game model. By checking the data at the server, the updating efficiency of the game model included in the game client is improved. Before updating the data table, the server may also send the changed data to the game client with the displayed game scene as the target game scene in a remote process communication manner, so that the game client may update the target game scene according to the received data.
The game scene generation method and the game scene generation system provided by the example embodiments of the present disclosure have at least the following advantages: generating a dynamic model data request according to the unique identifier of the user and the unique identifier of the current game scene where the user is located, sending the request to a server, receiving dynamic model data sent by the server, generating a game model according to the dynamic model data, and rendering the game model in the current game scene, thereby improving the reusability of the game scene; after the target game scene is obtained, the game model included in the target game scene can be modified, so that the expansibility and the robustness of the game scene are improved.
The exemplary embodiment of the present invention also provides a game scene generating apparatus, referring to fig. 7, which may include: a dynamic model data query module 710, a dynamic model data acquisition module 720, a game model generation module 730, and a game model rendering module 740. Wherein:
A dynamic model data query module 710, configured to generate, in response to a current game scenario generation instruction, a query request for dynamic model data through a first identifier of a current game character corresponding to the game client and a second identifier of the current game scenario;
the dynamic model data obtaining module 720 is configured to send a query request of the dynamic model data to a server, and receive dynamic model data corresponding to the query request sent by the server;
a game model generating module 730, configured to generate a first game model corresponding to the current game scene using the dynamic model data, the path of the dynamic model data, and attribute information of the dynamic model data;
The game model rendering module 740 is configured to render the first game model into the current game scene to generate a target game scene.
The specific details of each module in the above game scene generating device are described in detail in the corresponding game scene generating method, so that the details are not repeated here.
In an exemplary embodiment of the present disclosure, in response to the current game scene generation instruction, the game scene generation method further includes:
And acquiring configuration information corresponding to the current game scene according to the second identifier, generating a second game model by using model information included in the configuration information, and rendering the second game model into the current game scene, wherein the second game model is a static model in the current game scene.
In one exemplary embodiment of the present disclosure, generating a first game model corresponding to the current game scene using the dynamic model data, a path of the dynamic model data, and attribute information of the dynamic model data, includes:
Performing deserialization on the dynamic model data corresponding to the query request sent by the server to obtain dynamic model data corresponding to the current game scene;
the dynamic model data corresponding to the current game scene are put into a queue, and the dynamic model data corresponding to the loading number is obtained according to the preset loading number;
And generating one or more first game models corresponding to the current game scene according to the acquired dynamic model data, the paths of the acquired dynamic model data and the attribute information.
In an exemplary embodiment of the present disclosure, generating a first game model corresponding to the current game scene according to the acquired dynamic model data, a path of the acquired dynamic model data, and attribute information, includes:
And the acquired model generation interface takes the acquired dynamic model data, the path of the acquired dynamic model data and the attribute information as parameters, and transmits the parameters into the model generation interface to generate one or more first game models corresponding to the current game scene.
In one exemplary embodiment of the present disclosure, rendering the first game model into the current game scene includes:
Generating a rendering model corresponding to the first game model according to the unique identification, the position and the orientation of the first game model;
and rendering the one or more first game models into the current game scene through dynamic batch by utilizing the rendering models.
In one exemplary embodiment of the present disclosure, rendering the first game model into the current game scene by dynamic pooling using the rendering model includes:
transforming vertex information included in a first game model into world space when the current game scene contains any one of the first game models with the same materials;
and drawing an open graphic library on the vertex information converted into world space based on a rendering model corresponding to the first game model, so that a plurality of game models identical to any one of the first game models are generated in the current game scene.
In an exemplary embodiment of the present disclosure, after rendering the first game model into the current game scene to generate a target game scene, the game scene generation method further includes:
editing a game model included in the target game scene to obtain a first target game scene;
Acquiring first model data corresponding to the first target game scene, and comparing the first model data with model data corresponding to the target game scene to obtain changed model data;
and serializing the changed model data and sending the serialized model data to the server to finish updating the changed model data.
It should be noted that although in the above detailed description several modules or units of a device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functions of two or more modules or units described above may be embodied in one module or unit in accordance with embodiments of the invention. Conversely, the features and functions of one module or unit described above may be further divided into a plurality of modules or units to be embodied.
Furthermore, although the steps of the methods of the present invention are depicted in the accompanying drawings in a particular order, this is not required to or suggested that the steps must be performed in this particular order or that all of the steps shown be performed in order to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step to perform, and/or one step decomposed into multiple steps to perform, etc.
In an exemplary embodiment of the present invention, an electronic device capable of implementing the above method is also provided.
Those skilled in the art will appreciate that the various aspects of the invention may be implemented as a system, method, or program product. Accordingly, aspects of the invention may be embodied in the following forms, namely: an entirely hardware embodiment, an entirely software embodiment (including firmware, micro-code, etc.) or an embodiment combining hardware and software aspects may be referred to herein as a "circuit," module "or" system.
An electronic device 800 according to such an embodiment of the invention is described below with reference to fig. 8. The electronic device 800 shown in fig. 8 is merely an example and should not be construed as limiting the functionality and scope of use of embodiments of the present invention.
As shown in fig. 8, the electronic device 800 is embodied in the form of a general purpose computing device. Components of electronic device 800 may include, but are not limited to: the at least one processing unit 810, the at least one storage unit 820, a bus 830 connecting the different system components (including the storage unit 820 and the processing unit 810), and a display unit 840.
Wherein the storage unit stores program code that is executable by the processing unit 810 such that the processing unit 810 performs steps according to various exemplary embodiments of the present invention described in the above section of the "exemplary method" of the present specification. For example, the processing unit 810 may perform step S110 as shown in fig. 1: responding to a current game scene generation instruction, and generating a query request of dynamic model data through a first identification of a current game role corresponding to the game client and a second identification of the current game scene; s120: sending the query request of the dynamic model data to a server, and receiving the dynamic model data corresponding to the query request sent by the server; s130: generating a first game model corresponding to the current game scene by using the dynamic model data, the path of the dynamic model data and the attribute information of the dynamic model data; s140: rendering the first game model into the current game scene to generate a target game scene.
The storage unit 820 may include readable media in the form of volatile storage units, such as Random Access Memory (RAM) 8201 and/or cache memory 8202, and may further include Read Only Memory (ROM) 8203.
Storage unit 820 may also include a program/utility 8204 having a set (at least one) of program modules 8205, such program modules 8205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
Bus 830 may be one or more of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 800 may also communicate with one or more external devices 900 (e.g., keyboard, pointing device, bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 800, and/or any device (e.g., router, modem, etc.) that enables the electronic device 800 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 850. Also, electronic device 800 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet, through network adapter 860. As shown, network adapter 860 communicates with other modules of electronic device 800 over bus 830. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with electronic device 800, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or may be implemented in software in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present invention may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, and includes several instructions to cause a computing device (may be a personal computer, a server, a terminal device, or a network device, etc.) to perform the method according to the embodiments of the present invention.
In an exemplary embodiment of the present invention, a computer-readable storage medium having stored thereon a program product capable of implementing the method described above in the present specification is also provided. In some possible embodiments, the various aspects of the invention may also be implemented in the form of a program product comprising program code for causing a terminal device to carry out the steps according to the various exemplary embodiments of the invention as described in the "exemplary methods" section of this specification, when said program product is run on the terminal device.
A program product for implementing the above-described method according to an embodiment of the present invention may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
Furthermore, the above-described drawings are only schematic illustrations of processes included in the method according to the exemplary embodiment of the present invention, and are not intended to be limiting. It will be readily appreciated that the processes shown in the above figures do not indicate or limit the temporal order of these processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, for example, among a plurality of modules.
Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. This application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the application pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.

Claims (9)

1. A game scene generation method, applied to a game client, comprising:
Responding to a current game scene generation instruction, and generating a query request of dynamic model data through a first identification of a current game role corresponding to the game client and a second identification of the current game scene;
sending the query request of the dynamic model data to a server, and receiving the dynamic model data corresponding to the query request sent by the server;
generating a first game model corresponding to the current game scene by using the dynamic model data, the path of the dynamic model data and the attribute information of the dynamic model data;
Rendering the first game model into the current game scene to generate a target game scene; wherein the rendering the first game model into the current game scene comprises: generating a rendering model corresponding to the first game model according to the unique identification, the position and the orientation of the first game model; and rendering one or more first game models into the current game scene through dynamic batch by utilizing the rendering models.
2. The game scene generation method according to claim 1, wherein in response to a current game scene generation instruction, the game scene generation method further comprises:
And acquiring configuration information corresponding to the current game scene according to the second identifier, generating a second game model by using model information included in the configuration information, and rendering the second game model into the current game scene, wherein the second game model is a static model in the current game scene.
3. The game scene generation method according to claim 2, wherein generating a first game model corresponding to the current game scene using the dynamic model data, a path of the dynamic model data, and attribute information of the dynamic model data, comprises:
Performing deserialization on the dynamic model data corresponding to the query request sent by the server to obtain dynamic model data corresponding to the current game scene;
the dynamic model data corresponding to the current game scene are put into a queue, and the dynamic model data corresponding to the loading number is obtained according to the preset loading number;
And generating one or more first game models corresponding to the current game scene according to the acquired dynamic model data, the paths of the acquired dynamic model data and the attribute information.
4. The game scene generation method according to claim 3, wherein generating a first game model corresponding to the current game scene based on the acquired dynamic model data, the path of the acquired dynamic model data, and attribute information, comprises:
And the acquired model generation interface takes the acquired dynamic model data, the path of the acquired dynamic model data and the attribute information as parameters, and transmits the parameters into the model generation interface to generate one or more first game models corresponding to the current game scene.
5. The game scene generation method according to claim 1, wherein rendering the first game model in the current game scene by dynamic pooling using the rendering model comprises:
transforming vertex information included in a first game model into world space when the current game scene contains any one of the first game models with the same materials;
and drawing an open graphic library on the vertex information converted into world space based on a rendering model corresponding to the first game model, so that a plurality of game models identical to any one of the first game models are generated in the current game scene.
6. The game scene generation method according to claim 1, wherein after rendering the first game model into the current game scene to generate a target game scene, the game scene generation method further comprises:
editing a game model included in the target game scene to obtain a first target game scene;
Acquiring first model data corresponding to the first target game scene, and comparing the first model data with model data corresponding to the target game scene to obtain changed model data;
and serializing the changed model data and sending the serialized model data to the server to finish updating the changed model data.
7. A game scene generation apparatus, characterized by being applied to a game client, comprising:
the dynamic model data query module is used for responding to the current game scene generation instruction and generating a query request of dynamic model data through a first identifier of a current game role corresponding to the game client and a second identifier of the current game scene;
the dynamic model data acquisition module is used for sending the query request of the dynamic model data to a server and receiving the dynamic model data corresponding to the query request sent by the server;
A game model generating module, configured to generate a first game model corresponding to the current game scene by using the dynamic model data, a path of the dynamic model data, and attribute information of the dynamic model data;
the game model rendering module is used for rendering the first game model into the current game scene so as to generate a target game scene; wherein the rendering the first game model into the current game scene comprises: generating a rendering model corresponding to the first game model according to the unique identification, the position and the orientation of the first game model; and rendering one or more first game models into the current game scene through dynamic batch by utilizing the rendering models.
8. A readable storage medium having stored thereon a computer program, wherein the computer program, when executed by a processor, implements the game scenario generation method of any one of claims 1-6.
9. An electronic device, comprising:
A processor; and
A memory for storing executable instructions of the processor;
Wherein the processor is configured to perform the game scenario generation method of any one of claims 1-6 via execution of the executable instructions.
CN202110209339.2A 2021-02-24 2021-02-24 Game scene generation method and device, readable storage medium and electronic equipment Active CN112807695B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110209339.2A CN112807695B (en) 2021-02-24 2021-02-24 Game scene generation method and device, readable storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110209339.2A CN112807695B (en) 2021-02-24 2021-02-24 Game scene generation method and device, readable storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN112807695A CN112807695A (en) 2021-05-18
CN112807695B true CN112807695B (en) 2024-05-28

Family

ID=75865384

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110209339.2A Active CN112807695B (en) 2021-02-24 2021-02-24 Game scene generation method and device, readable storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN112807695B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113856202A (en) * 2021-10-11 2021-12-31 北京字跳网络技术有限公司 Game data editing method, device, editor, readable medium and equipment
CN116208623B (en) * 2023-05-04 2023-07-14 腾讯科技(深圳)有限公司 Information synchronization method, device, engine server and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105631925A (en) * 2015-12-29 2016-06-01 北京航天测控技术有限公司 Three-dimensional scene generation method based on OSG three-dimensional rendering engine preprocessing and device thereof
CN106215420A (en) * 2016-07-11 2016-12-14 北京英雄互娱科技股份有限公司 For the method and apparatus creating scene of game
CN108499103A (en) * 2018-04-16 2018-09-07 网易(杭州)网络有限公司 The display methods and device of situation elements
CN109771943A (en) * 2019-01-04 2019-05-21 网易(杭州)网络有限公司 A kind of building method and device of scene of game
CN111260767A (en) * 2020-02-19 2020-06-09 网易(杭州)网络有限公司 Rendering method in game, rendering device, electronic equipment and readable storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111598976B (en) * 2019-02-01 2023-08-22 华为技术有限公司 Scene recognition method and device, terminal and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105631925A (en) * 2015-12-29 2016-06-01 北京航天测控技术有限公司 Three-dimensional scene generation method based on OSG three-dimensional rendering engine preprocessing and device thereof
CN106215420A (en) * 2016-07-11 2016-12-14 北京英雄互娱科技股份有限公司 For the method and apparatus creating scene of game
CN108499103A (en) * 2018-04-16 2018-09-07 网易(杭州)网络有限公司 The display methods and device of situation elements
CN109771943A (en) * 2019-01-04 2019-05-21 网易(杭州)网络有限公司 A kind of building method and device of scene of game
CN111260767A (en) * 2020-02-19 2020-06-09 网易(杭州)网络有限公司 Rendering method in game, rendering device, electronic equipment and readable storage medium

Also Published As

Publication number Publication date
CN112807695A (en) 2021-05-18

Similar Documents

Publication Publication Date Title
CN108010112B (en) Animation processing method, device and storage medium
CN107393013B (en) Virtual roaming file generation and display method, device, medium, equipment and system
CN112807695B (en) Game scene generation method and device, readable storage medium and electronic equipment
WO2021146930A1 (en) Display processing method, display processing apparatus, electronic device and storage medium
CN109671147B (en) Texture map generation method and device based on three-dimensional model
CN111722885B (en) Program running method and device and electronic equipment
CN109766319B (en) Compression task processing method and device, storage medium and electronic equipment
CN111026439B (en) Application program compatibility method, device, equipment and computer storage medium
CN113168312A (en) Method for generating binding between C/C + + library and interpreted language, and executing the method to convert three-dimensional (3D) model
CN116028025A (en) Method, device, equipment and medium for generating automobile service model frame
CN112700541B (en) Model updating method, device, equipment and computer readable storage medium
CN116721007B (en) Task control method, system and device, electronic equipment and storage medium
CN110047030B (en) Periodic special effect generation method and device, electronic equipment and storage medium
CN115129460A (en) Method and device for acquiring operator hardware time, computer equipment and storage medium
CN110288523B (en) Image generation method and device
CN113694518B (en) Freezing effect processing method and device, storage medium and electronic equipment
CN113805854A (en) Method, system and device for realizing Hook of application layer based on Linux system and storage medium
CN109800024B (en) Method and device for realizing physical hardware control program release and physical hardware control
CN112612427A (en) Vehicle stop data processing method and device, storage medium and terminal
US20240033625A1 (en) Rendering method and apparatus for virtual scene, electronic device, computer-readable storage medium, and computer program product
CN109934909B (en) Method and device for reconstructing 3D model, electronic equipment and storage medium
CN113590224B (en) Method and device for detecting server, electronic equipment and storage medium
KR100692210B1 (en) Method for rendering objects in game engine and recordable media recording programs for enabling the method
CN117635775A (en) Model special effect realization method and device, computer storage medium and electronic equipment
CN115828015A (en) Data processing method, device, server and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant