Game map generation method and device, storage medium and computer equipment

Through the method of dynamically generating game maps, new areas are generated based on game events, which solves the problem of insufficient random airport scenes in the existing technology, and improves user experience and game fun.

CN119280802APending Publication Date: 2025-01-10BEIJING PERFECT WORLD SOFTWARE TECH DEV CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202311735951.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-15
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

The existing game map generation solution cannot achieve real random airport scenes, resulting in insufficient gameplay and low user experience.

Method used

By obtaining map configuration data, a starting area is generated, and after the virtual character enters the starting area, the next area and connection area are dynamically generated according to the completed game events, ensuring the randomness and changes of the map in each game process.

Benefits of technology

Real-time dynamic generation of game maps is realized, enriching the gameplay in random airport scenes, and improving the user's game experience and the fun brought by the strategy of routes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119280802A_ABST
    Figure CN119280802A_ABST
Patent Text Reader

Abstract

The invention discloses a game map generation method and device, a storage medium and computer equipment. The method comprises the following steps: acquiring map configuration data, and generating an initial area based on the map configuration data; after the virtual character enters the starting area, in response to the virtual character completing a preset game event in the current area, generating a next area in a preset range of the current area, and generating a connection area connecting the next area and the current area to obtain a target map; wherein the direction of the next area relative to the current area is determined based on the map configuration data or the game event completed by the virtual character in the current area. According to the method, each level area in the game map can be dynamically generated in real time in the game process, the position and direction of each area in the random scene can be automatically generated according to the operation mode of a player or the configuration data in the game, the playing methods in the random scene are enriched, and the real random scene is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of game production technology, and in particular to a method, device, storage medium and computer equipment for generating a game map. Background Art

[0002] Massively multiplayer online role-playing games (MMORPGs) offer players a wealth of fun, including combat, growth, social interaction, collecting, exploration, achievements, and challenges. Compared to other game types, MMORPGs have a longer lifecycle. However, the novelty of various gameplay types within a game gradually diminishes over time, causing users to lose their original sense of freshness and increasingly anticipate a new experience. In practical applications, randomized scenes within games can address this issue to some extent, allowing users to experience a new gameplay experience while maintaining a sense of freshness each time.

[0003] Currently, the core mechanism for implementing random scenes is to split a complete, continuous map into multiple independent areas. Each time a scene is generated, these areas are randomly stitched together to form a complete map. Because the order of stitching is different each time, players will experience different scenes when they enter the game, giving them a different experience of the game map.

[0004] However, in existing random scene generation schemes, each independent area is pre-generated. Although the overall scene appears to be random each time, each specific area is actually the same. Moreover, the player's walking path in the map is also relatively fixed. Therefore, existing map generation schemes cannot achieve truly random scenes or achieve ever-changing randomness. Summary of the Invention

[0005] In view of this, the present application provides a method, device, storage medium and computer equipment for generating a game map, the main purpose of which is to solve the technical problems of low randomness of random scenes, insufficient gameplay of random scenes, and low user experience.

[0006] According to a first aspect of the present invention, a method for generating a game map is provided, the method comprising:

[0007] Obtaining map configuration data, and generating a starting area based on the map configuration data;

[0008] After the virtual character enters the starting area, in response to the virtual character completing a preset game event in the current area, a next area is generated within a preset range of the current area, and a connecting area is generated connecting the next area and the current area to obtain a target map;

[0009] The direction of the next area relative to the current area is determined based on the map configuration data or a game event completed by the virtual character in the current area.

[0010] According to a second aspect of the present invention, there is provided a device for generating a game map, the device comprising:

[0011] A starting area generating module, configured to obtain map configuration data and generate a starting area based on the map configuration data;

[0012] The new region generation module is used to generate the next region within a preset range of the current region after the virtual character enters the starting region, in response to the virtual character completing a preset game event in the current region, and to generate a connecting region connecting the next region and the current region to obtain the target map; wherein, the direction of the next region relative to the current region is determined based on the map configuration data or the game event completed by the virtual character in the current region.

[0013] According to a third aspect of the present invention, there is provided a storage medium having a computer program stored thereon, wherein the program implements the above-mentioned method for generating a game map when executed by a processor.

[0014] According to a fourth aspect of the present invention, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned method for generating a game map when executing the program.

[0015] This invention provides a method, apparatus, storage medium, and computer device for generating game maps. First, map configuration data is acquired. Based on this data, a starting area is generated. Then, after a virtual character enters the starting area, in response to a preset game event completed by the virtual character in the current area, a next area is generated within a preset range of the current area. A connecting area is also generated between the next area and the current area, thus obtaining the target map. The direction of the next area relative to the current area can be determined based on the map configuration data or the game event completed by the virtual character in the current area. This solution can dynamically generate various level areas in the game map in real time during the game process. The position and direction of each area in a random scene can be automatically generated according to the player's operation or in-game configuration data. The player can plan the path for each game, thus enriching the gameplay in random scenes and achieving truly random scenes. Through this method, players can more intuitively experience the different feelings brought by in-game randomness, and also experience the fun of strategic route planning, thereby improving the user's gaming experience.

[0016] 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

[0017] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0018] Figure 1 A schematic diagram showing a flow chart of a method for generating a game map provided by an embodiment of the present invention;

[0019] Figure 2 A schematic diagram showing a flow chart of a method for generating a game map provided by an embodiment of the present invention;

[0020] Figure 3 A schematic diagram of a scene of a starting area of ​​a game map provided by an embodiment of the present invention is shown;

[0021] Figure 4 A schematic diagram of a scene showing a starting area and a next area of ​​a game map provided by an embodiment of the present invention;

[0022] Figure 5 A schematic diagram of a scene showing a starting area, an area next to the starting area, and a connecting area between the two areas of a game map provided by an embodiment of the present invention;

[0023] Figure 6 A schematic diagram of a scene of a parcel navigation editor provided by an embodiment of the present invention is shown;

[0024] Figure 7 A schematic diagram of a complete game map provided by an embodiment of the present invention is shown;

[0025] Figure 8 A schematic structural diagram of a device for generating a game map provided by an embodiment of the present invention is shown;

[0026] Figure 9 A schematic structural diagram of a game map generating device provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0027] The present invention will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other.

[0028] In one embodiment, Figure 1 As shown, a method for generating a game map is provided, which is described by taking the method applied to a computer device as an example, and includes the following steps:

[0029] 101. Obtain map configuration data, and generate a starting area based on the map configuration data.

[0030] Map configuration data refers to the necessary data required to generate the target map, including but not limited to the coordinates of the starting area, the location and size of the map boundaries, the number of checkpoint chains, the direction of at least some areas relative to the previous area, the connection method between two areas, etc.

[0031] Specifically, before a user's virtual character enters a random map to engage in gameplay, the server can first obtain map configuration data and generate a starting area based on the coordinates and other data of the starting area within the map configuration data. The starting area refers to the first area in the target map, i.e., the first area the user's virtual character enters when engaging in gameplay on the random map. In this embodiment, the starting area can be pre-generated, loaded into the client, and then stored in the client's cache. When the user enters the map to engage in gameplay, the client can read the area information of the starting area from the cache and display the starting area on the client.

[0032] In this embodiment, by pre-generating a starting region instead of generating multiple regions, the computational load on the server and the storage load on the client can be reduced. Furthermore, the speed at which the client displays the random map can be improved, thus enhancing the user's gaming experience. The method of generating the starting region can be preset. For example, multiple plot fragments can be generated and pieced together to form the starting region, or a single, continuous region can be generated directly. Additionally, the shape of the starting region can be preset, randomly generated, or randomly pieced together. The gameplay and events within the starting region can be pre-configured or randomly generated; this embodiment does not impose specific limitations on any of these aspects.

[0033] 102. After the virtual character enters the starting area, in response to the virtual character completing a preset game event in the current area, the next area is generated within the preset range of the current area, and a connecting area is generated to connect the next area with the current area to obtain the target map. The direction of the next area relative to the current area is determined based on the map configuration data or the game event completed by the virtual character in the current area.

