Disclosure of Invention
In view of this, the present application provides a method and an apparatus for generating a game level, a storage medium, and a computer device.
According to an aspect of the present application, there is provided a method for generating a game level, including:
responding to a creating instruction of a game level, and acquiring a level identifier corresponding to the game level;
generating a temporary file corresponding to the game level according to a preset level generation rule corresponding to the level identification, wherein the temporary file comprises the number of floors corresponding to the game level, a target floor level template corresponding to each floor and target floor game elements;
when a challenge instruction for any floor is received, reading a target floor level template and target floor game elements corresponding to the any floor in the temporary file and creating a corresponding floor level.
Specifically, the generating of the temporary file corresponding to the game level specifically includes:
determining the number of floors of the game level and a floor identifier corresponding to each floor according to the preset level generation rule;
and acquiring a target floor level template matched with the floor identification from a preset floor level template library, and generating the temporary file, wherein the target floor level template comprises at least one game room of a specified type.
Specifically, the preset level generation rule includes a designated rule and/or a random rule, where the designated rule specifically includes at least one designated floor and game elements corresponding to each designated floor, the random rule specifically includes at least one group of random floors and game elements corresponding to each group of the random floors, each group of the random floors includes at least two floors, and the game elements corresponding to any group of the random floors are all game elements included in any group of the random floors.
Specifically, when the level generation rule includes the specified rule, the generating of the temporary file corresponding to the game level specifically includes:
and respectively determining game elements in the game rooms in the target floor level template corresponding to each appointed floor according to the game elements corresponding to the appointed floors, and storing the game elements as the temporary files.
Specifically, when the level generation rule includes the random rule, the generating of the temporary file corresponding to the game level specifically includes:
and according to the game elements corresponding to each group of random floors, randomly distributing corresponding game elements to the game rooms in the target floor level targets corresponding to each group of random floors, and storing the game elements as the temporary files so that the distributed game elements are consistent with the game elements corresponding to each group of random floors.
Specifically, when a challenge instruction for any floor is received, reading a target floor level template and a target floor game element corresponding to the any floor in the temporary file and creating a corresponding floor level, specifically including:
and when receiving information that a game role enters a game level, reading the first floor level template and game elements corresponding to game rooms in the first floor level template from the temporary file, and creating a first floor level.
Specifically, the game elements corresponding to any floor at least comprise a transfer door; after the creating the first floor level, the method further comprises:
when the game role successfully challenges the current floor level, opening the collision effect of the transfer door;
when collision data of the game role and the transmission door is received, outputting a level selection interface, wherein the level selection interface at least comprises a challenge option for the next level of the current floor;
and if a selection instruction of the challenge option of the next level of level is received, reading the next level of level template and game elements corresponding to game rooms in the next level of level template from the temporary file, and creating the next level of level.
Specifically, after the first floor level is created, the method further includes:
and when the game role fails to challenge the current floor level, recreating the current floor level based on a re-challenge instruction of the current floor level.
Specifically, the method further comprises:
and when the game role successfully challenges all floor level checkpoints, deleting the temporary file.
According to another aspect of the present application, there is provided a game level generation apparatus including:
the establishment instruction response module is used for responding to the establishment instruction of the game level and acquiring the level identification corresponding to the game level;
the temporary file generation module is used for generating a temporary file corresponding to the game level according to a preset level generation rule corresponding to the level identification, wherein the temporary file comprises the number of floors corresponding to the game level, a target floor level template corresponding to each floor and target floor game elements;
and the level creating module is used for reading the target floor level template and the target floor game elements corresponding to any floor in the temporary file and creating corresponding floor levels when a challenge instruction for any floor is received.
Specifically, the temporary file generation module specifically includes:
the floor identification determining unit is used for determining the number of floors of the game level and the floor identification corresponding to each floor according to the preset level generating rule;
and the temporary file generating unit is used for acquiring a target floor level template matched with the floor identification from a preset floor level template library and generating the temporary file, wherein the target floor level template comprises at least one game room of a specified type.
Specifically, the preset level generation rule includes a designated rule and/or a random rule, where the designated rule specifically includes at least one designated floor and game elements corresponding to each designated floor, the random rule specifically includes at least one group of random floors and game elements corresponding to each group of the random floors, each group of the random floors includes at least two floors, and the game elements corresponding to any group of the random floors are all game elements included in any group of the random floors.
Specifically, the temporary file generating unit specifically includes:
and the first temporary file generating subunit is configured to, when the level generating rule includes the specified rule, respectively determine, according to the game elements corresponding to the specified floors, game elements in the game rooms in the target floor level template corresponding to each specified floor, and store the game elements as the temporary file.
Specifically, the temporary file generating unit specifically includes:
and the second temporary file generating subunit is configured to, when the level generation rule includes the random rule, randomly allocate, according to the game elements corresponding to each group of the random floors, corresponding game elements to game rooms in the destination floor level targets corresponding to each group of the random floors, and store the corresponding game elements as the temporary file, so that the allocated game elements are consistent with the game elements corresponding to each group of the random floors.
Specifically, the level creation module specifically includes:
and the first level creating unit is used for reading the first floor level template and game elements corresponding to game rooms in the first floor level template from the temporary file and creating the first floor level when receiving information that the game role enters the game level.
Specifically, the game elements corresponding to any floor at least comprise a transfer door; the level creation module specifically includes:
the transfer door opening unit is used for opening the collision effect of the transfer door when the game role successfully challenges the current floor level;
a level selection interface output unit, configured to output a level selection interface when collision data of the game character with the transfer gate is received, where the level selection interface at least includes a challenge option for a level next to the current floor;
and the second level creating unit is used for reading the next level template and game elements corresponding to the game rooms in the next level template from the temporary file and creating the next level if a selection instruction of the challenge option of the next level is received.
Specifically, the level creation module specifically includes:
and the level rebuilding unit is used for rebuilding the current floor level based on a re-challenge instruction of the current floor level when the game role fails to challenge the current floor level.
Specifically, the apparatus further comprises:
and the temporary file deleting module is used for deleting the temporary file when the game role successfully challenges all floor level checkpoints.
According to yet another aspect of the present application, there is provided a storage medium having stored thereon a computer program which, when executed by a processor, implements the above-described game level generation method.
According to yet another aspect of the present application, there is provided a computer device comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, the processor implementing the above-mentioned game level generation method when executing the program.
By means of the technical scheme, according to the game level generating method and device, the storage medium and the computer equipment, when a creating instruction of a certain game level in a game is received, the preset level generating rule of the game level is obtained through the level identification of the game level, the temporary file is generated according to the preset level generating rule, and when a game role issues a challenge instruction to any floor in the game level, the level template and the game element corresponding to the floor are read from the temporary file to create the corresponding floor level. Compared with the traditional method for designing the game level, the embodiment of the application designs the content of each level in advance, so that the game level is created based on the pre-designed content when a player challenges the game level, a temporary file is generated according to the preset level generation rule corresponding to the level when the player challenges the game level, the corresponding floor level is created based on the temporary file when the player challenges each floor in the game level, a large number of game level design files are not required to be stored, the temporary file can be generated based on the rule only by setting the rule of the game level to create the game level, the pressure of a system memory is reduced, the problem that a large number of system storage spaces are occupied by a large number of game level design files in the prior art is solved, and different floor levels can be generated by calling game element data corresponding to different floors in the temporary file, the method has the advantages that the system overhead is reduced, the system performance is improved, the problems that the system overhead is large and the system performance is reduced due to the fact that game level design files are called for many times in the prior art are solved, temporary files generated when level is challenged are different at each time, created floor levels are different, diversification of game levels is guaranteed, players can experience different game contents when entering the same game level at each time, the game playability is improved, the precipitation rate of users is improved, the game playing tolerance is enhanced, and the game competitiveness is improved.
The foregoing description is only an overview of the technical solutions of the present application, and the present application can be implemented according to the content of the description in order to make the technical means of the present application more clearly understood, and the following detailed description of the present application is given in order to make the above and other objects, features, and advantages of the present application more clearly understandable.
Detailed Description
The present application will be described in detail below with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
In this embodiment, a method for generating a game level is provided, as shown in fig. 1, the method includes:
step 101, responding to a creation instruction of a game level, and acquiring a level identifier corresponding to the game level;
102, generating temporary files corresponding to the game level according to a preset level generation rule corresponding to the level identification, wherein the temporary files comprise the number of floors corresponding to the game level, a target floor level template corresponding to each floor and target floor game elements;
and 103, when a challenge instruction for any floor is received, reading a target floor level template and a target floor game element corresponding to any floor in the temporary file and creating a corresponding floor level.
The present application is used to create a game level (alternatively referred to as a game scene, a game copy, etc.), where the game level may be a challenge type level, such as a "magic tower" level, and the "magic tower" includes multiple levels, that is, the "magic tower" level includes multiple sub-levels (in this embodiment, referred to as floor levels). In addition, the embodiment of the application can be applied to a client, the client generates a temporary file and creates the level after receiving the creation instruction of the game level, and can also be applied to a server, and the server generates the temporary file and sends the temporary file to the client after receiving the game level creation instruction sent by the client, so that the client can create the corresponding level based on the temporary file. The present application is explained by taking the example as an example of the application to the client, but the implementation applied to the server also falls within the protection scope of the present application.
In the above embodiment, after receiving the creation command of the game level, firstly, the command is parsed to obtain the level id corresponding to the game level, which is used to distinguish different game levels, for example, the level id corresponding to "jing town monster" is 124, and the level id corresponding to "luoyang town monster" is 125. The creation command of the game level generally originates from operations of the player in the game, such as a conversation between the game character and the "jingcheng monster" keeper NPC, and a click operation on a link of the "jingcheng monster", and so on.
Secondly, a preset level generation rule corresponding to the game level is obtained based on a level identifier of the game level, a temporary file corresponding to the game level is further generated according to the rule, the temporary file is used for creating the game level, it should be noted that, each time a creation instruction of the game level is received, a temporary file is generated by using the preset level generation rule according to the creation instruction received this time, one temporary file is used for creating one game level, the content contained in one temporary file can be used for creating a floor level of each layer in one game level, the number of floors corresponding to the game level, a target floor level template corresponding to each floor and target floor game elements corresponding to each floor are specifically contained in the temporary file. The number of floors is the number of sub-levels corresponding to the game level, for example, the number of floors corresponding to 10 levels of "town monster towers" is 10, it is to be understood that the game level of the embodiment of the present invention may also be other types of levels, and is not limited to the level type of "town monster towers" which challenges according to the levels, "a floor" is only an expression form for representing the order of the sub-levels, the target floor level template corresponding to each floor is a blank map of the corresponding floor, the blank map includes an enclosure and topographic information, and does not include specific content information such as monsters, NPCs, props, etc. in the game, for example, the level template of the first level may be an empty room, and the level target of the tenth level may be 3 empty rooms and communication paths between the rooms. The target floor game elements include various in-game elements that the game character should encounter during the level-crossing battle of the corresponding floor, such as monsters, NPCs, game props, and the like. It should be further explained that the information contained in the temporary file is temporarily generated according to a preset level-crossing generation rule, where the preset level-crossing generation rule may define what level templates corresponding to different floor levels (or different sub-levels) may be, and what game elements may appear in different floor levels, in order to satisfy the diversity of game levels, so that a player may experience different game contents each time the player enters a game level, the rule may define that some or all level templates and game elements are randomly generated on the premise that certain conditions are satisfied, for example, the rule may define that a certain elite monster randomly appears in 4 to 7 levels, so as to ensure that the elite monster may appear in the level, and also to randomly allocate the occurrence position of the elite monster, and for example, the rule may define 2 to 8 levels including 3 floors of two rooms and 4 floors of three rooms And the rooms can be randomly distributed on 2-8 floors when the temporary files are generated, so that the players can experience different game contents each time the players enter the game level.
Finally, when a challenge instruction of the player to any floor is received, the data of the corresponding floor can be read from the temporary file to create a floor level, for example, when a challenge instruction of the player to the 3 rd floor is received, the level template of the third floor and the game elements of the third floor are read from the temporary file, so that the floor level of the third floor is created for the player to challenge the level of the third floor.
By applying the technical scheme of the embodiment, when a creation instruction of a certain game level in a game is received, a preset level generation rule of the game level is obtained through a level identifier of the game level, a temporary file is generated according to the preset level generation rule, and when a game role issues a challenge instruction to any floor in the game level, a level template and a game element which correspond to the floor are read from the temporary file to create a corresponding floor level. Compared with the traditional method for designing the game level, the embodiment of the application designs the content of each level in advance so as to create the game level based on the pre-designed content when a player challenges the game level, generates a temporary file according to the preset level generation rule corresponding to the level when the player challenges the game level each time, creates a corresponding floor level based on the temporary file when the player challenges each floor in the game level, does not need to store a large number of game level design files, only needs to set the rules of the game level to generate the temporary file based on the rules so as to create the game level, reduces the pressure of a system memory, can generate different floor levels by calling game element data corresponding to different floors in the temporary file, reduces the system overhead, improves the system performance, and generates different temporary files each time of challenging the level, therefore, the established floor levels are different, the diversification of the game levels is ensured, players can experience different game contents when entering the same game level at each time, the playability of the game is improved, the settling rate of the users is improved, the game playing tolerance is enhanced, and the competitiveness of the game is improved.
Further, as a refinement and an extension of the specific implementation of the above embodiment, in order to fully describe the specific implementation process of the embodiment, another method for generating a game level is provided, as shown in fig. 2, the method includes:
step 201, responding to a creation instruction of a game level, and acquiring a level identifier corresponding to the game level;
step 202, determining the number of floors of the game level and a floor identifier corresponding to each floor according to a preset level generation rule;
step 203, obtaining a target floor level template matched with the floor identification from a preset floor level template library, and generating a temporary file, wherein the target floor level template comprises at least one game room of a specified type;
in the above embodiment, when a command for creating a certain game level is received, for example, when a message that a player enters a certain game level is received, a level identifier of the game level is obtained, and a preset level generation rule corresponding to the level identifier is read, where the rule may record a determination rule of a floor level template, for example, for a 10-level "town goby tower", the preset level generation rule specifies that a first level is a room, a ninth level is a room, a tenth level is 3 rooms, the remaining odd levels are 2 rooms, and the even level is 3 rooms, or the preset level generation rule specifies that the first level is a room, the ninth level is a room, the tenth level is 3 rooms, five layers of the remaining 2 to 8 levels are 2 rooms, and two layers are 3 rooms. According to the rule, a floor identifier corresponding to each floor can be determined, for example, the identifier corresponding to the level template of 1 room is 01, the identifier corresponding to the level template of 2 rooms is 02 … …, then based on the floor identifier of each floor, a corresponding template is found from the preset floor level template library and stored in a temporary file, so that the template can be directly taken out from the temporary file to create a corresponding floor level when a game level is created, and at the moment, data contained in the temporary file includes the number of floors of the game level, the floor identifier of each floor and a target floor level template corresponding to the floor identifier.
In addition, the temporary file generated in step 203 should further include game elements corresponding to each floor, and the game elements should be determined based on the specific content of the preset level generation rule, specifically, the step 203 of generating the temporary file may further include the following steps:
step 203-1, when the level generation rule comprises the appointed rule, respectively determining the game elements in the game rooms in the target floor level template corresponding to each appointed floor according to the game elements corresponding to the appointed floors, and storing the game elements as temporary files.
And 203-2, when the level generation rule comprises a random rule, randomly distributing corresponding game elements to game rooms in the level target corresponding to the target floor corresponding to each group of random floors according to the game elements corresponding to each group of random floors, and storing the game elements as temporary files so that the distributed game elements are consistent with the game elements corresponding to each group of random floors.
In this embodiment of the application, specifically, the preset level generation rule includes a designated rule and/or a random rule, where the designated rule specifically includes at least one designated floor and game elements corresponding to each designated floor, the random rule specifically includes at least one group of random floors and game elements corresponding to each group of random floors, each group of random floors includes at least two floors, and the game elements corresponding to any group of random floors are all game elements included in any group of random floors.
In the above embodiment, on the basis that the target floor level template of each floor is determined in step 203, the game elements included in the game room corresponding to each floor are further determined according to the preset level generation rule, and a specific rule may be specifically defined in the preset level generation rule in order to ensure that the content of the game level is stable, for example, the specific rule may define which game elements included in a specific floor in the game level are, for example, 3 BOSS monsters are respectively set in 3 rooms of the tenth floor, one NPC is set in 1 room of the first floor, and the like, in step 203-1, the game elements of the specified floor corresponding to the specified portion in the preset level generation rule are obtained and added into a temporary file for storage, and in addition, the type of BOSS monument placed in each room may be specifically specified for 3 BOSS monuments set in 3 rooms of the tenth floor, for example, in the specified rule, the 3 types of BOSS monsters can also be randomly distributed into 3 rooms, and the BOSS monster types corresponding to each room in the temporary file can be stored, for example, room 1 corresponds to a frog BOSS, room 2 corresponds to a lizard BOSS, and room 3 corresponds to a centipede BOSS, so that the BOSS monster types of the corresponding game rooms in the temporary file are directly read for creation when the tenth level of the level is subsequently created, and the level creation speed is increased.
In order to improve the diversity of the game stage, a random rule may be specifically defined in the preset stage generation rule, for example, the random rule may include one or more groups of random floors and game elements corresponding to each group of random floors, for example, the random rule includes two groups of random floors, which are 2-5 layers and 6-8 layers, and further includes 2-5 layers corresponding to 2 elite monsters, 2 altars, and 2 wishing pools, 6-8 layers including 3 elite monsters and 1 altar, then 2 elite monsters, 2 altars, and 2 wishing pools may be randomly allocated in the game rooms corresponding to 2-5 layers, and 3 elite monsters and 1 altar may be randomly allocated in the game rooms corresponding to 6-8 layers, and the rest game rooms are filled with common monsters or other contents. Therefore, on the basis of ensuring that the game level comprises specific game elements, the occurrence positions (including floors and rooms) of the game elements are random, a player can experience different contents every time the player enters the game level, and different challenges brought by the player for challenging the game level are also brought due to the randomness of the occurrence positions of the game elements, so that the playability of the game level is improved, and the interest of the player in repeatedly challenging the game level is increased.
Step 204, when receiving the information that the game role enters the game level, reading the first floor level template and the game elements corresponding to the game rooms in the first floor level template from the temporary file, and creating the first floor level.
In the above embodiment, after the player enters the game level, the player should challenge the first floor (or the first level), and when receiving the information that the game character enters the game level, the first floor level template and the corresponding game elements should be read from the temporary file, so that the game rooms in the first floor level are filled with the corresponding game elements, and the first floor level is created for the player to challenge.
Step 205, when the game role successfully challenges the current floor level, opening the collision effect of the transfer door;
step 206, when collision data of the game role and the transfer gate is received, outputting a level selection interface, wherein the level selection interface at least comprises challenge options for the next level of the current floor;
step 207, if a selection instruction of the challenge option of the next level is received, reading the next level template and game elements corresponding to game rooms in the next level template from the temporary file, and creating the next level;
and step 208, when the game role fails to challenge the current floor level, recreating the current floor level based on a re-challenge instruction of the current floor level.
In the above embodiment, the game level of each floor should include a transfer gate, when the game character challenges the current floor successfully, for example, defeats all monsters on the floor, opens the collision effect of the transfer gate, receives collision data of the game character and the transfer gate, for example, when the player challenges the game level alone, receives collision data of the player and the transfer gate, when the team of players takes a battle, receives collision data of the team leader and the transfer gate (also collision data of any character in the team and the transfer gate), outputs a level selection interface, which may include a next level challenge option and an option to exit the game level, for example, the current floor is 1 level, the next level challenge option may be "continue to challenge" or "challenge the second level", and if the player chooses to challenge the next level, the next level corresponding level object and game element continue to be read from the temporary file, and a next level gate is created, and when the game character fails to challenge the current level gate, for example, the game character is defeated by a monster of the level or a prop opening the next gate is damaged, and the like, a gate selection interface can also be output, the interface can include a re-challenge option for the current level gate and an option for pushing out the game gate, for example, the current level is 1 level, the re-challenge option can be "re-challenge the first gate" or "do not fight again", and the like, and if the player selects the re-challenge, the current level gate is re-created based on the content corresponding to the level in the temporary file. The level selection interface is triggered by a transmission door to enter the next level, correlation processing is not needed to be carried out on each floor level, and the design amount of game levels is reduced.
And step 209, deleting the temporary file when the game character successfully challenges all floor level checkpoints.
In the above embodiment, when the game character successfully challenges all floor levels, for example, successfully challenges the tenth level of 10 levels of "monster towers", the temporary file corresponding to the game level may be deleted, because the temporary file is only used for the game character to challenge the game level this time, and when the same game character again challenges the same game level, the temporary file is regenerated and the level is created based on the new temporary file, and even if the same character challenges the same level multiple times, the game content experienced each time is different, so that the temporary file may be deleted to reduce the memory pressure of the client.
Further, as a specific implementation of the method in fig. 1, an embodiment of the present application provides an apparatus for generating a game level, as shown in fig. 3, the apparatus includes:
a creation instruction response module 31, configured to respond to a creation instruction of a game level and obtain a level identifier corresponding to the game level;
the temporary file generation module 32 is configured to generate a temporary file corresponding to the game level according to a preset level generation rule corresponding to the level identifier, where the temporary file includes the number of floors corresponding to the game level, a target floor level template corresponding to each floor, and target floor game elements;
and the level creating module 33 is configured to, when a challenge instruction for any floor is received, read the target floor level template and the target floor game element corresponding to any floor in the temporary file and create a corresponding floor level.
In a specific application scenario, as shown in fig. 4, the temporary file generating module 32 specifically includes:
a floor identification determining unit 321, configured to determine, according to a preset level generation rule, the number of floors of the game level and a floor identification corresponding to each floor;
the temporary file generating unit 322 is configured to obtain a target floor level template matching the floor identifier from a preset floor level template library, and generate a temporary file, where the target floor level template includes at least one game room of a specified type.
In a specific application scenario, the preset level generation rule includes a designated rule and/or a random rule, wherein the designated rule specifically includes at least one designated floor and game elements corresponding to each designated floor, the random rule specifically includes at least one group of random floors and game elements corresponding to each group of random floors, each group of random floors includes at least two floors, and the game elements corresponding to any group of random floors are all game elements included in any group of random floors.
In a specific application scenario, as shown in fig. 4, the temporary file generating unit 32 specifically includes:
and a first temporary file generating subunit 323, configured to, when the level generating rule includes a specified rule, respectively determine, according to the game elements corresponding to the specified floors, game elements in the game room in the target floor level template corresponding to each specified floor, and store the game elements as temporary files.
In a specific application scenario, as shown in fig. 4, the temporary file generating unit 32 specifically includes:
and a second temporary file generating subunit 324, configured to, when the level generating rule includes a random rule, randomly allocate, according to the game elements corresponding to each group of random floors, corresponding game elements to the game rooms in the destination floor level destination corresponding to each group of random floors, and store the corresponding game elements as a temporary file, so that the allocated game elements are consistent with the game elements corresponding to each group of random floors.
In a specific application scenario, as shown in fig. 4, the level creation module 33 specifically includes:
the first level creation unit 331 is configured to, when receiving information that a game character enters a game level, read the first floor level template and game elements corresponding to game rooms in the first floor level template from the temporary file, and create a first floor level.
In a specific application scenario, as shown in fig. 4, the game element corresponding to any floor includes at least a transfer gate; the level creating module 33 specifically includes:
a transfer door opening unit 332 for opening a collision effect of the transfer door when the game character challenges the current floor level and the level is successful;
a level selection interface output unit 333, configured to output a level selection interface when collision data of a game character with a transfer gate is received, where the level selection interface at least includes a challenge option for a level next to a current floor;
the second level creating unit 334 is configured to, if a selection instruction for a challenge option of a next level is received, read the next level template and game elements corresponding to game rooms in the next level template from the temporary file, and create a next level.
In a specific application scenario, as shown in fig. 4, the level creation module 33 specifically includes:
and a level rebuilding unit 335, configured to, when the game character fails to challenge the current floor level, rebuild the current floor level based on a re-challenge instruction for the current floor level.
In a specific application scenario, as shown in fig. 4, the apparatus further includes:
and the temporary file deleting module 34 is used for deleting the temporary file when the game character successfully challenges all floor levels.
It should be noted that other corresponding descriptions of the functional units related to the device for generating a game level provided in the embodiment of the present application may refer to corresponding descriptions in the methods in fig. 1 to fig. 2, and are not described herein again.
Based on the above methods shown in fig. 1 to 2, correspondingly, the present application further provides a storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the above method for generating the game level shown in fig. 1 to 2.
Based on such understanding, the technical solution of the present application may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.), and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the implementation scenarios of the present application.
Based on the method shown in fig. 1 to fig. 2 and the virtual device embodiment shown in fig. 3 to fig. 4, in order to achieve the above object, the present application further provides a computer device, which may specifically be a personal computer, a server, a network device, and the like, where the computer device includes a storage medium and a processor; a storage medium for storing a computer program; a processor for executing a computer program to implement the above-described method for generating a game level as shown in fig. 1 to 2.
Optionally, the computer device may also include a user interface, a network interface, a camera, Radio Frequency (RF) circuitry, sensors, audio circuitry, a WI-FI module, and so forth. The user interface may include a Display screen (Display), an input unit such as a keypad (Keyboard), etc., and the optional user interface may also include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (e.g., a bluetooth interface, WI-FI interface), etc.
It will be appreciated by those skilled in the art that the present embodiment provides a computer device architecture that is not limiting of the computer device, and that may include more or fewer components, or some components in combination, or a different arrangement of components.
The storage medium may further include an operating system and a network communication module. An operating system is a program that manages and maintains the hardware and software resources of a computer device, supporting the operation of information handling programs, as well as other software and/or programs. The network communication module is used for realizing communication among components in the storage medium and other hardware and software in the entity device.
Through the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by software plus a necessary universal hardware platform, and also can be implemented by hardware, when a creation instruction for a certain game level in a game is received, a preset level generation rule of the game level is obtained through a level identifier of the game level, a temporary file is generated according to the preset level generation rule, and when a game role issues a challenge instruction to any floor in the game level, a level template and a game element corresponding to the floor are read from the temporary file to create a corresponding floor level. Compared with the traditional method for designing the game level, the embodiment of the application designs the content of each level in advance so as to create the game level based on the pre-designed content when a player challenges the game level, generates a temporary file according to the preset level generation rule corresponding to the level when the player challenges the game level each time, creates a corresponding floor level based on the temporary file when the player challenges each floor in the game level, does not need to store a large number of game level design files, only needs to set the rules of the game level to generate the temporary file based on the rules so as to create the game level, reduces the pressure of a system memory, can generate different floor levels by calling game element data corresponding to different floors in the temporary file, reduces the system overhead, improves the system performance, and generates different temporary files each time of challenging the level, therefore, the established floor levels are different, the diversification of the game levels is ensured, players can experience different game contents when entering the same game level at each time, the playability of the game is improved, the settling rate of the users is improved, the game playing tolerance is enhanced, and the competitiveness of the game is improved.
Those skilled in the art will appreciate that the figures are merely schematic representations of one preferred implementation scenario and that the blocks or flow diagrams in the figures are not necessarily required to practice the present application. Those skilled in the art will appreciate that the modules in the devices in the implementation scenario may be distributed in the devices in the implementation scenario according to the description of the implementation scenario, or may be located in one or more devices different from the present implementation scenario with corresponding changes. The modules of the implementation scenario may be combined into one module, or may be further split into a plurality of sub-modules.
The above application serial numbers are for description purposes only and do not represent the superiority or inferiority of the implementation scenarios. The above disclosure is only a few specific implementation scenarios of the present application, but the present application is not limited thereto, and any variations that can be made by those skilled in the art are intended to fall within the scope of the present application.