CN112807695A - 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
CN112807695A
CN112807695A CN202110209339.2A CN202110209339A CN112807695A CN 112807695 A CN112807695 A CN 112807695A CN 202110209339 A CN202110209339 A CN 202110209339A CN 112807695 A CN112807695 A CN 112807695A
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.)
Granted
Application number
CN202110209339.2A
Other languages
Chinese (zh)
Other versions
CN112807695B (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

Images

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 identifier of a current game role corresponding to the game client and a second identifier of the current game scene; sending a query request of the dynamic model data to a server, and receiving the dynamic model data which is sent by the server and corresponds to the query request; 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 the reusability of game scenarios.

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 the game, the game scene is a virtual reality, and is a space in which a virtual object of a player moves in the game world, and a rich game scene comprises different game models.
In order to provide a realistic game scene for a player, in the prior art, game models in the game scene are designed and arranged in the game scene by a scene designer at a scene editing stage, a corresponding configuration file is exported 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, the game scenes loaded by the configuration files have low reusability, different configuration files need to be generated in different game scenes and then downloaded to the client of the player, and the process is complex and is not favorable for online repair of the game scenes.
Therefore, it is necessary to provide a new game scene generation method.
It is to be noted that the information invented in the above background section is only for enhancing the understanding of the background of the present invention, and therefore, may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
The invention aims to provide a game scene generation method, a game scene generation device, a readable storage medium and an electronic device, and further solves the problem of low reusability of game scenes due to the limitations and defects of the related art at least to a certain extent.
According to one aspect of the present disclosure, a game scene generating method is provided, which is applied to a game client, and the game scene generating method includes:
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;
sending a query request of the dynamic model data to a server, and receiving the dynamic model data which is sent by the server and corresponds to the query request;
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 a current game scenario generation instruction, the game scenario 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 to the current game scene, wherein the second game model is a static model in the current game scene.
In an exemplary embodiment of the present disclosure, generating a first game model corresponding to the current game scenario using the dynamic model data, a path of the dynamic model data, and attribute information of the dynamic model data includes:
deserializing the dynamic model data corresponding to the query request sent by the server to obtain the dynamic model data corresponding to the current game scene;
putting the dynamic model data corresponding to the current game scene into a queue, and acquiring the dynamic model data corresponding to the loading number 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 path 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 acquiring a model generation interface, transmitting the acquired dynamic model data, the path of the acquired dynamic model data and attribute information into the model generation interface as parameters, and generating one or more first game models corresponding to the current game scene.
In an 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;
rendering, by the rendering model, the one or more first game models into the current game scene by dynamic batching.
In an exemplary embodiment of the present disclosure, rendering the first game model into the current game scene by dynamic batching using the rendering model includes:
when the current game scene comprises any one of a plurality of first game models with the same material, converting vertex information included in the first game model into a world space;
and drawing an open graphics library on the vertex information transformed into the 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;
serializing the changed model data, and sending the serialized changed model data to the server to complete updating of the changed model data.
According to one aspect of the present disclosure, there is provided a game scene generating apparatus applied to a game client, the game scene generating apparatus including:
the dynamic model data query module is used for 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;
the dynamic model data acquisition module is used for sending a query request of the dynamic model data to a server and receiving the dynamic model data which is sent by the server and corresponds to the query request;
the game model generation module is used for 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;
and the game model rendering module is used for rendering the first game model to the current game scene so as to generate a target game scene.
According to an 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 of any one of claims 1 to 7.
According to an aspect of the present disclosure, there is provided an electronic apparatus, 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-7 via execution of the executable instructions.
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 a game client and a second identifier of the current game scene; sending a query request of the dynamic model data to a server, and receiving the dynamic model data which is sent by the server and corresponds to the query request; 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; the first game model is rendered into the current game scene to generate a target game scene, dynamic model data corresponding to the current game scene are obtained according to the first identification of the current user and the second identification of the current game scene, the first game model corresponding to the current game scene is generated according to the dynamic model data, the first game model is rendered into the current game scene to generate the target game scene, and the reusability of the game scene is improved; on the other hand, the first game model is generated according to the acquired dynamic model data, so that a configuration file does not need to be generated in advance and then 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 obvious that the drawings in the following description are only some embodiments of the invention, and that for a person skilled in the art, other drawings can be derived from them without inventive effort.
Fig. 1 schematically shows a flowchart of a game scene generation method according to an exemplary embodiment of the present invention.
Fig. 2 schematically shows a block diagram of a game scene generation system according to an exemplary embodiment of the present invention.
FIG. 3 schematically illustrates a flow diagram 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 exemplary embodiment of the present invention.
FIG. 5 schematically illustrates a flow diagram of a method for rendering a first game model in a current game scene through dynamic pooling, according to an exemplary embodiment of the present 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 present invention.
Fig. 7 schematically shows a block diagram of a game scene generating apparatus according to an exemplary embodiment of the present invention.
Fig. 8 schematically illustrates 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. Example embodiments may, however, be embodied in many different 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 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 provide 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, and so forth. In other instances, well-known technical solutions have not been shown or described in detail to avoid obscuring aspects of the invention.
Furthermore, the drawings are merely schematic illustrations of the invention and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repetitive description 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 the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
A rich game scene comprises various game models, such as houses, trees, water areas and the like, wherein the game models are designed and arranged in the game scene by a scene designer in a scene editing stage, configuration files corresponding to the game scene are exported after the scene design is completed, the configuration files are downloaded to a game client of a user along with the updating of a game, and when the user enters the game scene, the configuration files of the game scene are loaded and read by a game engine, so that different game models are rendered in the game scene.
However, the method of loading game scenes by using configuration files has the following disadvantages: on one hand, the position, size and direction of the game model included in the scene are fixed and not changed, 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 need a designer to design and generate different configuration files, and finally the configuration files are downloaded to the game client of the user, so that the process is complex and is not beneficial to online repair, and the reusability of the game scenes is low.
In view of one or more of the above problems, the present exemplary embodiment first provides a game scene generation method, which may be executed in a device terminal, where the device terminal may include a PC terminal, a mobile terminal, and the like; of course, those skilled in the art may also operate the method of the present invention on other platforms as needed, and this is not particularly limited in this exemplary embodiment. Referring to fig. 1, the game scene generating method may include the steps of:
step 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 side, and receiving the dynamic model data which is sent by the server side and corresponds to the query request;
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;
and S140, rendering the first game model to the current game scene to generate a target game scene.
On one hand, in the game scene generation method, 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 a query request of the dynamic model data to a server, and receiving the dynamic model data which is sent by the server and corresponds to the query request; 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; the first game model is rendered into the current game scene to generate a target game scene, dynamic model data corresponding to the current game scene are obtained according to the first identification of the current user and the second identification of the current game scene, the first game model corresponding to the current game scene is generated according to the dynamic model data, the first game model is rendered into the current game scene to generate the target game scene, and the reusability of the game scene is improved; on the other hand, the first game model is generated according to the acquired dynamic model data, so that a configuration file does not need to be generated in advance and then 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 embodiment of the present disclosure may be used in 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 change the game model included in the target game scene at the game client to improve the extensibility of the game scene.
According to the embodiment of the invention, based on the dynamic model data sent by the server, the game client of the user carries out deserialization on the dynamic model data sent by the server 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 the user and the unique identification of the game client side where the user is located, the dynamic model data sent by the server side is obtained according to the request information, a dynamic game model corresponding to the 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, and the expansibility of the game scene is improved.
Next, the game scene generation system related to the exemplary embodiment of the present disclosure is explained and explained. Referring to fig. 2, the game scene generation system may include: a model editing module 210, a model management module 220, a data communication module 230, and a data storage module 240. Wherein. The model editing module 210 is configured to provide a visual operation interface, where a game model included in a fixed game scene generated based on a configuration file may be destroyed, moved, resized, oriented, and the like in the visual operation interface, and a new game model may be created through the interface, for a user, a scene model may be customized through the model editing module, and for a designer who designs a game scene, a game scene may be quickly designed through the model editing module; the model management module 220 is connected with the model editing module 210 through a network, and is used for generating a model according to model data by calling an interface corresponding to a game engine when the model is generated, modifying the model data of the changed game model when the game model of the user game client is changed, and deleting the game model by calling the interface corresponding to the game engine when the game model is deleted by the user game client; the data communication module 230 is connected to the model management module 220 through a network, and is configured to send the model data of the changed game model to the server, notify each user in the game scene through broadcasting after the server receives the changed model data, so as to update the game scene, and send the model data obtained from the server to the game client when the game client queries the model data; and a data storage module 240, which is connected with the data communication module 230 through a network, and is used for updating the changed model data.
Hereinafter, steps S110 to S140 will be explained and explained in detail with reference to fig. 2.
In step S110, 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 character corresponding to the game client and a second identifier of the current game scene.
Specifically, when a user enters a game, the game client responds to the current game scene of the user, and queries a data table stored in the game client according to a unique identifier of the current game scene to judge whether the current game scene needs to generate a dynamic model, and when the current game scene needs to generate the dynamic model, because a certain game scene may be exclusive to a certain user, a query request of dynamic model data can be generated through a first identifier of the user and a second identifier of the current game scene where the user is located.
In this example embodiment, in response to the current game scenario generation instruction, the game scenario 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 to the current game scene, wherein the second game model is a static model in the current game scene.
Specifically, the instruction for generating the current game scene includes an instruction for generating a dynamic game model and an instruction for generating a static game model, when the current game scene where the user is located needs to generate the 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 the configuration file is generated according to the designed game scene, and the configuration file is placed in a game client of the user, is loaded together with the game scene, belongs to a game model whose attribute does not change, and specifically, the loading of the game scene according to the configuration file may include: firstly, a configuration file corresponding to a current game scene is obtained according to a second identification of the current game scene where a user is located, configuration information included in the configuration file is read, a second game model corresponding to the current game scene, namely a static game model, is generated by utilizing the configuration information, and the fixed game model is rendered 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 identification of the user and the unique identification 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 the dynamic model data corresponding to the unique identification of the user and the unique identification of the current game scene, serializes 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, generating a first game model corresponding to the current game scenario by using the dynamic model data, the path of the dynamic model data, and the attribute information of the dynamic model data includes steps S310 to S330:
in step S310, deserializing the dynamic model data corresponding to the query request sent by the server to obtain the dynamic model data corresponding to the current game scene;
in step S320, putting the dynamic model data corresponding to the current game scene into a queue, and obtaining the dynamic model data corresponding to the loading number according to a 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.
Steps S310 to S330 will be explained and explained below. Specifically, the game client performs deserialization on the received serialized dynamic model data to obtain the dynamic model data of the data structure corresponding to the current game scene, in this example, the dynamic model data corresponding to different game scenes are different, which further results in different numbers of generated game models, so as to avoid generating a large number of game models instantaneously, the dynamic model data obtained through deserialization may be put into a queue, and then time-sharing processing is adopted, which specifically includes: adding the dynamic model data obtained through deserialization into a queue, acquiring the 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 path of the dynamic model data and the attribute information.
For example, when the preset number of loads is 3 in the time-sharing process, first, after the game client obtains the deserialized dynamic model data, the deserialized dynamic model data may be placed in a queue, 3 pieces of dynamic model data are sequentially obtained from the queue according to the preset number of loads, 3 pieces of first game models are generated according to the 3 pieces of dynamic model data, paths of the dynamic model data, and attribute information, and after the 3 pieces of dynamic model data are processed, 3 pieces of dynamic model data may 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 phenomenon that a large number of game models are created in the same time period to cause the game client of the user to be jammed 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 acquiring a model generation interface, transmitting the acquired dynamic model data, the path of the acquired dynamic model data and attribute information into the model generation interface as parameters, and generating one or more first game models corresponding to the current game scene.
Specifically, a model generation interface provided by a 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 to generate one or more first game models. The game Engine may be Unity 3D, a ghost Engine, or Cry Engine3, 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 exemplary embodiment, referring to fig. 4, rendering the first game model into the current game scene may include steps S410 and 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 through dynamic batching by using the rendering model.
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 needs to be generated, the generated rendering model is placed outside the visual range of the game client, a rendering model corresponding to the first game model can be generated according to the unique identifier 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 first game model can be rendered in the current game scene by using the rendering model. Wherein, the dynamic batch technology can be adopted to carry out batch processing on the game models with the same material quality during rendering; the game model is made of a data set in essence, comprises a map texture, an illumination algorithm and the like, and is used for providing data and the illumination algorithm for the renderer; the game models with the same material are game models with the same texture maps; referring to fig. 5, using the rendering model to render the first game model in the current game scene through dynamic batching may include steps S510 and S520:
in step S510, when any of a plurality of first game models with the same material is included in the current game scene, transforming vertex information included in the first game model into a world space;
in step S520, the vertex information transformed into the world space is drawn in an open graphics library 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.
Hereinafter, step S510 and step S520 will be explained and explained. Specifically, a data table stored in the game client is first searched to determine whether any first game model having the same material as the generated one or more first game models is included in the current game scene, when any first game model having the same material as the generated one or more first game models is included in the current game scene, vertex information included in any first game model is converted into the world space, and based on the rendering model, Draw call is performed once on the vertex information converted into the world space (a process of preparing data and notifying the CPU each time is called Draw call), that is, a plurality of game models corresponding to any first game model are rendered through OpenGL (open graphics library). Through dynamic batch processing, batch rendering can be performed on game models made of the same materials, and rendering efficiency of game clients is greatly improved.
In this exemplary embodiment, referring to fig. 6, after rendering the first game model 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, obtaining 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;
in step S630, the changed model data is serialized and sent to the server, so as to complete updating of the changed model data.
Hereinafter, steps S610 to S630 will be explained and explained. Specifically, after the target game scene is generated, the user may modify the game model included in the target game scene at the game client through the model editing module 210, so as to obtain information that the modified game model of the first target game scene has a unique identifier, and a position, an orientation, a zoom 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 also changed, so that first model data corresponding to the game model included in the first target game scene can be acquired, 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 data of the changed game model sent by the game client, deserializes the data, and verifies the deserialized data, wherein the verified data comprises: the unique identification of the game model, the position in the game scene and other information can be updated according to the changed data of the game model after the data is verified. By verifying the data at the server, the updating efficiency of the game model included by the game client is improved. Before updating the data table, the server may further send the changed data to the game client, which uses 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 disclosed example embodiment have at least the following advantages: generating a dynamic model data request according to the unique identification of the user and the unique identification of the current game scene where the user is located, sending the request to the server, receiving the 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, so that the reusability of the game scene is improved; after the target game scene is obtained, the game model included in the target game scene can be modified, and the expansibility and the robustness of the game scene are improved.
An exemplary embodiment of the present invention further provides a game scene generating apparatus, which, as shown in fig. 7, 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 respond to a current game scene generation instruction, and generate 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;
a dynamic model data obtaining module 720, configured to send a query request of the dynamic model data to a server, and receive the 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 by using the dynamic model data, the path of the dynamic model data, and the attribute information of the dynamic model data;
a game model rendering module 740, 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 game scene generating device have been described in detail in the corresponding game scene generating method, and therefore are not described herein again.
In an exemplary embodiment of the present disclosure, in response to a current game scenario generation instruction, the game scenario 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 to the current game scene, wherein the second game model is a static model in the current game scene.
In an exemplary embodiment of the present disclosure, generating a first game model corresponding to the current game scenario using the dynamic model data, a path of the dynamic model data, and attribute information of the dynamic model data includes:
deserializing the dynamic model data corresponding to the query request sent by the server to obtain the dynamic model data corresponding to the current game scene;
putting the dynamic model data corresponding to the current game scene into a queue, and acquiring the dynamic model data corresponding to the loading number 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 path 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 acquiring a model generation interface, transmitting the acquired dynamic model data, the path of the acquired dynamic model data and attribute information into the model generation interface as parameters, and generating one or more first game models corresponding to the current game scene.
In an 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;
rendering, by the rendering model, the one or more first game models into the current game scene by dynamic batching.
In an exemplary embodiment of the present disclosure, rendering the first game model into the current game scene by dynamic batching using the rendering model includes:
when the current game scene comprises any one of a plurality of first game models with the same material, converting vertex information included in the first game model into a world space;
and drawing an open graphics library on the vertex information transformed into the 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;
serializing the changed model data, and sending the serialized changed model data to the server to complete updating of the changed model data.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the invention. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Moreover, although the steps of the methods of the present invention are depicted in the drawings in a particular order, this does not require or imply that the steps must be performed in this particular order, or that all of the depicted steps must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions, etc.
In an exemplary embodiment of the present invention, there is also provided an electronic device capable of implementing the above method.
As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or program product. Thus, various aspects of the invention may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
An electronic device 800 according to this embodiment of the invention is described below with reference to fig. 8. The electronic device 800 shown in fig. 8 is only an example and should not bring any limitations to the function and scope of use of the embodiments of the present invention.
As shown in fig. 8, electronic device 800 is in the form of a general purpose computing device. The components of the electronic device 800 may include, but are not limited to: the at least one processing unit 810, the at least one memory unit 820, a bus 830 connecting various system components (including the memory 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 to cause the processing unit 810 to perform steps according to various exemplary embodiments of the present invention as described in the above section "exemplary methods" 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 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 the dynamic model data which is sent by the server and corresponds to the query request; 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 memory units such as a random access memory unit (RAM)8201 and/or a cache memory unit 8202, and may further include a read only memory unit (ROM) 8203.
The 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 of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 830 may be any 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.), with one or more devices that enable a user to interact with the electronic device 800, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 800 to communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interfaces 850. Also, the electronic device 800 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 860. As shown, the network adapter 860 communicates with the other modules of the electronic device 800 via the bus 830. It should be appreciated that although not shown, other hardware and/or software modules may be used in conjunction with the electronic device 800, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiment of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to make a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) execute the method according to the embodiment of the present invention.
In an exemplary embodiment of the present invention, there is also provided a computer-readable storage medium having stored thereon a program product capable of implementing the above-described method of the present specification. In some possible embodiments, aspects of the invention may also be implemented in the form of a program product comprising program code means for causing a terminal device to carry out the steps according to various exemplary embodiments of the invention described in the above section "exemplary methods" of the present description, when said program product is run on the terminal device.
According to the program product for realizing the method, the portable compact disc read only memory (CD-ROM) can be adopted, the program code is included, and the program product can be operated on terminal equipment, such as a personal computer. However, the program product of the present invention is not limited in this regard and, in the present 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. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
A computer readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. 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 for aspects 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 and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, 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., through the internet using an internet service provider).
Furthermore, the above-described figures are merely schematic illustrations of processes involved in methods according to exemplary embodiments of the invention, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.