[0034] In this context, the current area refers to the area where the player's virtual character is currently located, and the next area refers to another area connected to the current area. For example, when a user's virtual character enters a random map, they first enter the starting area, which is now the current area, and the next area is the second area on the map. After the user's virtual character completes a game event in the starting area, the second area is automatically generated, and the virtual character can enter the second area through the connecting area between the starting area and the second area. After entering the second area, the current area becomes the second area, the next area becomes the third area, and so on.

[0035] Specifically, after a player's virtual character enters a random map, they first enter the starting area. In the starting area, the player can perform various game actions and complete preset game events according to the gameplay rules set in the starting area, such as solving puzzles or fighting monsters. After completing the preset game events in the current area, a next area is generated in one direction from the current area, along with a connecting area. The generated next area is within a preset range of the current area and is connected to it via the connecting area. Furthermore, after the next area and the connecting area are generated, their information is loaded into the client and stored in the client's cache. Once both the next area and the connecting area are loaded, the client can read their information from the cache and display them on the client, allowing the player to move their virtual character from the current area to the next area.

[0036] In this embodiment, the direction of the next region relative to the current region can be determined based on map configuration data or game events completed by the virtual character within the current region. For example, if the map configuration data specifies a second region to the right of the starting region, the direction of the next region relative to the current region can be determined to be to the right. As another example, if a game event is set above, to the right, and below the starting region, and the player controls the virtual character to complete a game event to the right of that region within the starting region, the direction of the next region relative to the current region can also be determined to be to the right. It is understood that, to increase the randomness of the game map, a direction is typically not assigned to every region on the map; instead, a direction is assigned to regions only when map boundaries are restricted or when regions collide.

[0037] In this embodiment, each area in the game map can be generated by sampling in the same manner or by sampling in different manners. For example, when generating each area in the map, multiple land fragments can be generated, and then the multiple land fragments can be spliced ​​together to form an area in the map, or a whole area can be directly generated as an area in the map. In addition, the size and shape of each area in the map can be pre-set, or randomly generated, or randomly spliced ​​together, and the gameplay and events in each area can be pre-configured or randomly generated, which is not specifically limited in this embodiment. It is understandable that in order to increase the randomness of the game map, the size and shape of each area in the map and the gameplay and events configured in the area are usually different, for example, they can be randomly generated or randomly spliced ​​together.

[0038] In this embodiment, in response to a virtual character completing a preset game event in the current area, the next area and connecting areas may be generated after the virtual character completes one or more preset events in the current area, or after the virtual character completes all preset events in the current area. This embodiment generates the next area within a preset range of the current area and the connecting area connecting the next area to the current area in response to the virtual character completing a preset game event in the current area. This allows for the real-time, dynamic generation of various areas within a map during a player's game progress. The direction and position of each area relative to the previous area can be fluid and can be determined based on the game events completed by the player during the game. Therefore, the generated game map can be highly varied for different players. Furthermore, because the map is dynamically generated in real time, it can be loaded in real time during the game, eliminating the need to complete loading before entering a random scene. This results in faster map loading and a better gaming experience.

[0039] The game map generation method provided in this embodiment first acquires map configuration data and generates a starting area based on the map configuration data. Then, after the virtual character enters the starting area, in response to the virtual character completing a preset game event in the current area, a next area is generated within a preset range of the current area, and a connecting area is generated between the next area and the current area, thus obtaining the target map. The direction of the next area relative to the current area can be determined based on the map configuration data or the game event completed by the virtual character in the current area. This scheme can generate various level areas in the game map in real time and dynamically during the game process. The position and direction of each area in the random scene can be automatically generated according to the player's operation method or the in-game configuration data. The player can plan the path for each game, thus enriching the gameplay in the random scene and realizing a truly random scene. Through this method, players can more intuitively experience the different feelings brought by in-game randomness, and also experience the fun of the game brought by route strategy, thereby improving the user's game experience.

[0040] Furthermore, as a refinement and extension of the specific implementation of the above embodiment, in order to fully illustrate the implementation process of this embodiment, a method for generating a game map is provided, such as Figure 2 As shown, the method includes the following steps:

[0041] 201. Obtain map configuration data, and generate a starting area based on the map configuration data.

[0042] Specifically, before a user's virtual character enters a random map to engage in gameplay, the server can first obtain map configuration data and generate a starting area based on the coordinates and other data of the starting area within the map configuration data. The starting area refers to the first area in the target map, i.e., the first area the user's virtual character enters when engaging in gameplay on the random map. In this embodiment, the starting area can be pre-generated, loaded into the client, and then stored in the client's cache. When the user enters the map to engage in gameplay, the client can read the area information of the starting area from the cache and display the starting area on the client.

[0043] In this embodiment, the method of generating the starting area can be preset. For example, multiple plot fragments can be generated and spliced ​​together to form the starting area, or a whole area can be directly generated as the starting area. In addition, the shape of the starting area can be preset, randomly generated, or randomly spliced ​​together. The gameplay and events in the starting area can be preset or randomly generated. This embodiment does not make any specific limitations.

[0044] In an optional embodiment, the starting area can be generated in the following manner: first, at least one plot fragment is generated at the coordinate position of the starting area, and at least one plot fragment is spliced ​​to obtain a central area; then, multiple plot fragments are randomly spliced ​​in multiple expansion directions of the central area to obtain an extended area; finally, non-interactive edging fragments are generated on the boundary of the extended area, and the extended area is closed by the edging fragments to obtain the starting area.

[0045] In the above embodiment, the coordinate position of the starting area can be pre-recorded in the map configuration data. When generating the starting area, the coordinate position of the starting area can be first obtained in the map configuration data, and then at least one plot fragment can be generated at the coordinate position of the starting area. In this embodiment, the server can generate multiple plot fragments based on the map configuration data, or it can randomly generate multiple plot fragments and then splice the multiple plot fragments into a central area, or the server can directly generate a whole plot fragment as the central area. Furthermore, after the central area is generated, multiple plot fragments can be randomly generated in multiple expansion directions of the central area, that is, multiple plot fragments are randomly added in directions that do not border other plot fragments in each plot fragment of the central area to generate an irregularly shaped expansion area, wherein the random generation method of the plot fragments, such as the generation probability and generation number of the plot fragments in each direction, can be obtained in the map configuration data. At this point, a plane area in which the virtual character can walk can be obtained. Finally, non-interactive edge fragments can be generated on the boundary of the extended area, and the extended area can be closed by the edge fragments. That is, fragments that the virtual character cannot walk in are generated in the direction where each plot fragment in the extended area does not border other plot fragments, and the entire extended area is closed and wrapped to obtain the starting area.

[0046] For example, Figure 3 Shows one way to lay out the tiles in the starting area. Figure 3 First, at the coordinate position of the starting area, generate multiple plot fragments labeled "1" and splice the multiple plot fragments labeled "1" to obtain the central area. Then, randomly splice multiple plot fragments labeled "2" in multiple expansion directions of the central area to obtain the extended area. Finally, generate non-interactive edge fragments labeled "3" on the boundary of the extended area, and use the edge fragments labeled "3" to close the extended area to obtain the starting area.

[0047] By generating a central area, the above-described embodiment can construct a primary area where virtual characters can complete game events, thereby ensuring that game events can be smoothly executed. For example, the central area can be used as a combat zone for virtual characters to complete monster-killing tasks. Furthermore, by randomly expanding the central area, the randomness of the starting area's terrain can be increased, allowing different players operating virtual characters to have different gaming experiences when entering random scenes, thereby increasing the randomness of the game map and the fun of the game. Finally, by generating edge fragments on the periphery of the expanded area, the virtual character's actions can be confined to a fixed area, ensuring that the game can proceed smoothly throughout the entire starting area.

[0048] In an optional embodiment, the starting area can be expanded in the following manner: first, based on the shape of the central area, multiple expansion directions of the central area are determined; then, each expansion direction of the central area is polled, and according to a preset fragment generation probability, land fragments are generated in sequence in each expansion direction of the central area, wherein the generated land fragments do not overlap with other generated areas and do not exceed the preset map boundary; finally, when the number of polling times in each expansion direction reaches a preset polling number threshold, the generation of land fragments is stopped to obtain an expanded area.

