A method, device, storage medium and computing device for creating a game copy
By establishing data references when creating game copies and creating copies based on the references, the problem of game copies occupying a large amount of memory is solved, performance and efficiency are improved, and efficient memory management is achieved.
Patent Information
- Application Number
- CN202011559924.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-25
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2040-12-25
AI Technical Summary
The existing technology requires an all-round copy of the source map data when creating a game copy, causing the game copy to occupy a large amount of memory, and unnecessary data copying reduces performance and efficiency.
By obtaining the source map data of the game map, establishing a data reference, and creating a game copy based on the data reference and the different map data required for the game copy to be created, avoiding full copying of the source map data and only reading the corresponding source map data when needed. .
It effectively reduces the memory space occupied by game copies and improves the performance and efficiency of creating game copies. Tests show that it can reduce the memory space occupied by more than 80%.
Smart Images

Figure CN112619153B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of game data processing technology, and in particular to a method, device, storage medium and computing equipment for creating a game copy. Background Art
[0002] A game copy is a part of the virtual world in the game, consisting of a set of independent map scenes. Only players and their teams can enter the same copy. Players in a copy can explore, adventure or complete tasks without interference from other players. Different players or teams cannot see each other. In the prior art, when creating a game copy, the source map in the game needs to be copied. This copy is comprehensive, including the copy of the source map's pathfinding grid, height map, convex hull, monster spawning configuration and other resource data, such as Figure 1 The game copies (copy 1, copy 2 ... copy N) shown in the figure all copy the resource data of the source map. Therefore, the existing scheme of creating a new copy is equivalent to regenerating a map object.
[0003] However, because all game copies are full copies of all data from the source map, game copies occupy a large amount of memory. If there are a large number of game copies at the same time, it is easy to cause system memory shortage. For example, a full copy of a map occupies about 4M of memory. If 8,000 copies are created at the same time, 4M*8000=32G of memory is required. In addition, although each game copy needs to copy all source map data when it is created, some copied source map data may not be used during the operation of this copy, which makes the performance of the created game copy low and greatly wastes memory space. Summary of the invention
[0004] In view of the above problems, the present invention is proposed to provide a game copy creation method, apparatus, storage medium and computing device that overcome the above problems or at least partially solve the above problems, which can avoid the situation where all source map data is copied to the game copy while some source map data is not used subsequently, effectively improves the performance of the created game copy, and can save the memory space occupied by the game copy, thereby improving the efficiency of creating the game copy.
[0005] According to one aspect of an embodiment of the present invention, a method for creating a game copy is provided, the method comprising:
[0006] Acquire source map data of the game map, and establish a data reference for the source map data;
[0007] In response to a game copy creation instruction, obtaining a data reference of the source map data and map data different from the source map data and required for creating the game copy;
[0008] A game copy is created based on the data reference and map data different from the source map data; wherein, when the data reference in the game copy is called, the source map data corresponding to the data reference is read.
[0009] Optionally, the source map data includes at least one of grid data, height map data, and convex hull data.
[0010] Optionally, obtaining map data different from the source map data and required for creating the game copy includes:
[0011] Determining data references to source map data associated with map data required for the game copy to be created;
[0012] Acquire source map data corresponding to the determined data reference from the source map data;
[0013] Modifying the acquired source map data and saving the modified map data locally;
[0014] The changed map data is map data that is different from the source map data and is required for creating a game copy.
[0015] Optionally, if the source map data includes grid data, the step of determining a data reference of the source map data related to the map data required for the game copy to be created includes:
[0016] Obtaining grid coordinate information of grid data related to map data required for creating a game copy;
[0017] A data reference of source map data corresponding to the corresponding grid data is determined based on the grid coordinate information, wherein the data reference of the source map data corresponds to a plurality of grid coordinate information.
[0018] Optionally, after creating a game copy based on the data reference and the map data different from the source map data, the method further includes:
[0019] In response to an instruction to modify the map data referenced by the game copy, determining a data reference of the map data to be modified;
[0020] Acquire source map data corresponding to the determined data reference from the source map data;
[0021] The acquired source map data is modified, and the modified map data is saved locally.
[0022] Optionally, establishing a data reference for the source map data includes: dividing the source map data into different map data blocks, and establishing a data reference for each map data block;
[0023] Acquiring source map data corresponding to the determined data reference from the source map data, modifying the acquired source map data, and saving the modified map data locally includes: acquiring a map data block corresponding to the determined data reference from the source map data, modifying the map data in the acquired map data block, and saving the entire map data block to which the modified map data belongs locally.
[0024] Optionally, after dividing the source map data into different map data blocks, the method further includes: creating a block array for the map data blocks in the source map data, wherein the block array includes a plurality of data units, and one data unit is used to store a corresponding map data block;
[0025] Modifying the acquired map data in the map data block and saving the entire map data block to which the modified map data belongs locally includes: modifying the acquired map data in the map data block and saving the entire map data block to which the modified map data belongs to a corresponding data unit.
[0026] Optionally, the method further comprises:
[0027] In response to an instruction to read map data in the game copy, determining whether the local device contains the map data to be read;
[0028] If yes, directly read the to-be-read map data in the game copy;
[0029] If not, the data reference of the map data to be read is searched, and the map data to be read is read from the source map data by calling the found data reference.
[0030] According to another aspect of an embodiment of the present invention, there is also provided a game copy creation device, comprising:
[0031] An establishment module, adapted to obtain source map data of a game map and establish a data reference for the source map data;
[0032] An acquisition module, adapted to acquire, in response to a game copy creation instruction, a data reference of the source map data and map data different from the source map data required for creating a game copy;
[0033] A creation module is adapted to create a game copy based on the data reference and map data different from the source map data; wherein, when the data reference in the game copy is called, the source map data corresponding to the data reference is read.
[0034] According to another aspect of an embodiment of the present invention, a computer storage medium is provided, wherein the computer storage medium stores a computer program code, and when the computer program code is executed on a computing device, the computing device is caused to execute the game copy creation method of any of the above embodiments.
[0035] According to another aspect of an embodiment of the present invention, a computing device is provided, comprising: a processor; a memory storing computer program code; when the computer program code is executed by the processor, the computing device executes the game copy creation method of any of the above embodiments.
[0036] The embodiment of the present invention establishes a data reference for the source map data. When creating a game copy, by obtaining the data reference of the source map data and obtaining the map data different from the source map data required for the game copy to be created, the game copy can be created based on the data reference and the map data different from the source map data, and then the corresponding source map data can be easily read by calling the data reference when the game copy is subsequently run. Therefore, when creating a game copy, the embodiment of the present invention does not need to copy all the map data in the source map data, but creates the game copy based on the data reference of the source map data and the map data different from the source map data required for the game copy to be created, which can avoid the situation where all the source map data is copied to the game copy but some of the source map data is not used later, effectively improving the performance of the created game copy. Moreover, the embodiment of the present invention also saves the memory space occupied by the game copy and improves the efficiency of creating the game copy. Through test experiments, it is found that the game copy created by the embodiment of the present invention can reduce more than 80% of the memory space.
[0037] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below.
[0038] Based on the following detailed description of specific embodiments of the present invention in conjunction with the accompanying drawings, those skilled in the art will become more aware of the above and other objects, advantages and features of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. 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:
[0040] Figure 1 A schematic diagram showing the layout of game resources for creating a game copy in the prior art is shown;
[0041] Figure 2 A schematic diagram showing a process flow of a method for creating a game copy according to an embodiment of the present invention is shown;
[0042] Figure 3 A schematic diagram showing the layout of game resources for creating a game copy according to an embodiment of the present invention;
[0043] Figure 4 A schematic diagram showing the structure of a block array created for a map data block according to an embodiment of the present invention is shown;
[0044] Figure 5 A schematic diagram showing a storage structure of a changed map data block in a block array according to an embodiment of the present invention is shown;
[0045] Figure 6 A schematic diagram showing the structure of a game copy creation device according to an embodiment of the present invention;
[0046] Figure 7 A schematic diagram showing the structure of a game copy creation device according to another embodiment of the present invention;
[0047] Figure 8 A schematic diagram showing the structure of a game copy creation device according to another embodiment of the present invention is shown;
[0048] Fig. 9 A schematic structural diagram of a game copy creation device according to another embodiment of the present invention is shown. DETAILED DESCRIPTION
[0049] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only embodiments of a part of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work should fall within the scope of protection of the present application. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.
[0050] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0051] In order to solve the above technical problems, an embodiment of the present invention provides a method for creating a game copy. Figure 2 A schematic diagram showing a process flow of a method for creating a game copy according to an embodiment of the present invention is shown. Figure 2 , the game copy creation method may include steps S202 to S206.
[0052] Step S202, obtaining source map data of the game map, and establishing a data reference for the source map data.
[0053] Step S204, in response to the game copy creation instruction, obtaining a data reference of the source map data and map data different from the source map data and required for creating the game copy.
[0054] The game copy of the embodiment of the present invention is connected to the map data of the source map through the data reference of the source map data, and the data reference can be used as an index of the source map data. Therefore, the source map data corresponding to the data reference can be easily read by calling the data reference later.
[0055] Step S206, creating a game copy based on the data reference and map data different from the source map data, wherein the source map data corresponding to the data reference is read when the data reference in the game copy is called.
[0056] The embodiment of the present invention establishes a data reference for the source map data. When creating a game copy, by obtaining the data reference of the source map data and obtaining the map data different from the source map data required for the game copy to be created, the game copy can be created based on the data reference and the map data different from the source map data, and then the corresponding source map data can be easily read by calling the data reference when the game copy is subsequently run. Therefore, when creating a game copy, the embodiment of the present invention does not need to copy all the map data in the source map data, but creates the game copy based on the data reference of the source map data and the map data different from the source map data required for the game copy to be created, which can avoid the situation where all the source map data is copied to the game copy but some of the source map data is not used later, effectively improving the performance of the created game copy. Moreover, the embodiment of the present invention also saves the memory space occupied by the game copy and improves the efficiency of creating the game copy. Through test experiments, it is found that the game copy created by the embodiment of the present invention can reduce more than 80% of the memory space.
[0057] The source map data of the embodiment of the present invention may include at least one map data of grid data, height map data, convex hull data, etc. Among them, grid data is a structural expression used to describe map graphics. In the memory usage of the game copy map, grid data occupies more memory, and the larger the game map, the greater the proportion of grid data in the game map. In most cases, the grid data will not be easily changed. Height map data is a structural expression that describes the height of map points, and height map data will not be easily changed in most cases. Convex hull data is a structural expression used to describe the collision volume of still objects on the map, and convex hull data will not be easily changed in most cases. Of course, the source map data also includes other types of map data, which are not specifically limited in the embodiment of the present application.
[0058] When creating a game copy, the embodiment of the present invention does not need to copy all the map data in the source map data, but instead copies the data reference of the source map data, that is, different game copies created can share the source map data by calling data references, especially for grid data that occupies more memory, which can effectively improve the game copy creation performance and save the game copy from occupying a large amount of memory.
[0059] In one embodiment of the present invention, the source map data corresponds to multiple data references, and the game copy can be created based on all the data references of the source map data. When executing step S202, in response to the game copy creation instruction, each data reference of the source map data can be obtained, that is, all the data references of the source map data can be copied. Then, the game copy is subsequently created based on all the obtained data references.
[0060] In another embodiment of the present invention, if it is clear that the game copy to be created needs to use a certain portion of the map data in the source map data, then the game copy can also be created based on the data reference of the source map data corresponding to the map data needed by the game copy to be created, that is, the data reference of the portion of the map data needed by the game copy to be created contained in the source map data is copied. Then, the game copy can be created based on the obtained partial data reference later.
[0061] Specifically, when executing step S202, in response to the creation instruction of the game copy, the target map data required for the game copy to be created is first determined. Then, the data reference of the target map data contained in the source map data is obtained. In this embodiment, the target map data is the map data used by the game copy to be created. For example, if the target map data is the map data of one or more map scenes contained in the source map data used in the game copy to be created, then the data reference of the source map data corresponding to the corresponding map scene can be obtained. Then, the game copy is subsequently created based on the data reference of the source map data corresponding to the corresponding map scene obtained.
[0062] The embodiment of the present invention obtains data references of source map data corresponding to target map data used by the game copy to be created from the source map data, and creates the game copy based on the obtained partial data references, thereby further saving the memory space occupied by the game copy and improving the efficiency of creating the game copy.
[0063] Continuing to refer to step S202 above, in one embodiment of the present invention, when obtaining map data different from the source map data required for the game copy to be created, the map data related to the source map data can be changed to obtain the map data required for the game copy to be created. First, determine the data reference of the source map data related to the map data required for the game copy to be created. Then, obtain the source map data corresponding to the determined data reference from the source map data. Then, make data changes to the obtained source map data, and save the changed map data locally. The changed map data here is the map data different from the source map data required for the game copy to be created, and the source map data can be changed according to the actual needs of the game copy to be created.
[0064] The game copy of the embodiment of the present invention is connected to the source map data through the data reference of the source map data, and the data reference can be used as the index information of the source map data. Therefore, the source map data corresponding to the data reference can be obtained from the source map data according to the data reference. Generally, the map data different from the source map data required by the game copy can be obtained by changing the source map data, so the changed map data can be saved locally and used as the local map data of the game copy.
[0065] In an optional embodiment, if the source map data includes grid data, and the data reference of the source map data corresponds to multiple grid coordinate information. When determining the data reference of the source map data related to the map data required for the game copy to be created, the grid coordinate information of the grid data related to the map data required for the game copy to be created can be first obtained, and then the data reference of the source map data corresponding to the corresponding grid data can be determined based on the grid coordinate information.
[0066] In one embodiment of the present invention, after executing step S206 to create a game copy based on data references and map data different from the source map data, if it is necessary to change the source map data referenced by the game copy, a write-delayed partial copy mechanism can also be used for the source map data. After the source map data referenced by the game copy is changed, the changed map data is directly saved to the local server running the game copy, that is, part of the map data in the source map data is delayed and copied to the game copy. Specifically, in response to a change instruction for the map data referenced by the game copy, a data reference of the map data to be changed is determined. Then, the source map data corresponding to the determined data reference is obtained from the source map data. Then, the data of the obtained source map data is changed, and the changed map data is saved locally.
[0067] The embodiment of the present invention is Figure 3 Take the game copy creation process as an example to introduce it.
[0068] The source map data in the game map of this embodiment includes grid data, height map data, convex hull data, etc. For example, a grid data reference of the grid data can be established and saved for the grid data. In response to the game copy creation instruction, the grid data reference can be obtained from the source map and copied to the game copy. For the grid data required in the game copy that is different from the grid data in the source map, after the grid data of the source map is changed, the changed grid data can be saved locally on the server where the game copy is located. Thus, a game copy is created based on the copied grid data reference and the map data saved locally.
[0069] The game copy created by this embodiment can be Figure 3 In the game, there are copies 1, 2, ... N, and multiple copies of the game can be created at the same time. Since the multiple copies of the game do not need to copy all the source map data, but only copy the data reference of the source map data and part of the map data, creating multiple copies of the game at the same time will not take up a lot of memory space.
[0070] In addition, when creating a game copy, other map-related data may also be copied to the game copy, such as a monster controller, a monster control interface, etc. The monster controller is a logic unit for controlling the birth and death of monsters on the map. The monster control interface may be an action interface for controlling the behavior of monsters. The present invention does not specifically limit the data used to create a game copy.
[0071] In the embodiment of the present invention, if multiple game copies are created at the same time, multiple game copies can also be created by creating multiple working threads. For example, a game copy can be created by one thread, and the data reference of the source map data can be copied by the corresponding thread. The embodiment of the present invention uses multiple working threads to create game copies, so that the creation processes of the game copies do not affect each other, and the source map data can be shared at the same time, thereby effectively improving the creation efficiency of the game copies.
[0072] In addition, the game copy created by the embodiment of the present invention can be a stand-alone copy, a team copy, a field map copy, etc., wherein a stand-alone copy only allows one player to enter. A team copy is a team formed by multiple people to form a camp. This type of gameplay requires synchronization of the status of other players, monster behavior, etc. The field map copy will calculate how many players a scene can carry based on the specific battle server pressure, and the copy will not be reset after the player leaves the copy. The implementation of the present invention does not specifically limit the type of game copy created.
[0073] In the embodiment of the present invention, when establishing data references for source map data, the source map data may also be divided into different map data blocks, thereby establishing a data reference for each map data block.
[0074] In this embodiment, when the source map data corresponding to the determined data reference is obtained from the source map data, the map data block corresponding to the determined data reference can be obtained from the source map data, and then the map data in the obtained map data block is changed, and the entire map data block to which the changed map data belongs is saved locally. Therefore, the embodiment of the present invention copies the changed map data to the game copy in units of map data blocks.
[0075] In a specific embodiment, the source map data includes grid data, and the map grid of the entire source map is divided into blocks, which are divided into different grid blocks. For example, the grid size of the entire source map is 1024*1024, and the size of the grid block to be divided is set to 128*128, so 1024*1024 / (128*128)=64 grid blocks can be divided. In addition, each grid block has a corresponding data reference (i.e., a block index), each grid block includes multiple grids, each grid has grid coordinates, and a data reference of a grid block can correspond to multiple grid coordinates.
[0076] In this embodiment, if it is necessary to change a certain grid in the grid block referenced by the game copy, the grid coordinates of the grid to be changed can be obtained first, and then the block index corresponding to the grid coordinates can be found, so that the corresponding grid block can be determined according to the block index, and then the entire grid block to which the grid to be changed belongs can be copied to the game copy, and the grid data of the grid to be changed can be changed in the game copy according to the coordinates of the grid to be changed.
[0077] In an optional embodiment of the present invention, after dividing the source map data into different map data blocks, a block array may be created for the map data blocks in the source map data, and the created block array may include multiple data units, one data unit being used to store a corresponding map data block. Further, after the map data in the acquired map data block is changed, the entire map data block to which the changed map data belongs may be saved in the corresponding data unit.
[0078] Assume that the source map grid size is 1024*1024, and the divided grid block size is 128*128, that is, the map grid of the source map is divided into 64 grid blocks. Figure 4 As shown, the data unit of each grid block in the block array initially points to NULL. When a grid needs to be changed, if the grid coordinates of the grid to be changed are (m, n), the block index can be calculated by the formula (n / 128)*(1024 / 128)+m / 128. Of course, the block index can also be obtained by bit operation, which is not specifically limited in the embodiment of the present invention. Then, the entire grid block corresponding to the block index is copied to the corresponding data unit in the game copy, and the grid data of the grid to be changed is changed in the game copy according to the coordinates (m, n) of the grid to be changed. The grid data storage structure after the change is as follows: Figure 5 shown.
[0079] In the embodiment of the present invention, when running a game copy, if the map data of the game copy is to be read, the locally stored map data can be directly read, and the referenced source map data can be read by calling a data reference.
[0080] Specifically, in response to an instruction to read map data in a game copy, it is first determined whether the local server where the game copy is located contains the map data to be read. If the local server where the game copy is located contains the map data to be read, the map data to be read is directly read. If the local server where the game copy is located does not contain the map data to be read, a data reference of the map data to be read may be first searched, and then the map data to be read is read from the source map data by calling the found data reference.
[0081] For example, in response to a read instruction for grid data in a game copy, it is determined whether the local server where the game copy is located contains the grid data to be read. If the local server where the game copy is located does not contain the grid data to be read, the grid coordinates of the grid data to be read can be obtained, and then the data reference of the grid block corresponding to the grid coordinates is determined, and then the data reference is called to read the corresponding grid data from the source map data. Therefore, the implementation of the present invention can conveniently read the grid data in the source map data through the grid coordinates and data references, thereby ensuring a high map data reading efficiency on the basis of improving the performance of the game copy and saving the memory space occupied by the game copy.
[0082] Based on the same inventive concept, an embodiment of the present invention also provides a game copy creation device. For implementing the above embodiments and preferred implementations, what has been described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0083] Figure 6 A schematic diagram of the structure of a game copy creation device according to an embodiment of the present invention is shown. Figure 6 The game copy creation device includes a creation module 610, an acquisition module 620 and a first creation module 630.
[0084] The establishing module 610 is adapted to obtain source map data of the game map and establish a data reference for the source map data.
[0085] The acquisition module 620 is adapted to acquire data references of source map data and map data different from the source map data required for creating the game copy in response to a game copy creation instruction.
[0086] The first creation module 630 is adapted to create a game copy based on a data reference and map data different from the source map data; wherein, when the data reference in the game copy is called, the source map data corresponding to the data reference is read.
[0087] In an embodiment of the present invention, the source map data includes at least one map data of grid data, height map data, convex hull data, etc.
[0088] In one embodiment of the present invention, the acquisition module 620 is also suitable for determining a data reference of source map data related to map data required for a game copy to be created; acquiring source map data corresponding to the determined data reference from the source map data; making data changes to the acquired source map data, and saving the changed map data locally; wherein the changed map data is map data different from the source map data and required for the game copy to be created.
[0089] In one embodiment of the present invention, the acquisition module 620 is also suitable for, if the source map data includes grid data, obtaining grid coordinate information of grid data related to the map data required for the game copy to be created; and determining the data reference of the source map data corresponding to the corresponding grid data based on the grid coordinate information, wherein the data reference of the source map data corresponds to multiple grid coordinate information.
[0090] See also Figure 7 In one embodiment of the present invention, the above Figure 6 The game copy creation device of the illustrated embodiment further includes a modification module 640. The modification module 640 is adapted to, after the first creation module 630 creates the game copy based on the data reference and the map data different from the source map data, determine the data reference of the map data to be modified in response to a modification instruction for the map data referenced by the game copy; obtain the source map data corresponding to the determined data reference from the source map data; perform data modification on the obtained source map data, and save the modified map data locally.
[0091] In an embodiment of the present invention, the establishing module 610 is further adapted to divide the source map data into different map data blocks and establish a data reference for each map data block.
[0092] The modification module 640 is further adapted to obtain a map data block corresponding to the determined data reference from the source map data, modify the map data in the obtained map data block, and save the entire map data block to which the modified map data belongs locally.
[0093] See also Figure 8 In one embodiment of the present invention, the above Figure 7 The game copy creation device of the illustrated embodiment further includes a second creation module 650. The second creation module 650 is adapted to create a block array for the map data blocks in the source map data after the establishment module 610 divides the source map data into different map data blocks, the block array comprising a plurality of data units, one data unit being used to store a corresponding map data block.
[0094] The modification module 640 is further adapted to modify the map data in the acquired map data block, and save the entire map data block to which the modified map data belongs into the corresponding data unit.
[0095] See also Fig. 9 In one embodiment of the present invention, the above Figure 6The game copy creation device of the illustrated embodiment further includes a reading module 660. The reading module 660 is adapted to, in response to a reading instruction for map data in the game copy, determine whether the local area contains the map data to be read; if the local area contains the map data to be read, directly read the map data to be read in the game copy; if the local area does not contain the map data to be read, search for a data reference of the map data to be read, and read the map data to be read from the source map data by calling the found data reference.
[0096] Based on the same inventive concept, an embodiment of the present invention further provides a computer storage medium storing computer program code. When the computer program code runs on a computing device, the computing device executes the game copy creation method of any of the above embodiments.
[0097] Based on the same inventive concept, an embodiment of the present invention also provides a computing device, including: a processor; a memory storing computer program code; when the computer program code is executed by the processor, the computing device executes the game copy creation method of any of the above embodiments.
[0098] Those skilled in the art can clearly understand that the specific working processes of the devices, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and for the sake of brevity, they are not further described here.
[0099] In addition, the functional units in various embodiments of the present invention may be physically independent of each other, or two or more functional units may be integrated together, or all functional units may be integrated into one processing unit. The above integrated functional units may be implemented in the form of hardware, or in the form of software or firmware.
[0100] Those skilled in the art can understand that if the integrated functional unit is implemented in the form of software and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention can essentially or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, which includes a number of instructions to enable a computing device (such as a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention when running the instructions. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program codes.
[0101] Alternatively, all or part of the steps of implementing the aforementioned method embodiments may be accomplished by hardware associated with program instructions (such as a computing device such as a personal computer, a server, or a network device), and the program instructions may be stored in a computer-readable storage medium. When the program instructions are executed by a processor of a computing device, the computing device executes all or part of the steps of the methods described in the embodiments of the present invention.
[0102] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that within the spirit and principles of the present invention, the technical solutions described in the aforementioned embodiments can still be modified, or some or all of the technical features therein can be replaced by equivalents. However, these modifications or replacements do not deviate from the protection scope of the present invention.
Claims
1. A method for creating a game copy, characterized in that: include: Acquire source map data of the game map, and establish a data reference for the source map data; In response to a game copy creation instruction, obtaining a data reference of the source map data and map data different from the source map data and required for creating the game copy; Creating a game copy based on the data reference and map data different from the source map data; wherein, when the data reference in the game copy is called, the source map data corresponding to the data reference is read; The obtaining of map data different from the source map data and required for creating the game copy includes: Determining data references to source map data associated with map data required for the game copy to be created; Acquire source map data corresponding to the determined data reference from the source map data; Modifying the acquired source map data and saving the modified map data locally; The changed map data is map data that is different from the source map data and is required for creating a game copy.
2. The method according to claim 1, characterized in that: The source map data includes at least one of grid data, height map data, and convex hull data.
3. The method according to claim 1, characterized in that If the source map data includes grid data, determining a data reference of the source map data related to the map data required for the game copy to be created includes: Obtaining grid coordinate information of grid data related to map data required for creating a game copy; A data reference of source map data corresponding to the corresponding grid data is determined based on the grid coordinate information, wherein the data reference of the source map data corresponds to a plurality of grid coordinate information.
4. The method according to claim 1, characterized in that: After creating a game copy based on the data reference and the map data different from the source map data, the method further includes: In response to an instruction to modify the map data referenced by the game copy, determining a data reference of the map data to be modified; Acquire source map data corresponding to the determined data reference from the source map data; The acquired source map data is modified, and the modified map data is saved locally.
5. The method according to claim 1 or 4, characterized in that: Establishing a data reference for the source map data, including: dividing the source map data into different map data blocks, and establishing a data reference for each map data block; Acquiring source map data corresponding to the determined data reference from the source map data, modifying the acquired source map data, and saving the modified map data locally includes: acquiring a map data block corresponding to the determined data reference from the source map data, modifying the map data in the acquired map data block, and saving the entire map data block to which the modified map data belongs locally.
6. The method according to claim 5, characterized in that After dividing the source map data into different map data blocks, the method further includes: creating a block array for the map data blocks in the source map data, wherein the block array includes a plurality of data units, and one data unit is used to store a corresponding map data block; Modifying the acquired map data in the map data block and saving the entire map data block to which the modified map data belongs locally includes: modifying the acquired map data in the map data block and saving the entire map data block to which the modified map data belongs to a corresponding data unit.
7. The method according to claim 1, characterized in that Also includes: In response to an instruction to read map data in the game copy, determining whether the local device contains the map data to be read; If yes, directly read the to-be-read map data in the game copy; If not, the data reference of the map data to be read is searched, and the map data to be read is read from the source map data by calling the found data reference.
8. A game copy creation device, characterized in that: include: An establishment module, adapted to obtain source map data of a game map and establish a data reference for the source map data; An acquisition module, adapted to acquire, in response to a game copy creation instruction, a data reference of the source map data and map data different from the source map data and required for creating a game copy; A creation module, adapted to create a game copy based on the data reference and map data different from the source map data; wherein the source map data corresponding to the data reference is read when the data reference in the game copy is called; The acquisition module is also suitable for determining a data reference of source map data related to map data required for a game copy to be created; acquiring source map data corresponding to the determined data reference from the source map data; making data changes to the acquired source map data, and saving the changed map data locally; wherein the changed map data is map data different from the source map data required for the game copy to be created.
9. A computer storage medium storing a computer program code, which, when executed on a computing device, causes the computing device to execute the game copy creation method according to any one of claims 1 to 7.
10. A computing device comprising: processor; a memory storing computer program code; When the computer program code is executed by the processor, it causes the computing device to execute the game copy creation method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Game scene generation method and device and electronic equipment
CN108568112A
