Game scene data generation method and device, storage medium and computer equipment
By splitting the game scene into modules and specifying style and element constraints, the problem of lack of artistic creativity and aesthetics in scene generation in the existing technology is solved, style control and quality assurance are achieved, and development efficiency is improved.
Patent Information
- Application Number
- CN202310876707.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-17
- Publication Date
- 2025-01-10
AI Technical Summary
The existing game scene generation tool algorithms quickly generate scenes, but lack artistic creativity and aesthetics, making it difficult to control the overall style, resulting in unguaranteed scene quality.
Split the three-dimensional game scene into multiple scene modules, specify the style and element constraints of each module, randomly combine game elements based on style information, generate scene module data, and merge them into a complete scene.
It realizes control and quality assurance of game scene style, while improving development efficiency, through automatic and random game elements combinations.
Smart Images

Figure CN119280792A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of game development technology, and in particular to a method and device for generating game scene data, a storage medium, and a computer device. Background Art
[0002] In the process of building game scenes, in order to reduce the workload of artists, game scenes are currently randomly generated through tool algorithms. Although this solution can quickly generate a large number of scenes, saving manpower and time, it lacks the creativity and aesthetics of artists, so the generated scenes may lack artistic sense. It is impossible to control the overall style of the generated scenes, and it is difficult to guarantee the quality of the scenes. Summary of the invention
[0003] In view of this, the present application provides a method and device for generating game scene data, a storage medium, and a computer device, which can not only control the style of each area in the game scene to ensure the development quality of the game scene, but also automatically and randomly combine game elements while ensuring the style, thereby improving the development efficiency of the game scene.
[0004] According to one aspect of the present application, a method for generating game scene data is provided, the method comprising:
[0005] Determining generation conditions of a three-dimensional game scene, wherein the generation conditions include position information of at least one scene module, at least one style information corresponding to each scene module, and element constraint condition information corresponding to each scene module;
[0006] For any scene module, based on the style information of the scene module, determine the optional game elements corresponding to the scene module, and randomly combine the optional game elements according to the element constraint information of the scene module to determine the game element combination data of the scene module;
[0007] Game scene data of the three-dimensional game scene is generated according to the game element combination data and the position information of each scene module.
[0008] According to another aspect of the present application, a device for generating game scene data is provided, the device comprising:
[0009] A condition determination module, used to determine the generation condition of the three-dimensional game scene, wherein the generation condition includes the position information of at least one scene module, at least one style information corresponding to each scene module, and the element constraint condition information corresponding to each scene module;
[0010] An element combination module is used to determine, for any scene module, the optional game elements corresponding to the scene module based on the style information of the scene module, and to randomly combine the optional game elements according to the element constraint information of the scene module to determine the game element combination data of the scene module;
[0011] The data generation module is used to generate game scene data of the three-dimensional game scene according to the game element combination data and the position information of each scene module.
[0012] According to another aspect of the present application, a storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the above-mentioned method for generating game scene data is implemented.
[0013] According to another aspect of the present application, a computer device is provided, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor implements the above-mentioned method for generating game scene data when executing the program.
[0014] By means of the above technical scheme, the present application provides a method and device for generating game scene data, a storage medium, and a computer device, which can split the work of building a complete three-dimensional game scene into building multiple scene modules, specify one or more styles, element constraint information within the module, and the position of the module in the three-dimensional game scene for each scene module, thereby determining the optional game elements within the module based on the specified module style, and randomly combining the optional game elements under the element constraint conditions to determine the game element combination data of the scene module, and then merging the data based on the position information of each scene module, and finally obtaining the game scene data of the complete three-dimensional game scene. The present application splits the game scene into modules for construction, and specifies style information and element constraint information for each module, which can not only control the style of each area in the game scene and ensure the development quality of the game scene, but also automatically and randomly combine game elements under the premise of ensuring the style, thereby improving the development efficiency of the game scene.
[0015] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0017] Figure 1 A schematic diagram showing a flow chart of a method for generating game scene data provided by an embodiment of the present application;
[0018] Figure 2 A schematic diagram showing a flow chart of another method for generating game scene data provided in an embodiment of the present application;
[0019] Figure 3 A schematic diagram showing a flow chart of another method for generating game scene data provided in an embodiment of the present application;
[0020] Figure 4 A schematic diagram showing the structure of a device for generating game scene data provided by an embodiment of the present application is shown;
[0021] Figure 5 A schematic diagram of the device structure of a computer device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0022] The present application will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict.
[0023] In this embodiment, a method for generating game scene data is provided, such as Figure 1 As shown, the method includes:
[0024] Step 101, determining the generation conditions of the three-dimensional game scene, wherein the generation conditions include position information of at least one scene module, at least one style information corresponding to each scene module, and element constraint condition information corresponding to each scene module.
[0025] When building a three-dimensional game scene, the embodiment of the present application can divide a complete three-dimensional game scene into multiple scene modules, so as to obtain game scene data of a complete three-dimensional game scene by generating scene data corresponding to each scene module respectively.
[0026] In a specific implementation, suppose you want to build a 3D game scene in the style of a modern European city, which includes a street, buildings on both sides, street lights, pedestrians, vehicles and other elements. Then, the scene can be divided into the following 6 scene modules:
[0027] Scene Module 1: Street, including street texture, width, length and other attributes;
[0028] Scene Module 2: The building on the left, including the building’s appearance, height, color, windows and other attributes;
[0029] Scene Module 3: Building on the right, same as above;
[0030] Scene module 4: street lights, including the shape, quantity, location, brightness and other attributes of street lights;
[0031] Scene module 5: pedestrians, including the image, clothing, movements, number and other attributes of pedestrians;
[0032] Scene module 6: Vehicle, including vehicle model, color, speed, quantity and other attributes.
[0033] First, determine the generation conditions of the three-dimensional game scene, including the position information of each scene module, the style information corresponding to each scene module, and the element constraint information corresponding to each scene module. Among them, the position information is used to characterize the position of the scene module in the three-dimensional game scene, the style information is used to characterize the style of the scene module, and the element constraint information is used to constrain the element generation conditions within the scene module.
[0034] Specifically, taking the above-mentioned city-style three-dimensional game scene as an example, the style information of scene module 1 is {modern, European}, and the element constraint information is {street width, street length}, the street width is between 5 meters and 10 meters, the length is between 100 meters and 200 meters, etc.
[0035] Step 102, for any scene module, based on the style information of the scene module, determine the optional game elements corresponding to the scene module, and randomly combine the optional game elements according to the element constraint information of the scene module to determine the game element combination data of the scene module.
[0036] Secondly, the game elements in each scene module are generated respectively. Specifically, for any scene module, first, according to the style information of the scene module, the optional game elements used to generate the scene module are obtained from the preset game elements corresponding to the style information pre-made by the developer. For example, if the style information is a city style, then the pre-made preset game elements of the city style can be obtained as the optional game elements of the scene module. For another example, if the style information is a city style and a desert style, then the pre-made preset game elements of the city style and the preset game elements of the desert style can be obtained as the optional game elements of the scene module. After determining the optional game elements of the scene module, the optional game elements are randomly combined according to the element constraint information, and the game element combination data of the scene module is determined to obtain the random game element combination data within the element constraint range, which can control the overall style of the scene module and ensure the quality of the scene, and can also randomly and automatically combine the game elements to ensure the efficiency of scene development.
[0037] Optionally, the element constraint information includes at least one of element type constraint information, element quantity constraint information, and element position relationship constraint information, the element type constraint information includes a type quantity identifier and / or an element type identifier, and the element quantity constraint information includes a total module element quantity range identifier and / or at least one game element quantity range identifier.
[0038] Among them, the constraints on each scene module may specifically include constraints on one or more of the element types, element quantities, and element position relationships. The element type condition information may specifically constrain the number of types of game elements in the scene module and the specific types of game element types in whole or in part. For example, if the element type condition information only includes a type quantity identifier, then the type quantity identifier is used to constrain the number of types of game elements that should be included in the scene module; for another example, if the element type condition information only includes an element type identifier, then the element type identifier is used to constrain which types of game elements should be included in the scene module; for another example, if the element type condition information includes a type quantity identifier and an element type identifier, then it means that the scene module should contain a corresponding number of game elements, and the game elements should contain game elements corresponding to the element type identifier. The element quantity constraint condition information can constrain the total number range of elements in the scene module and the number range of each type of game element.
[0039] Optionally, step 102 includes: based on the style information of the scene module, determining the preset game elements corresponding to each style information; if the element constraint information includes the element type constraint information, then according to the element type constraint information, determining the optional game elements corresponding to the scene module from the preset game elements corresponding to each style information; if the element constraint information does not include the element type constraint information, then using the preset game elements corresponding to each style information as the optional game elements corresponding to the scene module.
[0040] Among them, the process of determining the optional game elements in step 102 is: first, according to the style information of the scene module, all the preset game elements under the corresponding style are determined, and then it is determined whether the element constraint condition contains the element type constraint condition information. If not, the preset game element is directly used as the optional game element of the scene module. If it is contained, the optional game element that matches the element type constraint condition information is determined in the preset game elements. For example, the element type constraint condition information contains a type quantity identifier and an element type identifier, then the preset game element corresponding to the element type identifier is first obtained as a part of the optional game elements, and then the remaining element type quantity is determined based on the type quantity and the number of element type identifiers, and another part of the optional game elements of the remaining element type quantity is randomly determined in the remaining preset game elements.
[0041] Step 103: Generate game scene data of the three-dimensional game scene according to the game element combination data and the position information of each scene module.
[0042] Finally, after determining the game element combination data of each scene module, the module scene data of the module is obtained based on the game element combination data of each scene module, and then based on the position information of each scene module, the module scene data is combined into game scene data of a complete three-dimensional game scene.
[0043] By applying the technical solution of this embodiment, the work of building a complete three-dimensional game scene can be divided into building multiple scene modules, and one or more styles, element constraint information within the module, and the position of the module in the three-dimensional game scene are specified for each scene module, so as to determine the optional game elements within the module based on the specified module style, and randomly combine the optional game elements under the element constraint conditions to determine the game element combination data of the scene module, and then merge the data based on the position information of each scene module, and finally obtain the game scene data of the complete three-dimensional game scene. This application divides the game scene into modules for construction, and specifies style information and element constraint information for each module, which can not only control the style of each area in the game scene and ensure the development quality of the game scene, but also can automatically and randomly combine game elements under the premise of ensuring the style, thereby improving the development efficiency of the game scene.
[0044] Further, as a refinement and extension of the specific implementation of the above embodiment, in order to fully illustrate the specific implementation process of this embodiment, another method for generating game scene data is provided, such as Figure 2 As shown, the method includes:
[0045] Step 201, determine the generation conditions of the three-dimensional game scene, wherein the generation conditions also include scene layering information corresponding to each of the multiple scene layers of the three-dimensional game scene, and the scene layering information includes at least one scene module information corresponding to the scene layer, at least one style information corresponding to each scene module in the scene layer, and element constraint condition information corresponding to each scene module in the scene layer.
[0046] In this embodiment, the three-dimensional game scene can also be layered and built layer by layer and module by module. Specifically, the scene can be layered based on the perspective relationship, and the layer close to the game virtual camera is used as the front layer, and the layer far away is used as the back layer. Therefore, when loading the game scene, the layer closer to the front needs a more refined model, and the layer closer to the back does not need a too refined model because it is blocked and far away from the camera, which can improve performance.
[0047] Step 202, for each scene module in any scene layer, based on the scene layer and the style information of the scene module, determine the optional game elements corresponding to the scene module, and randomly combine the optional game elements according to the element constraint information of the scene module to determine the game element combination data of the scene module.
[0048] Step 203, generating game scene data of the three-dimensional game scene according to the game element combination data and the position information of each scene module in each scene layer.
[0049] In this embodiment, game element combination data is generated for each scene module in each scene layer. Specifically, for any scene module in any scene layer, first, according to the scene layer in which the scene module is located and the style information of the scene module, the optional game elements used to build the scene module are determined from the preset game elements of different styles and different layers pre-made by the production staff, and the optional game elements are further randomly combined according to the element constraint information of the scene module to obtain the game element combination data of the scene module. After the game element combination data of each scene module in each scene layer is generated, according to the position of the scene module in the scene layer, the game element combination data of each scene module in each scene layer is used to generate the layered scene data of each scene layer, and then according to the relationship between the scene layers, the layered scene data is used to generate the game scene data of the entire three-dimensional game scene.
[0050] Step 204, preload the three-dimensional game scene, determine the game element combination data and position information of each scene module in each scene layer according to the game scene data, and determine the model accuracy of each scene layer based on the perspective relationship between the scene layers.
[0051] Step 205, based on the game element combination data and the position information, the game element model corresponding to each scene module is loaded to the corresponding position with the model accuracy of each scene layer to obtain the three-dimensional game scene.
[0052] In this embodiment, when loading a three-dimensional game scene using game scene data, the perspective relationship between each scene layer, as well as the position information and game element combination data of each scene module in each scene layer are determined based on the game scene data, and the model accuracy of each scene layer is determined based on the perspective relationship between each scene layer, and the model accuracy of the front layer is higher than the model accuracy of the rear layer. Thus, according to the game element model corresponding to the game element combination data of each scene module, the game element model in each scene module on the scene layer is loaded to the corresponding position with the model accuracy corresponding to the scene layer, so as to form a complete three-dimensional game scene. In this three-dimensional game scene, instead of unifying the accuracy of all models, the model accuracy of the front position in the perspective relationship is higher, and the model accuracy of the back position is lower. There is almost no difference in visual effect with the effect of unified model accuracy, but the reduction of the accuracy of some models can reduce the game calculation overhead and improve the game running performance.
[0053] Further, as a refinement and extension of the specific implementation of the above embodiment, in order to fully illustrate the specific implementation process of this embodiment, another method for generating game scene data is provided, such as Figure 3 As shown, the method includes:
[0054] Step 301, determine the generation conditions of the three-dimensional game scene, wherein the generation conditions include position information of at least one scene module, at least one style information corresponding to each scene module, element constraint condition information corresponding to each scene module, and scene atmosphere information corresponding to each scene module.
[0055] Step 302, for any scene module, based on the style information of the scene module, determine the optional game elements corresponding to the scene module, and randomly combine the optional game elements according to the element constraint information of the scene module to determine the game element combination data of the scene module.
[0056] Step 303, based on the scene atmosphere information corresponding to each scene module, determine the atmosphere configuration data of each scene module; generate the game scene data of the three-dimensional game scene according to the game element combination data of each scene module, the position information and the atmosphere configuration data.
[0057] Step 304, preload the three-dimensional game scene, and determine the game element combination data, position information and atmosphere configuration data of each scene module according to the game scene data.
[0058] Step 305, loading the game element model in each scene module according to the game element combination data and the position information, and configuring the atmosphere of each scene module according to the atmosphere configuration data to obtain the three-dimensional game scene.
[0059] In this embodiment, additional game atmosphere effects, such as lighting, fog effects, skybox, etc., can also be added to the three-dimensional game scene. Specifically, scene atmosphere information can be specified for one or more scene modules in the three-dimensional game scene, different scene modules can specify the same or different scene atmosphere information, or the scene atmosphere information can be automatically matched according to the style information of the scene module. Thus, when generating the game scene data of the three-dimensional game scene, the atmosphere configuration data corresponding to the scene atmosphere information of each scene module is first obtained, and then the game scene data of the complete three-dimensional game scene is generated based on the atmosphere configuration data, game element combination data and position information of each scene module. Further, when loading the three-dimensional game scene using the game scene data, the game element combination data, position information and atmosphere configuration data of each scene module are first determined based on the game scene data, and then the game element model in each scene module is loaded using the game element combination data and position information, and finally the atmosphere configuration data is used to configure the atmosphere of each scene module to form a complete three-dimensional game scene with an atmosphere effect.
[0060] It should be noted that the above-mentioned generation conditions may also include both scene layering information and atmosphere information. In this case, in order to avoid conflicts in atmosphere effects, the atmosphere information corresponding to the scene modules at the same position in different scene layers may also be detected to ensure that the atmospheres of the scenes at the same position do not conflict with each other, thereby further improving the quality of the game scenes.
[0061] In another specific implementation, the method for generating game scene data provided in this embodiment can also be applied to a game in which levels are randomly generated. First, a plurality of preset game level modules are produced, and then the preset game level modules are used to randomly generate game levels.
[0062] When making a preset game level module, based on the game type, the types of preset game level modules and the level generation conditions of each type of preset game level modules are determined. The level generation conditions include the style of the element game level module and the level element constraint information. The types of preset game level modules include mazes, rooms, corridors, traps, and enemies. For any type of preset game level module, the optional level elements corresponding to the module are determined based on the style of the module, and based on the level element constraints, the optional level elements are randomly combined multiple times to obtain multiple preset game level modules of the type.
[0063] When generating a target game level, the number of modules of the target game level is determined according to the set difficulty and set length of the target game level, and the module types of the target game level modules are determined according to the type of the target game level; among different types of preset game level modules, optional game level modules that match the module types are obtained, and the occurrence frequency of each module type is randomly generated, and the optional game level modules are combined according to the occurrence frequency of each module type to obtain the target game level.
[0064] First, design some basic scene modules in advance according to the type and style of the game, such as mazes, rooms, corridors, traps, etc.;
[0065] Secondly, according to the difficulty and length of the game, determine the number and scale of the scene modules of the level to be generated. For example, if it is a simple level, a small number of small scene modules can be generated; if it is a complex level, a large number of large scene modules can be generated, etc.;
[0066] Thirdly, according to a preset algorithm or rule, the scene modules are randomly selected and combined to generate game scene data corresponding to each level. For example, the randomness of the scene modules can be achieved by using methods such as probability distribution, genetic algorithm, neural network, etc.
[0067] Finally, based on the game scene data, the game scene is rendered in the game engine, allowing players to enter the game experience.
[0068] Specifically, take an adventure-style random level game as an example:
[0069] The following scene modules are pre-designed: maze (including walls, doors, windows, etc.), room (including furniture, lights, doors, etc.), corridor (including length, width, corners, etc.), trap (including type, location, trigger conditions, etc.), enemy (including image, behavior, sound, etc.);
[0070] Determine the number and size of scene modules for the level to be generated based on the difficulty and length of the game. For example, if it is a simple level, 1-5 scene modules can be generated, and if it is a complex level, 5-10 scene modules can be generated, etc.;
[0071] According to certain algorithms or rules, scene modules are randomly selected and combined to generate game scene data corresponding to each level. For example, probability distribution can be used to determine the frequency and location of each scene module, and genetic algorithms can be used to optimize the connection and fitness between scene modules.
[0072] Based on the game scene data, the game scene is rendered in the game engine, and the player is allowed to enter the game experience. For example, the player may enter a game scene consisting of a maze, corridors, and rooms, encounter various traps and enemies during the exploration process, and try to find an exit or solve a puzzle.
[0073] Further, as Figure 1 The specific implementation of the method, the embodiment of the present application provides a device for generating game scene data, such as Figure 4 As shown, the device comprises:
[0074] A condition determination module, used to determine the generation condition of the three-dimensional game scene, wherein the generation condition includes the position information of at least one scene module, at least one style information corresponding to each scene module, and the element constraint condition information corresponding to each scene module;
[0075] An element combination module is used to determine, for any scene module, the optional game elements corresponding to the scene module based on the style information of the scene module, and to randomly combine the optional game elements according to the element constraint information of the scene module to determine the game element combination data of the scene module;
[0076] The data generation module is used to generate game scene data of the three-dimensional game scene according to the game element combination data and the position information of each scene module.
[0077] Optionally, the element constraint information includes at least one of element type constraint information, element quantity constraint information, and element position relationship constraint information, the element type constraint information includes a type quantity identifier and / or an element type identifier, and the element quantity constraint information includes a total module element quantity range identifier and / or at least one game element quantity range identifier.
[0078] Optionally, the element combination module is further used to:
[0079] Based on the style information of the scene module, determining the preset game elements corresponding to each style information;
[0080] If the element constraint information includes the element type constraint information, then determining the optional game element corresponding to the scene module from the preset game elements corresponding to each style information according to the element type constraint information;
[0081] If the element constraint information does not include the element type constraint information, the preset game elements corresponding to each style information are used as optional game elements corresponding to the scene module.
[0082] Optionally, the generation condition further includes scene layer information corresponding to each of the multiple scene layers of the three-dimensional game scene, wherein the scene layer information includes at least one scene module information corresponding to the scene layer, at least one style information corresponding to each scene module in the scene layer, and element constraint condition information corresponding to each scene module in the scene layer;
[0083] The element combination module is further used to: for each scene module in any scene hierarchy, determine the optional game elements corresponding to the scene module based on the scene hierarchy and the style information of the scene module, and randomly combine the optional game elements according to the element constraint condition information of the scene module to determine the game element combination data of the scene module;
[0084] The data generation module is further used to generate game scene data of the three-dimensional game scene according to the game element combination data and the position information of each scene module in each scene layer.
[0085] Optionally, the device further comprises: a scene loading module, configured to:
[0086] Preloading the three-dimensional game scene, determining the game element combination data and position information of each scene module in each scene layer according to the game scene data, and determining the model accuracy of each scene layer based on the perspective relationship between the scene layers;
[0087] According to the game element combination data and the position information, the game element model corresponding to each scene module is loaded to the corresponding position with the model accuracy of each scene layer to obtain the three-dimensional game scene.
[0088] Optionally, the generation condition further includes scene atmosphere information corresponding to each scene module; the data generation module is further used to:
[0089] Determine atmosphere configuration data of each scene module based on scene atmosphere information corresponding to each scene module;
[0090] Game scene data of the three-dimensional game scene is generated according to the game element combination data of each scene module, the position information and the atmosphere configuration data.
[0091] Optionally, the device further comprises: a scene loading module, configured to:
[0092] Preload the three-dimensional game scene, and determine the game element combination data, position information and atmosphere configuration data of each scene module according to the game scene data;
[0093] The game element models in each scene module are loaded according to the game element combination data and the position information, and the atmosphere of each scene module is configured according to the atmosphere configuration data to obtain the three-dimensional game scene.
[0094] It should be noted that for other corresponding descriptions of the functional units involved in the device for generating game scene data provided in the embodiment of the present application, reference can be made to Figures 1 to 3 The corresponding description in the method will not be repeated here.
[0095] The present application also provides a computer device, which may be a personal computer, a server, a network device, etc. Figure 5 As shown, the computer device includes a bus, a processor, a memory and a communication interface, and may also include an input and output interface and a display device. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store location information. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the steps in each method embodiment are implemented.
[0096] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0097] In one embodiment, a computer-readable storage medium is provided. The computer-readable storage medium may be non-volatile or volatile, and stores a computer program thereon. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0098] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0099] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0100] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0101] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0102] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for generating game scene data, characterized in that: The method comprises: Determining generation conditions of a three-dimensional game scene, wherein the generation conditions include position information of at least one scene module, at least one style information corresponding to each scene module, and element constraint condition information corresponding to each scene module; For any scene module, based on the style information of the scene module, determine the optional game elements corresponding to the scene module, and randomly combine the optional game elements according to the element constraint information of the scene module to determine the game element combination data of the scene module; Game scene data of the three-dimensional game scene is generated according to the game element combination data and the position information of each scene module.
2. The method according to claim 1, characterized in that The element constraint information includes at least one of element type constraint information, element quantity constraint information, and element position relationship condition information. The element type condition information includes a type quantity identifier and / or an element type identifier. The element quantity constraint information includes a total module element quantity range identifier and / or at least one game element quantity range identifier.
3. The method according to claim 2, characterized in that The determining, based on the style information of the scene module, the optional game elements corresponding to the scene module comprises: Based on the style information of the scene module, determining the preset game elements corresponding to each style information; If the element constraint information includes the element type constraint information, then determining the optional game element corresponding to the scene module from the preset game elements corresponding to each style information according to the element type constraint information; If the element constraint information does not include the element type constraint information, the preset game elements corresponding to each style information are used as optional game elements corresponding to the scene module.
4. The method according to any one of claims 1 to 3, characterized in that The generation condition also includes scene layer information corresponding to each of the multiple scene layers of the three-dimensional game scene, wherein the scene layer information includes at least one scene module information corresponding to the scene layer, at least one style information corresponding to each scene module in the scene layer, and element constraint condition information corresponding to each scene module in the scene layer; For any scene module, based on the style information of the scene module, determining the optional game elements corresponding to the scene module, and randomly combining the optional game elements according to the element constraint information of the scene module to determine the game element combination data of the scene module, includes: For each scene module in any scene hierarchy, based on the scene hierarchy and the style information of the scene module, determine the optional game elements corresponding to the scene module, and randomly combine the optional game elements according to the element constraint condition information of the scene module to determine the game element combination data of the scene module; The step of generating game scene data of the three-dimensional game scene according to the game element combination data and the position information of each scene module includes: Game scene data of the three-dimensional game scene is generated according to the game element combination data and the position information of each scene module in each scene layer.
5. The method according to claim 4, characterized in that The method further comprises: Preloading the three-dimensional game scene, determining the game element combination data and position information of each scene module in each scene layer according to the game scene data, and determining the model accuracy of each scene layer based on the perspective relationship between the scene layers; According to the game element combination data and the position information, the game element model corresponding to each scene module is loaded to the corresponding position with the model accuracy of each scene layer to obtain the three-dimensional game scene.
6. The method according to any one of claims 1 to 4, characterized in that The generation conditions also include scene atmosphere information corresponding to each scene module; The step of generating game scene data of the three-dimensional game scene according to the game element combination data of each scene module and the position information includes: Determine atmosphere configuration data of each scene module based on scene atmosphere information corresponding to each scene module; Game scene data of the three-dimensional game scene is generated according to the game element combination data of each scene module, the position information and the atmosphere configuration data.
7. The method according to claim 6, characterized in that The method further comprises: Preload the three-dimensional game scene, and determine the game element combination data, position information and atmosphere configuration data of each scene module according to the game scene data; The game element models in each scene module are loaded according to the game element combination data and the position information, and the atmosphere of each scene module is configured according to the atmosphere configuration data to obtain the three-dimensional game scene.
8. A device for generating game scene data, characterized in that: The device comprises: A condition determination module, used to determine the generation condition of the three-dimensional game scene, wherein the generation condition includes the position information of at least one scene module, at least one style information corresponding to each scene module, and the element constraint condition information corresponding to each scene module; An element combination module is used to determine, for any scene module, the optional game elements corresponding to the scene module based on the style information of the scene module, and to randomly combine the optional game elements according to the element constraint information of the scene module to determine the game element combination data of the scene module; The data generation module is used to generate game scene data of the three-dimensional game scene according to the game element combination data and the position information of each scene module.
9. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
10. A computer device comprising a storage medium, a processor, and a computer program stored in the storage medium and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Game scene generation method and device, electronic equipment, storage medium and program product
CN121446106A