[0049] In the above embodiment, the shape of the central area refers to the boundary shape of the central area. After the central area is generated, the server can expand the area on the boundary of the central area based on the preset fragment generation probability to obtain the expanded area. Figure 3 After the central area is generated, it can be determined that the shape of the central area is a 3*4 rectangle, and then the multiple expansion directions of the central area can be determined as the directions bordering the 10 land fragments on the boundary of the rectangle, wherein the expansion direction also includes the directions bordering the land fragments at the corner positions in a diagonal direction. Furthermore, after the expansion direction is determined, each expansion direction can be polled. Assuming that the number of polls for each expansion direction is twice and the probability of fragment generation in each expansion direction is 50%, then the land fragments can be generated one by one in each expansion direction according to this probability. If the generated fragments collide with other areas or exceed the map boundary, the generation of this position will be skipped. Figure 3 ,After polling twice in each expansion direction, an irregular ,shaped expansion area can be generated on the periphery of the central area.

[0050] The above embodiment generates plot fragments in turn in various expansion directions of the central area according to the preset probability of generating plot fragments through polling to obtain an expanded area. The size of the area can be limited to a certain area. At the same time, the randomness of the area shape can be ensured, making the change of the area shape more natural, so that players can experience the different game feelings brought by the randomness of the area.

[0051] In an optional embodiment, the starting area can also be expanded in the following manner: first, based on the shape of the central area, multiple expansion directions of the central area are determined; then, according to the preset fragment generation probability and fragment generation weight, plot fragments are generated in sequence in each expansion direction of the central area, wherein the generated plot fragments do not overlap with other generated areas and do not exceed the preset map boundary; finally, based on the generation results of the plot fragments in each expansion direction, the fragment generation weights of each expansion direction are updated; and based on the fragment generation probability of each expansion direction and the updated fragment generation weights, plot fragments are generated in sequence in each expansion direction of the central area until the number of plot fragments reaches the preset plot fragment number threshold, thereby obtaining an expanded area.

[0052] In the above embodiment, after the central area is generated, the server can expand the area on the boundary of the central area based on the preset fragment generation probability and fragment generation weight to obtain the expanded area. Figure 3 After the central area is generated, it can be determined that the central area is a 3*4 rectangle. Furthermore, multiple expansion directions of the central area can be determined as directions that border the 10 plot fragments on the rectangle's boundary. These expansion directions also include directions that diagonally border plot fragments at corner locations. Furthermore, after the expansion directions are determined, plot fragments can be sequentially generated in each expansion direction of the central area according to preset fragment generation probabilities and fragment generation weights. If a generated fragment collides with another area or exceeds the map boundary, generation at that location is skipped and continued. Furthermore, during the plot fragment generation process, the fragment generation weights for each expansion direction can be continuously updated based on the generation results of the plot fragments in each expansion direction, such as by increasing or decreasing the fragment generation weight for that location, until the number of plot fragments reaches a preset plot fragment threshold, thereby obtaining an expanded area. The number of plot fragments can also be replaced with other parameters, such as the number of expansion layers of the plot fragments, the ratio of the number of plot fragments to the number of plot fragments in the central area, and so on. This is not specifically limited in this embodiment.

[0053] The above-described embodiment limits the size of a region to a certain area by limiting the number of generated plot fragments. Furthermore, by generating plot fragments based on plot generation probabilities and weights, the randomness of the region's shape can be ensured, making the changes in the region's shape more natural. Furthermore, by continuously updating the weights for generating plot fragments, the probability of generating subsequent plot fragments at the location of a generated plot fragment can be increased, thereby allowing the region's shape to expand further in certain expansion directions and making the changes in the region's shape more consistent with natural laws, thereby improving the user's gaming experience.

[0054] In this embodiment, the starting area can be pre-generated before the user enters the random map and stored in the client's cache space. After the user enters the random map, the client can load and process data related to the starting area to render a map effect that displays the starting area. In this embodiment, the client can monitor the area information of the starting area in real time and respond promptly based on the monitoring results. For example, after monitoring that the starting area has been created, the client can immediately load the area information of the starting area into the client's cache space. After monitoring that the starting area has been refreshed, the client can also promptly update the area information in the cache space, etc., thereby improving the loading speed of area information.

[0055] 202. After the virtual character enters the starting area, in response to the virtual character completing a preset game event in the current area, a next area is generated within a preset range of the current area, and a connection area connecting the next area and the current area is generated, wherein the direction of the next area relative to the current area is determined based on map configuration data or a game event completed by the virtual character in the current area.

[0056] Specifically, after a player controls their avatar and enters a random map, they first enter the starting area. In the starting area, the player can control their avatar to perform various game operations and complete preset game events according to the gameplay set in the starting area, such as completing a puzzle event or a monster-killing event in the current area. After completing the preset game events in the current area, a next area is generated in a direction of the current area, and a connecting area is generated connecting the next area to the current area. The direction of the next area relative to the current area can be determined based on map configuration data or game events completed by the avatar in the current area. The generated next area is within a preset range of the current area and connected to the current area via the connecting area. Furthermore, after the next area and the connecting area are generated, the area information of the next area and the connecting area can be loaded into the client and stored in the client's cache. Once the area information of the next area and the connecting area are loaded, the client can read the area information of the next area and the connecting area from the cache and display them on the client, allowing the player to control the avatar from the current area to the next area. It is understandable that in order to increase the randomness of the game map, directions are usually not configured for every area in the map. Instead, directions are configured for areas in the map only when the map boundary limits and the areas collide.

[0057] In this embodiment, each area in the game map can be generated by sampling in the same manner or by sampling in different manners. For example, when generating each area in the map, multiple land fragments can be generated, and then the multiple land fragments can be spliced ​​together to form an area in the map, or a whole area can be directly generated as an area in the map. In addition, the size and shape of each area in the map can be pre-set, or randomly generated, or randomly spliced ​​together, and the gameplay and events in each area can be pre-configured or randomly generated, which is not specifically limited in this embodiment. It is understandable that in order to increase the randomness of the game map, the size and shape of each area in the map and the gameplay and events configured in the area are usually different, for example, they can be randomly generated or randomly spliced ​​together.

[0058] In this embodiment, in response to a virtual character completing a preset game event in the current area, the next area and connecting areas may be generated after the virtual character completes one or more preset events in the current area, or after the virtual character completes all preset events in the current area. This embodiment generates the next area within a preset range of the current area and the connecting area connecting the next area to the current area in response to the virtual character completing a preset game event in the current area. This allows for the real-time, dynamic generation of various areas within a map during a player's game progress. The direction and position of each area relative to the previous area can be fluid and can be determined based on the game events completed by the player during the game. Therefore, the generated game map can be highly varied for different players. Furthermore, because the map is dynamically generated in real time, it can be loaded in real time during the game, eliminating the need to complete loading before entering a random scene. This results in faster map loading and a better gaming experience.

[0059] In an optional embodiment, each area in the game map can be generated in the following manner: first, based on the map configuration data or the game events completed by the virtual character in the current area, the direction of the next area relative to the current area is determined, and then, based on the direction of the next area relative to the current area and the coordinate position of the current area, the coordinate position of the next area is determined within a preset range of the current area. Furthermore, at the coordinate position of the next area, at least one land fragment can be generated, and at least one land fragment can be spliced ​​to obtain a central area, and then multiple land fragments can be randomly spliced ​​in multiple expansion directions of the central area to obtain an extended area. Finally, non-interactive edge fragments can be generated on the boundary of the extended area, and the extended area can be closed by the edge fragments to obtain the next area.