Claims (10)

1. A game scene generation method is applied to a game client, and comprises the following steps:
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;
sending a query request of the dynamic model data to a server, and receiving the dynamic model data which is sent by the server and corresponds to the query request;
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.
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 to 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 the first game model corresponding to the current game scene using the dynamic model data, the path of the dynamic model data, and the attribute information of the dynamic model data includes:
deserializing the dynamic model data corresponding to the query request sent by the server to obtain the dynamic model data corresponding to the current game scene;
putting the dynamic model data corresponding to the current game scene into a queue, and acquiring the dynamic model data corresponding to the loading number 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 path of the acquired dynamic model data and the attribute information.
4. The game scene generation method according to claim 3, wherein generating the 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 includes:
and acquiring a model generation interface, transmitting the acquired dynamic model data, the path of the acquired dynamic model data and attribute information into the model generation interface as parameters, and generating one or more first game models corresponding to the current game scene.
5. The game scene generation method of claim 4, wherein 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;
rendering, by the rendering model, the one or more first game models into the current game scene by dynamic batching.
6. The game scene generation method of claim 5, wherein rendering the first game model in the current game scene by dynamic batching using the rendering model comprises:
when the current game scene comprises any one of a plurality of first game models with the same material, converting vertex information included in the first game model into a world space;
and drawing an open graphics library on the vertex information transformed into the 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.
7. The game scene generation method according to claim 5, 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;
serializing the changed model data, and sending the serialized changed model data to the server to complete updating of the changed model data.
8. A game scene generation apparatus applied to a game client, the game scene generation apparatus comprising:
the dynamic model data query module is used for 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;
the dynamic model data acquisition module is used for sending a query request of the dynamic model data to a server and receiving the dynamic model data which is sent by the server and corresponds to the query request;
the game model generation module is used for 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;
and the game model rendering module is used for rendering the first game model to the current game scene so as to generate a target game scene.
9. A readable storage medium on which a computer program is stored, the computer program, when executed by a processor, implementing the game scene generation method of any one of claims 1 to 7.
10. 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-7 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 true CN112807695A (en) 2021-05-18
CN112807695B 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)