[0060] In the above embodiment, the direction of the next area relative to the current area can be determined based on the map configuration data or the game events completed by the virtual character in the current area. In this embodiment, the direction data corresponding to the next area can be queried in the map configuration data based on the event chain sequence of the next area in the game map. If no direction data is found, the direction of the next area relative to the current area can be determined based on the game events completed by the virtual character in the current area. After the direction of the next area is determined, the location range of the next area can be delineated to determine the coordinate position of the next area. Furthermore, the server can generate the next area at the coordinate position of the next area through a series of methods such as splicing plot fragments, expanding plot fragments, and wrapping fragments. It can be understood that each area after the starting area can be generated using the above method, or it can be randomly generated using other methods. In addition, the generation method of each area can be generated with reference to the method of generating the starting area described in each embodiment in step 201, which will not be repeated here.

[0061] For example, Figure 4 This illustrates a layout of plots in a starting area and the next area after that starting area. (Refer to...) Figure 4 After the starting area is generated, the player can control the virtual character to complete the preset game events in the starting area. After the game events are completed, the coordinate position of the second area can be determined based on the game configuration data or the game events completed by the virtual character in the starting area. After the coordinate position of the second area is determined, a plurality of land fragments labeled "1" can be first generated at the coordinate position of the second area, and the plurality of land fragments labeled "1" can be spliced ​​together to obtain a central area. Then, a plurality of land fragments labeled "2" can be randomly spliced ​​in multiple expansion directions of the central area to obtain an extended area. Finally, non-interactive edge fragments labeled "3" are generated on the boundary of the extended area, and the extended area is closed by the edge fragments labeled "3" to obtain the next area of ​​the starting area, that is, the second area.

[0062] The above-described implementation determines the direction of the next area based on map configuration data or game events completed by the virtual character in the current area. This increases the randomness of area generation, allowing users to experience the fun of route strategy and making the game map ever-changing and random. Furthermore, the above-described implementation constructs each area by piecing together multiple land fragments to generate a central area, randomly expanding the central area to obtain extended areas, and then closing off the extended areas. This increases the randomness of the terrain in each area, further enhancing the randomness of the game map. This ensures that different players, controlling virtual characters, can have different gaming experiences when entering random scenes, greatly improving the randomness of the game map and the game's fun.

[0063] In one optional implementation, the direction of each region relative to the previous region can be determined as follows: First, based on the level chain sequence of the next region, the direction data corresponding to the level chain sequence is read from the map configuration data. If the direction data is read, the direction of the next region relative to the current region is determined based on the direction data; if the direction data is not read, the direction of the next region relative to the current region is determined based on the direction corresponding to the game events completed by the virtual character in the current region.

[0064] In the above embodiments, based on the limitations of the game map boundaries or the location of each region within the game map, the direction of each region relative to the previous region can be generated through pre-configuration. For example, assuming the starting region in the game map is at the far left of the map boundary, to reduce the possibility of the second region colliding with the map boundary, the second region can be configured to be to the right of the starting region. As another example, during the generation of a region, by performing collision detection between the generated region's location and other regions in the map, and finding that the current region is occupied by other regions to its left, above, and below, the next region can also be configured to be to the right of the current region.

[0065] In the above embodiment, the direction of each area relative to the previous area can be obtained by querying the map configuration data through the level chain sequence of the area, wherein the level chain sequence can be used to characterize the generation order of a certain area in the game map, such as the starting area, the second area, the third area, and so on. Furthermore, when the direction of the next area relative to the current area is not queried through the level chain sequence, the direction of the next area relative to the current area can be determined based on the direction corresponding to the game event completed by the virtual character in the current area. In this scenario, there may be at least two directions of the next area relative to the current area. At this time, preset game events can be generated in multiple directions in the current area in which the next area can be generated. The next area can be generated in the direction in which the player completes the game event, thereby increasing the randomness of the location of the area.

[0066] The above implementation method predicts the direction in which the next area will be generated relative to the current area, and then chooses to determine the direction of the next area relative to the current area through configuration or through game events completed by the user. On the one hand, it can ensure that the generated area will not collide with other areas in the game map or with the map boundary, thereby ensuring the integrity of the game map. On the other hand, it can improve the randomness of the area position, thereby realizing a truly random scene, thereby achieving ever-changing randomness.

[0067] In an optional embodiment, the coordinate position of the next area can be determined in the following manner: first, based on the level chain sequence of the next area, the estimated area of ​​the area corresponding to the level chain sequence is read out in the map configuration data; then, based on the direction of the next area relative to the current area and the coordinate position of the current area, the selected range of the coordinate position of the next area is determined; and then, based on the selected range of the coordinate position of the next area and the estimated area, the pre-selected coordinate position of the next area is determined; finally, if it is detected that the pre-selected coordinate position does not overlap with other generated areas and does not exceed the preset map boundary, the pre-selected coordinate position is determined as the coordinate position of the next area.

[0068] In the above embodiment, based on the level chain sequence of the next area, the estimated area corresponding to the level chain sequence can be first read out in the map configuration data, wherein the estimated area of ​​the area can usually be used to represent the maximum area that the area can occupy in the game map. By limiting the maximum area that each area can occupy in the map, on the one hand, it can ensure that multiple areas can be generated within the map boundary, and on the other hand, it can facilitate the estimation of the coordinates of the center position of each area.

[0069] Furthermore, after the direction of the next area relative to the current area is determined, the selected range of the coordinate position of the next area can be delineated in the preset direction of the current area through the coordinate position of the current area. In this embodiment, the coordinate position of the current area can be the coordinate of the center position of the current area, and the selected range of the coordinate position of the next area can be an interval within a certain distance and angle range from the center position of the current area. Furthermore, through the selected range of the coordinate position of the next area and the estimated area, the pre-selected coordinate position of the next area can be determined by rule setting or random means. After determining the pre-selected coordinate position of the next area, it can be detected whether the position coincides with other generated areas and whether it exceeds the preset map boundary. If it is detected that the position does not coincide with other generated areas and exceeds the preset map boundary, the coordinate position can be determined as the coordinate position of the next area; if it is detected that the position coincides with other generated areas or exceeds the preset map boundary, a new coordinate position can be determined within the selected range of the above-mentioned coordinate position, and a collision detection is performed on the position to obtain the coordinate position of the next area.

[0070] The above implementation method selects the coordinate position of the next area based on parameters such as the coordinate position of the current area, the direction of the next area relative to the current area, and the estimated area of ​​the next area, and performs area collision detection during the selection process. This can ensure that the position and distance between the next area and the current area are within a reasonable range, and that the next area will not collide with other areas in the game map or the map boundary, thereby ensuring the integrity and rationality of the game map.

[0071] In an optional embodiment, the connecting area between any two areas can be generated in the following manner: first, based on the relative position of the next area and the current area, the starting plot fragment is determined in the current area, and the end plot fragment is determined in the next area; then, according to the direction of the starting plot fragment relative to the end plot fragment, starting from the starting plot fragment, the connecting fragment is generated until the connecting fragment is connected to the end plot fragment; finally, widening fragments are generated in sequence on the connecting fragment between the starting plot fragment and the end plot fragment to obtain the connecting area connecting the next area and the current area.

[0072] In the above embodiment, the starting and ending plot fragments can be determined within two adjacent regions based on the relative position of the next region and the current region. The starting and ending plot fragments can be the two closest plot fragments within the two adjacent regions. For example, assuming the next region is to the right of the current region, the plot fragment with the coordinates furthest to the right in the current region can be used as the starting plot fragment, and the plot fragment with the coordinates furthest to the left in the next region can be used as the ending plot fragment. Connecting fragments are then set between the two plot fragments to connect them. In this embodiment, the shape of the line connecting the two regions can be pre-configured or determined based on the locations of the starting and ending plot fragments. The lines between different regions may differ, and the different shapes of the lines are primarily due to differences in the calculation method, resulting in different shapes. For example, the line shape can be a straight line or a diagonal line. However, the principle of connecting the two regions is the same: starting from the starting plot fragment, connecting fragments are added in the direction of the ending plot fragment until the ending fragment is reached. Furthermore, after a path is trained through the connection operation, the width of this path is only the width of a connected fragment. Therefore, for user experience and artistic effects, the path can be widened to a certain extent according to the configuration to obtain a connection area that can connect two areas.

[0073] For example, Figure 5 Shows one way to lay out the tiles for the starting area, the second area, and the connecting area between the two areas. Figure 5 After the starting area and the second area are generated, a starting plot fragment can be determined in the current area based on the relative position of the second area to the starting area, and an end plot fragment can be determined in the second area. Then, starting from the starting plot fragment, connecting fragments labeled "4" are sequentially generated according to the direction of the starting plot fragment relative to the end plot fragment, until the connecting fragment is connected to the end plot fragment. Finally, widening fragments labeled "5" can be sequentially generated on the connecting fragment between the starting plot fragment and the end plot fragment to obtain a connected area. In some embodiments, after the connected area is generated, a non-interchangeable edge fragment labeled "3" can be generated on the boundary of the connected area, and the connected area is closed by the edge fragment to obtain a closed connected area. Generally, edge fragments can be generated on the boundary of a planar connected area, but not on a connected area with a height difference. The height difference between the two areas can be determined by the height parameter of the two areas, and the connected area with a height difference can be an upward staircase or a downward staircase.

[0074] The above implementation method determines the starting plot fragment and the end plot fragment in two adjacent areas based on the relative position of the next area and the current area, and connects the starting plot fragment and the end plot fragment by connecting the fragments, and then expands the connected fragments to obtain a connected area. On the one hand, it can improve the speed of generating the connected area, and on the other hand, it can ensure the aesthetics of the connected area.

[0075] In an optional embodiment, the connecting area can connect the current area and the next area in the following manner: first, obtain the update type of each plot fragment in the current area and the next area, and then perform an update operation on each plot fragment according to the update type of each plot fragment, so that the plot fragments connecting the current area and the next area with the connecting area are updated to interactive plot fragments, wherein the update operation may include an add operation and / or a delete operation.

[0076] In the above embodiment, in order to achieve diverse changes in each area, this embodiment can support the creation and loading of terrain plots in newly generated areas, as well as the modification of terrain plots in already generated areas, and thus formulates a targeted strategy for the dynamic addition and deletion of plots within the area. In this embodiment, the control over the addition and deletion of plot fragments in each area lies with the server side, mainly when the game event in the current area is completed and the server side sends the plot information of the current area and the next area. The client can decide whether each plot fragment needs to be added or deleted in the current area based on the update type of the plot information in the synchronized content sent by the server.

[0077] For example, Figure 5 Shows one way to lay out the tiles for the starting area, the second area, and the connecting area between the two areas. Figure 5 After the starting area, the second area, and the connecting area between the two areas are generated, the server can update the land fragments in the current area that are connected to the connecting area. The client can query the update type of each land fragment in the current area to find the land fragments that need to be updated. It can then delete the edge fragments connected to the connecting area and add land fragments of different shapes, so that the land fragments connecting the current area and the connecting area are updated to interactive land fragments. At this point, the player can control the avatar to enter the next area through the opening of the current area and the connecting area, so that the game can proceed sequentially.

[0078] The above-mentioned embodiment dynamically updates the plot information of the generated area, and when the game event in the current area is completed, a gap can be opened in the current area, and the gap can be connected to the connecting area, so that the virtual character can enter the next area through the gap in the current area and the connecting area, thereby allowing the game to be executed smoothly and improving the naturalness of the area transition.

[0079] In an optional embodiment, during the region generation process, the following steps may be performed: real-time monitoring of refresh and creation operations for each region in the target map; if any region is detected to be refreshed or created, obtaining the parcel information of the refreshed or created region and storing the parcel information of the refreshed or created region in a cache. In this embodiment, the monitored regions may be each region that has already been generated in the target map, as well as each region that is currently being generated.

[0080] In the above embodiment, the client can cache the regional information of multiple areas in the game map, and specifically process the loading behavior of land resources in the area, as well as the creation or refresh of the monitoring area. The advantage of monitoring is that it can clearly know whether each area has been processed and whether it is necessary to logically wait for the processing work of all areas in order to continue the subsequent processing work.

[0081] By using caching technology, the above implementation can load and monitor regional information for multiple regions synchronized by the server, significantly reducing the number of updates per region. Furthermore, the client can pre-define important data by category and, during real-time runtime, populate various cached information with server-synchronized information based on different logic to improve information retrieval efficiency.

[0082] 203. After any area is generated, dynamically construct navigation data for the newly generated area.

[0083] Specifically, after any area is generated, navigation data for the newly generated area can be dynamically constructed. In this embodiment, after the starting area is generated, navigation data for the starting area can be pre-generated. Therefore, after the player operates the virtual character to enter the starting area, the player can perform a pathfinding operation based on the pre-generated navigation data to enable the game operation to be smoothly executed. Furthermore, when the player operates the virtual character to complete a preset game event in the current area, the next area can be generated within the preset range of the current area. After the next area is generated, navigation data for the next area can be generated. Therefore, after the player operates the virtual character to enter the next area, the player can perform a pathfinding operation based on the pre-generated navigation data for the next area to enable the game operation to be smoothly executed.

[0084] In an optional embodiment, the routing data of any area can be generated in the following manner: first, after any area is generated, the routing template data corresponding to the newly generated area is obtained, then the routing data of each plot fragment in the newly generated area is obtained, and based on the routing data of each plot fragment, the routing data of the newly generated area is obtained, and then, the routing data of the newly generated area can be overlaid on the routing template data, and the overlaid routing template data can be used as the navigation data of the newly generated area, and finally, the routing operation can be performed based on the navigation data of the newly generated area, and the navigation data can be restored to the routing template data after the routing operation.

[0085] In the above embodiment, the pathfinding data can be generated by dynamically constructing data each time a pathfinding operation is performed. The specific process is: when a pathfinding operation is required, the pathfinding data of the newly generated area is first generated based on the land fragments in the newly generated area, that is, the map information data of the newly generated area is generated. The pathfinding data can be an int[], in which 4 data are grouped together to represent the status of a land fragment. For example, [4, 10, 10, 1] can represent that the coordinates of the land fragment with a serial number of 4 are 10, 10, and the direction code is 1. Thereafter, the corresponding pathfinding template data is queried based on this set of data using the scene code of the current area, and then the pathfinding data of the area is overlaid on the pathfinding template data to complete the update of the pathfinding template data. The updated pathfinding template data can represent the navigation data in the area. After the pathfinding operation is performed on this basis, the navigation data can be restored to the pathfinding template data for repeated use in other subsequent areas to reduce memory usage.

[0086] In the above embodiment, the pathfinding algorithm for each area in the game map can be generated using a pathfinding algorithm such as the AStar pathfinding algorithm. The pathfinding data for each area can be pre-built using an AStar pathfinding data template based on the map configuration data when the server is started, and a unique scene code can be generated using the area size in the map configuration data. In this way, areas of the same size can use the same pathfinding data template when performing pathfinding operations, thereby reducing memory overhead.

[0087] In an optional embodiment, pathfinding data for a parcel fragment may be pre-created using a parcel navigation editor. The method for creating pathfinding data for a parcel fragment using the parcel navigation editor may include the following steps: first, in response to an import operation of parcel information, displaying a parcel information list, wherein the parcel information list may include multiple types of parcel fragments; second, in response to a selection operation of a parcel fragment, displaying a navigation grid occupied by the parcel fragment; and third, generating navigation data for the parcel fragment using a preset pathfinding algorithm; and finally, in response to an export operation of the navigation data, obtaining the navigation data for the parcel fragment.

[0088] While the aforementioned implementation makes editing navigation data for plot fragments cumbersome and difficult to visualize, this implementation provides a plot navigation editor that allows for rapid editing and visual verification of the plot fragment's navigation data. Using the plot navigation editor, navigation data can be quickly edited and visually verified for each type of plot fragment. For each new plot fragment added to the game map, the editor can be used to edit the navigation data for that type of plot fragment. This editor can ultimately export navigation data files for loading during game runtime.