Cited By (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
CN116208623A (en) * 2023-05-04 2023-06-02 腾讯科技(深圳)有限公司 Information synchronization method, device, engine server and storage medium

Citations (6)

* 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
US20210354037A1 (en) * 2019-02-01 2021-11-18 Huawei Technologies Co., Ltd. Scene recognition method and apparatus, terminal, and storage medium

Patent Citations (6)

* 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
US20210354037A1 (en) * 2019-02-01 2021-11-18 Huawei Technologies Co., Ltd. Scene recognition method and apparatus, terminal, and storage medium
CN111260767A (en) * 2020-02-19 2020-06-09 网易(杭州)网络有限公司 Rendering method in game, rendering device, electronic equipment and readable storage medium

Cited By (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
CN116208623A (en) * 2023-05-04 2023-06-02 腾讯科技(深圳)有限公司 Information synchronization method, device, engine server and storage medium

Also Published As

Publication number Publication date
CN112807695B (en) 2024-05-28

Similar Documents

Publication Publication Date Title
CN107393013B (en) Virtual roaming file generation and display method, device, medium, equipment and system
CN111773709B (en) Scene map generation method and device, computer storage medium and electronic equipment
US20230120253A1 (en) Method and apparatus for generating virtual character, electronic device and readable storage medium
CN109671147B (en) Texture map generation method and device based on three-dimensional model
WO2021146930A1 (en) Display processing method, display processing apparatus, electronic device and storage medium
CN112807695B (en) Game scene generation method and device, readable storage medium and electronic equipment
CN109582317B (en) Method and apparatus for debugging hosted applications
CN110478898B (en) Configuration method and device of virtual scene in game, storage medium and electronic equipment
CN109766319B (en) Compression task processing method and device, storage medium and electronic equipment
CN113453073B (en) Image rendering method and device, electronic equipment and storage medium
CN110781067A (en) Method, device, equipment and storage medium for calculating starting time consumption
US20240144625A1 (en) Data processing method and apparatus, and electronic device and storage medium
CN113268303A (en) Interface element configuration method and device, storage medium and electronic equipment
CN116610881A (en) WebGL browsing interaction method based on low-code software
CN112700541B (en) Model updating method, device, equipment and computer readable storage medium
CN115129460A (en) Method and device for acquiring operator hardware time, computer equipment and storage medium
CN110047030B (en) Periodic special effect generation method and device, electronic equipment and storage medium
CN113436346A (en) Distance measuring method and device in three-dimensional space and storage medium
CN116755823A (en) Virtual exhibition hall loading method, device, equipment, storage medium and program product
CN113694518B (en) Freezing effect processing method and device, storage medium and electronic equipment
CN114092608B (en) Expression processing method and device, computer readable storage medium and electronic equipment
CN113805854A (en) Method, system and device for realizing Hook of application layer based on Linux system and storage medium
CN112612427A (en) Vehicle stop data processing method and device, storage medium and terminal
CN113384893A (en) Data processing method and device and computer readable storage medium
US20230078041A1 (en) Method of displaying animation, electronic device 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
GR01 Patent grant