[0089] In the above implementation, you can freely select various types of plot fragments to edit navigation data. The plot navigation editor was designed with a table-based data baseline in mind, allowing Excel table data to be displayed in the editor as the sole data source. For example, plot types are currently broadly categorized as center plots, corner plots, edge plots, and so on. To expand these types, simply add plot fragment types to the Excel spreadsheet. The plot navigation editor can then filter the resources associated with each configuration based on this data and list them one by one for quick selection and editing by the editor.

[0090] Furthermore, in order to facilitate the adaptation of land parcels of different sizes, the land parcel navigation editor can also expand and reduce the size of the editable two-dimensional navigation data. Figure 6 In the figure, the X- and Y-direction numbers represent the total size of the navigation data for a particular plot fragment (i.e., the length and width of the two-dimensional navigation data). Based on the size of the plot grids, we can calculate that the navigation data for a particular plot fragment contains a total of n navigation grids. During editing, the coordinates of each grid are relative to the original coordinates of the current plot, i.e., the top-left corner (0, 0). When the game retrieves the navigation data for a particular plot fragment at runtime, the actual coordinates of each navigation grid in the navigation data for that plot fragment can be calculated using the plot coordinates sent by the server.

[0091] Furthermore, the plot navigation editor can also realize free editing of navigation points. For example, based on the characteristics of A* (a path planning algorithm), it can support game planners to freely edit the navigation grid. Currently, there is only one obstacle type, and the obstacle type mark in the editor is a certain color mark. The obstacle type is reserved in the program logic to facilitate subsequent expansion work. For example, Figure 6 The darker squares are navigation points marked as obstacle types.

[0092] Finally, the parcel navigation editor supports one-click saving and exporting as well as submission to version control. By integrating the concept of rapid management and verification into the parcel navigation editor, it is possible to save the design configuration, export the edited data, and submit to version control with one click, thus facilitating data export.

[0093] The above implementation method can greatly reduce the tediousness of editing navigation data of plot fragments by setting up a plot navigation editor to edit navigation data of various types of plot fragments, and realize the visualization of navigation data editing, thereby effectively improving the efficiency of generating navigation data of plot fragments.

[0094] 204. After all areas are generated, a complete target map is obtained based on the generated areas and the connection areas between the areas.

[0095] Specifically, after all regions have been generated, a complete target map can be obtained based on the generated regions and the connecting regions between them. The completion of all region generation can occur when the number of regions in the game map has reached a pre-configured number of level chains, allowing the last generated region to be used as the final region in the game map. Alternatively, the completion of all region generation can occur when there is no free space within the region boundary to generate the next region in the current region, thus directly using the current region as the final region in the game map. In this embodiment, both of these situations can serve as completion conditions for the target map. Through the above-mentioned method, a complete level chain can be generated from the starting region to the final region, thereby ensuring the integrity of the level and guaranteeing the player's gaming experience.

[0096] For example, Figure 7 A schematic diagram of a complete target map is shown. Referring to Figure 7, when the number of regions in the game map reaches the pre-configured number of level chains (six), the last generated region can be used as the ending region in the game map, and a complete target map can be generated from the starting region to the ending region. Alternatively, when it is detected that there is no free space within the region boundary for the next region, the current region can be used as the ending region in the game map, and a complete target map can be generated from the starting region to the ending region. Both of these methods ensure the integrity of the game map, thereby protecting the player's gaming experience.

[0097] In an optional embodiment, a complete target map can be obtained by the following method: during the generation of any region, a detection is made as to whether the region being generated overlaps with other regions already generated or exceeds a preset map boundary. If it is detected that the region being generated overlaps with other regions already generated or exceeds the map boundary, the generation direction of the region is changed, and the region is regenerated in the changed generation direction. If the regions generated in all the changed generation directions overlap with other regions already generated or exceed the map boundary, the last region generated is determined as the termination region, and based on the generated regions and the connecting regions between them, a complete target map is obtained.

[0098] In the above embodiment, after an area is generated, the next area or multiple areas that may exist can be generated according to the configuration, and the areas generated this time can be saved in the cache. If the result of the area generated this time is 0, but the level chain where the current area is located is not the last node, it means that the generation in the target direction has failed, and then the area will be generated again in other directions and cached. If the generation fails after trying all directions, it means that the position of the current area is the last level node due to the player's choice of the generation direction of the upper area or the size of the scene, then the current area can be set as the end area. Players can directly complete the current copy after completing the clearance conditions of the area, thereby ensuring the player experience and the integrity of the level.

[0099] In one optional implementation, when the number of generated regions reaches a preset number of level chains, a complete target map can be obtained based on the generated regions and the connecting regions between them. This ensures the integrity of the level chains and guarantees a better gaming experience for players.

[0100] In existing technologies, because each area in a game map is segmented from a single, continuous map, truly random scenes cannot be achieved, nor can they be infinitely varied. Furthermore, the richness of random scenes depends on the quantity of art assets produced, thus increasing production costs. This embodiment addresses these technical problems by first allowing players to intuitively experience significant map differences each time they enter the game through a random scene mechanism, thereby extending the game's lifespan. Second, it allows users to choose their own routes, greatly increasing the randomness of the gameplay experience and aligning more closely with the design direction of freely changing random scenes. Furthermore, this embodiment significantly reduces art asset production costs by using a fragmented area patching method. Finally, the method provided in this embodiment is an independent and complete approach applicable to scene generation for various gameplay modes, not limited to a single type of gameplay, thus possessing greater versatility.

[0101] The game map generation method provided in this embodiment can dynamically generate various level areas in the game map in real time during the game process. The position and direction of each area in the random scene can be automatically generated according to the player's operation method or in-game configuration data. The player can plan the route for each game, thus enriching the gameplay in the random scene and realizing a truly random scene. Furthermore, the terrain of each area in the game map can also be generated randomly, further improving the randomness of the game map and enriching the gameplay in the random scene. In addition, during the generation of each area in the game map, pathfinding data for each area can be generated simultaneously, thereby ensuring the playability of the game map. Through the above methods, players can more intuitively experience the different feelings brought by in-game randomness, and at the same time, users can better experience the fun brought by route strategy, thereby improving the user's game experience.

[0102] 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. Furthermore, the labels corresponding to each step in the above embodiments are only for identification purposes and are not intended to limit the order of execution of the steps. The order of execution of the steps in each embodiment can be set according to the actual situation.

[0103] Further, as Figures 1 to 7 The specific implementation of the method shown in this embodiment provides a device for generating a game map, such as Figure 8 As shown, the device includes: a starting area generation module 31 and a new area generation module 32, wherein:

[0104] A starting area generating module 31 may be configured to obtain map configuration data and generate a starting area based on the map configuration data;

[0105] The new area generation module 32 can be used to generate a next area within a preset range of the current area in response to the virtual character completing a preset game event in the current area after the virtual character enters the starting area, and generate a connection area connecting the next area and the current area to obtain a target map; wherein the direction of the next area relative to the current area is determined based on the map configuration data or the game event completed by the virtual character in the current area.

[0106] In a specific application scenario, the map configuration data includes the coordinate position of the starting area; the starting area generation module 31 can be specifically used to generate at least one plot fragment at the coordinate position of the starting area, and splice the at least one plot fragment to obtain a central area; randomly splice multiple plot fragments in multiple expansion directions of the central area to obtain an extended area; generate non-interactive edge fragments on the boundary of the extended area, and use the edge fragments to close the extended area to obtain the starting area.

[0107] In a specific application scenario, the new area generation module 32 can be specifically used to determine the direction of the next area relative to the current area based on the map configuration data or the game events completed by the virtual character in the current area; determine the coordinate position of the next area within a preset range of the current area based on the direction of the next area relative to the current area and the coordinate position of the current area; generate at least one land fragment at the coordinate position of the next area, and splice the at least one land fragment to obtain a central area; randomly splice multiple land fragments in multiple expansion directions of the central area to obtain an extended area; generate non-interactive edging fragments on the boundary of the extended area, and use the edging fragments to enclose the extended area to obtain the next area.

[0108] In a specific application scenario, the new area generation module 32 can be specifically used to determine multiple expansion directions of the central area based on the shape of the central area; poll each expansion direction of the central area, and generate land fragments in each expansion direction of the central area in sequence according to a preset fragment generation probability, wherein the generated land fragments do not overlap with other generated areas and do not exceed the preset map boundary; when the number of polling times of each of the expansion directions reaches a preset polling number threshold, stop generating the land fragments to obtain the expanded area.

[0109] In a specific application scenario, the new area generation module 32 can be specifically used to determine multiple expansion directions of the central area based on the shape of the central area; generate plot fragments in sequence in each expansion direction of the central area according to the preset fragment generation probability and fragment generation weight, wherein the generated plot fragments do not overlap with other generated areas and do not exceed the preset map boundary; based on the generation results of the plot fragments in each of the expansion directions, update the fragment generation weights of each of the expansion directions, and based on the fragment generation probability of each of the expansion directions and the updated fragment generation weights, generate plot fragments in sequence in each expansion direction of the central area until the number of the plot fragments reaches a preset plot fragment number threshold, thereby obtaining the expansion area.

[0110] In a specific application scenario, the new area generation module 32 can be specifically used to read the direction data corresponding to the level chain sequence in the map configuration data based on the level chain sequence of the next area; if the direction data is read, the direction of the next area relative to the current area is determined based on the direction data; if the direction data is not read, the direction of the next area relative to the current area is determined based on the direction corresponding to the game event completed by the virtual character in the current area.

[0111] In a specific application scenario, the new area generation module 32 can be specifically used to read out the estimated area corresponding to the level chain sequence of the next area in the map configuration data based on the level chain sequence of the next area; determine the selected range of the coordinate position of the next area based on the direction of the next area relative to the current area and the coordinate position of the current area; determine the pre-selected coordinate position of the next area based on the selected range of the coordinate position of the next area and the estimated area; if it is detected that the pre-selected coordinate position does not overlap with other generated areas and does not exceed the preset map boundary, then the pre-selected coordinate position is determined as the coordinate position of the next area.

[0112] In a specific application scenario, the new area generation module 32 can be specifically used to determine the starting plot fragment in the current area and the end plot fragment in the next area based on the relative position of the next area and the current area; generate connecting fragments starting from the starting plot fragment according to the direction of the starting plot fragment relative to the end plot fragment until the connecting fragment is connected to the end plot fragment; and sequentially generate widening fragments on the connecting fragment between the starting plot fragment and the end plot fragment to obtain the connecting area connecting the next area and the current area.

[0113] In specific application scenarios, the new area generation module 32 can also be used to monitor the refresh and creation operations of each area in the target map in real time; if any area is detected to be refreshed or created, the land parcel information of the refreshed or created area is obtained and stored in the cache space.

[0114] In specific application scenarios, such as Figure 4 As shown, the device also includes a regional dynamic update module 33, which can be used to obtain the update type of each plot fragment in the current area and the next area; according to the update type of each plot fragment, an update operation is performed on each plot fragment, so that the plot fragments connected to the current area and the next area and the connected area are updated to interactive plot fragments, wherein the update operation includes an addition operation and / or a deletion operation.

[0115] In specific application scenarios, such as Figure 4 As shown, the device also includes a regional pathfinding data generation module 34, which can be used to obtain pathfinding template data corresponding to the newly generated area after any area is generated; obtain pathfinding data of each land fragment in the newly generated area, and obtain pathfinding data of the newly generated area based on the pathfinding data of each land fragment; overlay the pathfinding data of the newly generated area on the pathfinding template data, and use the overlaid pathfinding template data as navigation data of the newly generated area; perform pathfinding operations based on the navigation data of the newly generated area, and restore the navigation data to the pathfinding template data after the pathfinding operation.

[0116] In a specific application scenario, the pathfinding data of the plot fragments is pre-created through a plot navigation editor; the pathfinding data generation module 34 can also be used to display a plot information list in response to an import operation of plot information, wherein the plot information list includes multiple types of plot fragments; in response to a selection operation of the plot fragment, the navigation grid occupied by the plot fragment is displayed; the navigation data of the plot fragment is generated through a preset pathfinding algorithm; and in response to an export operation of the navigation data, the navigation data of the plot fragment is obtained.

[0117] In specific application scenarios, such as Figure 4As shown, the device also includes a target map generation module 35, which can be used to detect whether the area being generated overlaps with other areas that have been generated or exceeds a preset map boundary during the generation process of any area; if it is detected that the area being generated overlaps with other areas that have been generated or exceeds the map boundary, the generation direction of the area is changed, and the area is regenerated in the changed generation direction; if the areas generated by all the changed generation directions overlap with other areas that have been generated or exceed the map boundary, the last area generated is determined as the termination area, and a complete target map is obtained based on the generated areas and the connection areas between the areas.

[0118] In specific application scenarios, the target map module 35 can also be used to obtain a complete target map based on the generated regions and the connecting regions between them when the number of generated regions reaches the preset number of checkpoint chains.

[0119] It should be noted that other corresponding descriptions of the functional units involved in the game map generation device provided in this embodiment can be found in [reference needed]. Figures 1 to 7 The corresponding description in will not be repeated here.

[0120] Based on the above Figures 1 to 7 Accordingly, this embodiment also provides a storage medium storing a computer program that, when executed by a processor, implements the above-described method. Figures 1 to 7 The method for generating the game map shown.

[0121] Based on this understanding, the technical solution of this application can be embodied in the form of a software product. The software product to be identified can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, or portable hard drive), including several instructions to cause a computer device (such as a personal computer, server, or network device) to execute the methods described in the various implementation scenarios of this application.

[0122] Based on the above Figures 1 to 7 The method shown, and Figure 8 and Figure 9 The embodiment of the device for generating a game map shown in the figure, in order to achieve the above purpose, this embodiment also provides a computer device for generating a game map, which can be a personal computer, a server, a smart phone, a tablet computer, a smart watch, or other network devices, etc. The computer device includes a storage medium and a processor; the storage medium is used to store a computer program and an operating system; the processor is used to execute the computer program to achieve the above Figures 1 to 7 The method shown.

[0123] Optionally, the computer device may further include an internal memory, a communication interface, a network interface, a camera, a radio frequency (RF) circuit, a sensor, an audio circuit, a Wi-Fi module, a display, an input device such as a keyboard, etc. Optionally, the communication interface may further include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (such as a Wi-Fi interface), etc.

[0124] Those skilled in the art will understand that the computer device structure for identifying an operation action provided in this embodiment does not constitute a limitation on the computer device, and may include more or fewer components, or a combination of certain components, or different component arrangements.

[0125] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages the computer device hardware and the software resources to be identified, supporting the execution of the information processing program and other software and / or programs to be identified. The network communication module is used to enable communication between components within the storage medium and with other hardware and software in the information processing computer device.

[0126] Through the description of the above implementation methods, those skilled in the art can clearly understand that the present application can be implemented by means of software plus the necessary general hardware platform, or by hardware. By applying the technical solution of the present application, the map configuration data is first obtained, and based on the map configuration data, a starting area is generated. Then, after the virtual character enters the starting area, in response to the virtual character completing a preset game event in the current area, the next area is generated within the preset range of the current area, and a connection area is generated connecting the next area and the current area, so as to obtain the target map, wherein the direction of the next area relative to the current area can be determined based on the map configuration data or the game event completed by the virtual character in the current area. Compared with the prior art, the above method can generate each level area in the game map in real time and dynamically during the game process, thereby enriching the gameplay in the random scene, realizing a truly random scene, and improving the user's gaming experience.

[0127] Those skilled in the art will understand that the accompanying drawings are only schematic diagrams of a preferred implementation scenario, and the modules or processes in the accompanying drawings are not necessarily required to implement the present application. Those skilled in the art will understand that the modules in the devices in the implementation scenario can be distributed in the devices of the implementation scenario according to the implementation scenario description, or can be changed accordingly and located in one or more devices different from the implementation scenario. The modules of the above-mentioned implementation scenario can be combined into one module, or can be further split into multiple sub-modules.

[0128] The above sequence of embodiments is for descriptive purposes only and does not represent the superiority or inferiority of any particular implementation scenario. The above disclosures are merely a few specific implementation scenarios of this application; however, this application is not limited thereto, and any variations conceived by those skilled in the art should fall within the protection scope of this application.

Claims

1. A method for generating a game map, characterized in that: The method comprises: Acquire map configuration data, and generate a starting area based on the map configuration data; After the virtual character enters the starting area, in response to the virtual character completing a preset game event in the current area, a next area is generated within a preset range of the current area, and a connection area connecting the next area and the current area is generated to obtain a target map; The direction of the next area relative to the current area is determined based on the map configuration data or a game event completed by the virtual character in the current area.

2. The method according to claim 1, characterized in that The map configuration data includes the coordinate position of the starting area; and generating the starting area based on the map configuration data includes: At the coordinate position of the starting area, at least one land fragment is generated, and the at least one land fragment is spliced ​​to obtain a central area; randomly splicing a plurality of plot fragments in a plurality of expansion directions of the central area to obtain an expansion area; Non-interactive edge fragments are generated on the boundary of the extended area, and the extended area is closed by the edge fragments to obtain the starting area.

3. The method according to claim 1, characterized in that The generating of the next area within a preset range of the current area includes: Determining the direction of the next area relative to the current area based on the map configuration data or the game events completed by the virtual character in the current area; Determining the coordinate position of the next area within a preset range of the current area based on the direction of the next area relative to the current area and the coordinate position of the current area; At the coordinate position of the next area, generating at least one land block fragment, and splicing the at least one land block fragment to obtain a central area; randomly splicing a plurality of plot fragments in a plurality of expansion directions of the central area to obtain an expansion area; Non-interactive edge fragments are generated on the boundary of the extended area, and the extended area is closed by the edge fragments to obtain the next area.

4. The method according to claim 2 or 3, characterized in that: The multiple plot fragments are randomly spliced ​​in multiple expansion directions of the central area to obtain an expansion area, including: Based on the shape of the central area, determining a plurality of expansion directions of the central area; Polling each expansion direction of the central area, and sequentially generating plot fragments in each expansion direction of the central area according to a preset fragment generation probability, wherein the generated plot fragments do not overlap with other generated areas and do not exceed a preset map boundary; When the polling times in each of the expansion directions reaches a preset polling times threshold, the generation of the land fragments is stopped to obtain the expansion area.

5. The method according to claim 2 or 3, characterized in that: The step of randomly splicing a plurality of land plot fragments in a plurality of expansion directions of the central area to obtain an expansion area further comprises: Based on the shape of the central area, determining a plurality of expansion directions of the central area; According to the preset fragment generation probability and fragment generation weight, the land fragments are sequentially generated in each expansion direction of the central area, wherein the generated land fragments do not overlap with other generated areas and do not exceed the preset map boundary; Based on the generation results of the plot fragments in each of the expansion directions, the fragment generation weights of each of the expansion directions are updated, and based on the fragment generation probabilities of each of the expansion directions and the updated fragment generation weights, plot fragments are generated in sequence in each of the expansion directions of the central area until the number of the plot fragments reaches a preset plot fragment number threshold, thereby obtaining the expansion area.

6. The method according to claim 3, characterized in that The determining the direction of the next area relative to the current area based on the map configuration data or the game event completed by the virtual character in the current area includes: Based on the level chain sequence of the next area, reading direction data corresponding to the level chain sequence in the map configuration data; If the direction data is read, determining the direction of the next area relative to the current area based on the direction data; If the direction data is not read, the direction of the next area relative to the current area is determined based on the direction corresponding to the game event completed by the virtual character in the current area.

7. The method according to claim 3, characterized in that The determining the coordinate position of the next area within a preset range of the current area based on the direction of the next area relative to the current area and the coordinate position of the current area includes: Based on the level chain sequence of the next area, reading the estimated area corresponding to the level chain sequence in the map configuration data; Determining a selected range of coordinate positions of the next region based on a direction of the next region relative to the current region and a coordinate position of the current region; Determining a preselected coordinate position of the next area based on the selected range of the coordinate position of the next area and the estimated area; If it is detected that the pre-selected coordinate position does not overlap with other generated areas and does not exceed the preset map boundary, the pre-selected coordinate position is determined as the coordinate position of the next area.

8. The method according to claim 1, characterized in that The step of generating a connection region connecting the next region and the current region includes: Based on the relative position of the next region and the current region, a starting plot fragment is determined in the current region, and a terminal plot fragment is determined in the next region; According to the direction of the starting plot fragment relative to the end plot fragment, starting from the starting plot fragment, a connection fragment is generated until the connection fragment is connected to the end plot fragment; Widening fragments are sequentially generated on the connection fragments between the starting plot fragment and the end plot fragment to obtain the connection area connecting the next area and the current area.

9. The method according to claim 1 or 8, characterized in that: After generating a connection area connecting the next area and the current area, the method further includes: Get the update type of each plot fragment in the current region and the next region; According to the update type of each of the plot fragments, an update operation is performed on each of the plot fragments so that the plot fragments connected to the current area and the next area with the connection area are updated to interactive plot fragments, wherein the update operation includes an add operation and / or a delete operation.

10. The method according to claim 1, characterized in that The method further comprises: Monitor the refresh operation and creation operation of each area in the target map in real time; If it is monitored that any area is refreshed or created, the land parcel information of the refreshed or created area is obtained, and the land parcel information of the refreshed or created area is stored in the cache space.

11. The method according to claim 1, characterized in that: The method further comprises: During the generation of any area, check whether the area being generated overlaps with other areas that have been generated or exceeds the preset map boundary; If it is detected that the area being generated overlaps with other areas that have been generated or exceeds the map boundary, the generation direction of the area is changed, and the area is regenerated in the changed generation direction; If the areas generated by all the replaced generation directions overlap with other generated areas or exceed the map boundary, the last generated area is determined as the termination area, and a complete target map is obtained based on the generated areas and the connection areas between the areas.

12. The method according to claim 1, characterized in that The method further comprises: When the number of generated areas reaches the preset number of level chains, a complete target map is obtained based on the generated areas and the connection areas between the areas.

13. The method according to claim 1, characterized in that The method further comprises: After any area is generated, obtain the pathfinding template data corresponding to the newly generated area; Acquire pathfinding data of each land parcel fragment in the newly generated area, and obtain pathfinding data of the newly generated area according to the pathfinding data of each land parcel fragment; Overlaying the path-finding data of the newly generated area onto the path-finding template data, and using the overlaid path-finding template data as the navigation data of the newly generated area; A pathfinding operation is performed based on the navigation data of the newly generated area, and after the pathfinding operation, the navigation data is restored to the pathfinding template data.

14. The method according to claim 13, characterized in that The path finding data of the plot fragment is pre-created by a plot navigation editor; the method of creating the path finding data of the plot fragment by the plot navigation editor comprises: In response to the import operation of the plot information, displaying a plot information list, wherein the plot information list includes multiple types of plot fragments; In response to a selection operation of the land fragment, displaying a navigation grid occupied by the land fragment; Generate navigation data of the land fragments through a preset pathfinding algorithm; In response to the exporting operation of the navigation data, the navigation data of the land parcel fragment is obtained.

15. A device for generating a game map, characterized in that: The device comprises: A starting area generation module, used to obtain map configuration data and generate a starting area based on the map configuration data; A new area generation module is used to generate a next area within a preset range of the current area in response to the virtual character completing a preset game event in the current area after the virtual character enters the starting area, and generate a connection area connecting the next area and the current area to obtain a target map; wherein the direction of the next area relative to the current area is determined based on the map configuration data or the game event completed by the virtual character in the current area.

16. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 14 are implemented.

17. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 14 are implemented.

Citation Information

Cited By

  • Dynamic updating method for map boundary of cloud game

    CN120114846A

  • Game map generation method, system and equipment considering map resources

    CN120285563A

  • A game map generation method, system and device considering map resources

    CN120285563B