A method and system for quickly exporting objects in a game map
By creating object templates in the game map and setting template numbers, batch export of game map objects is solved, and the problem of low export efficiency in the existing technology is improved.
Patent Information
- Application Number
- CN202111353413.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-16
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2041-11-16
AI Technical Summary
The prior art is inefficient when exporting objects in game maps, and cannot batch processing of objects of the same type, and setting object properties is cumbersome.
By adding objects in the game scene, creating templates for different types of objects, setting template numbers for objects, grouping objects according to the template numbers, and batch exporting.
It greatly improves the efficiency of exporting map objects, reduces repeated operations on each object, and realizes batch processing of objects of the same type.
Smart Images

Figure CN114042318B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer communication technology, and in particular to a method and system for quickly exporting objects in a game map. Background Art
[0002] In game projects, sometimes you often need to export objects in the game scene, but there are many different types of game objects in the game scene, and the properties of each type of object are different. If you want to export these objects, you need to repeat the operation for each object, set the properties of the corresponding game object, and then export the game objects according to the game project's requirements. Select the corresponding game objects to export one by one, which is not very efficient.
[0003] That is, the existing technology mainly selects the game objects to be exported one by one, sets the object properties, and exports them. This makes it impossible to batch process objects of the same type, and the settings are relatively cumbersome when selecting objects and adding properties. The efficiency for exporting objects in large map scenes is very low. Summary of the invention
[0004] To overcome the above problems, the purpose of the present invention is to provide a method for quickly exporting objects in a game map, setting specific template attributes, and quickly exporting them through template grouping, thereby greatly improving the efficiency of map object export.
[0005] The present invention is implemented by the following scheme: a method for quickly exporting objects in a game map, the method comprising the following steps:
[0006] Step S1, adding game objects to the game scene to build a complete game interface;
[0007] Step S2: according to the object types in the game scene, create object templates corresponding to different object types;
[0008] Step S3, selecting a game object and setting an object template number for the game object;
[0009] Step S4, grouping the game objects according to the object template numbers, and aggregating them into different object groups;
[0010] Step S5: according to the object requirements to be exported by the user, find the corresponding object group, obtain all the game objects in the object group, obtain the position and attribute information of the game objects in the game scene, and export them into a file for subsequent use.
[0011] Furthermore, the step S1 is further specified as follows: in the game scene, by adding the resource file of the game scene to the map scene, parsing the resource file, generating game objects in the game scene, and finally forming a complete game interface scene; the generated game objects include trees, grass, stones, boxes, characters, buckets, wooden fences, beasts and buildings.
[0012] Furthermore, the step S2 is further specified as follows: there are a lot of game objects in the constructed game scene; object templates are created for these game objects, different object templates are set according to the different attributes of each game object, and a template number is set for each object template to form a template configuration file; the object template is set in a way to form an ini-type configuration file, with the template number of the template as the group name and the attribute value as the content; the attribute value is the game object attribute value, and each game object has corresponding configuration attributes of name, description, health, size, appearance, activity range and skill attributes.
[0013] Furthermore, the step S3 is further specified as follows: in the game scene, a game object to be exported is selected, the corresponding object template number is obtained through the template configuration file, and the corresponding object template number is set for the game object, so that the attributes corresponding to the template number can be set to the game object, because the subsequently exported files require the attributes unique to these game objects.
[0014] Furthermore, the step S4 is further specified as follows: after setting the template number for the game object, determine whether there is a group with the template number in the game object, and if not, set a new object group, and the object group name is the name of the template number; and add the selected game object to this object group, and if a new game object of this resource type is added later, when adding, the corresponding template number is also directly set through the program, and added to this object group; if there is, directly add the game object to the corresponding object group.
[0015] The present invention also provides a system for quickly exporting objects in a game map, the system comprising: a construction interface module, an object template making module, a template number setting module, an object grouping module, and an export data module;
[0016] The interface building module is used to add game objects to the game scene to build a complete game interface;
[0017] The object template making module makes object templates corresponding to different object types according to the object types in the game scene;
[0018] The template number setting module selects a game object and sets an object template number for the game object;
[0019] The object grouping module groups the game objects according to the object template numbers and collects them into different object groups;
[0020] The data export module finds the corresponding object group according to the object requirements to be exported by the user, obtains all game objects in the object group, obtains the position and attribute information of the game objects in the game scene, and exports them into a file for subsequent use.
[0021] Furthermore, the implementation method of the interface construction module is further specified as follows: in the game scene, by adding the resource file of the game scene to the map scene, parsing the resource file, generating game objects in the game scene, and finally forming a complete game interface scene; the generated game objects include trees, grass, stones, boxes, characters, buckets, wooden fences, beasts and buildings.
[0022] Furthermore, the implementation method of the object template production module is further specified as follows: there are a large number of game objects in the constructed game scene; object templates are created for these game objects, different object templates are set according to the different attributes of each game object, and a template number is set for each object template to form a template configuration file; the object template is set in a way that an ini-type configuration file is formed, with the template number of the template as the group name and the attribute value as the content; the attribute value is the game object attribute value, and each game object has corresponding configuration attributes of name, description, health, size, appearance, activity range and skill attributes.
[0023] Furthermore, the implementation method of the template number setting module is further specified as follows: in the game scene, a game object to be exported is selected, the corresponding object template number is obtained through the template configuration file, and the corresponding object template number is set for the game object, so that the attributes corresponding to the template number can be set to the game object, because the subsequently exported files require the attributes unique to these game objects.
[0024] Furthermore, the object grouping module is implemented as follows: after setting the template number for the game object, determine whether there is a group with the template number in the game object. If not, set a new object group with the name of the template number; add the selected game object to the object group, and if a new game object of this resource type is added later, when adding it, the corresponding template number is also directly set through the program and added to the object group; if there is, directly add the game object to the corresponding object group.
[0025] The beneficial effects of the present invention are as follows: the present invention is mainly based on the idea of template, and the template is the result of fixing and standardizing the structural law of an object, which embodies the standardization of the structural form. The role of the template is to tell the editor which parts the basic structure of this type of object should contain and which attributes it has; if it is found that the structure of a certain object is incomplete, it can be started from perfecting these parts, so that the editing of the object can be followed; through the present invention, the map object can be templated, objects of the same resource type can be batch processed, specific template attributes can be set, and they can be quickly exported through template grouping, which greatly improves the efficiency of map object export. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 It is a schematic flow chart of the method of the present invention.
[0027] Figure 2 It is a system principle block diagram of the present invention. DETAILED DESCRIPTION
[0028] The present invention will be further described below in conjunction with the accompanying drawings.
[0029] See also Figure 1 As shown, the present invention provides a method for quickly exporting objects in a game map, the method comprising the following steps:
[0030] Step S1, adding game objects to the game scene to build a complete game interface;
[0031] Step S2: according to the object types in the game scene, create object templates corresponding to different object types;
[0032] Step S3, selecting a game object and setting an object template number for the game object;
[0033] Step S4, grouping the game objects according to the object template numbers, and aggregating them into different object groups;
[0034] Step S5: according to the object requirements to be exported by the user, find the corresponding object group, obtain all the game objects in the object group, obtain the position and attribute information of the game objects in the game scene, and export them into a file for subsequent use.
[0035] The present invention will be further described below in conjunction with a specific embodiment:
[0036] Specific implementation steps of a method for quickly exporting objects in a game map
[0037] 1. Add game objects to the game scene to build a complete game interface
[0038] First, in the game scene, by adding resource files to the map scene, parsing the resource files, generating game objects in the game scene, the generated objects include trees, grass, stones, boxes, characters, buckets, wooden fences, beasts and buildings, etc., and finally forming a complete game interface scene, or directly using the already constructed game interface scene.
[0039] 2. Create object templates based on the object types in the game scene
[0040] There are many game objects in the game scene constructed in step 1. Trees, buckets, boxes, wooden fences, grass, beasts, stones are all relatively common objects. Each object has a corresponding name, description, health, size, appearance, range of activity, and some object-specific configuration attributes (just like stones and other immovable objects have no skill attributes, beasts, soldiers and other objects have corresponding skill attributes). Object templates need to be created for these objects. Different object templates are set according to the different attributes of each game object, and a template number is set for each object template to form a template configuration file. The template setting method is mainly to form an ini-type configuration file, with the template number as the group name and the attribute value as the content. For example, the object template number is set to 36000, the name (Name) is "box", and the description (describe) is Magic Battle Royale-Object-Box. The configuration information formed is as follows:
[36000]
[0042] describe=Magic Battle Royale-Object-Box
[0043] Name=box.
[0044] 3. Select the game object and set the template number for the game object
[0045] In the game scene, select a game object to be exported, obtain the corresponding object template number through the template configuration file generated in step 2, and set the corresponding object template number for the object. In this way, the attributes corresponding to the template number can be set to the object, because the subsequent exported files require these object-specific attributes.
[0046] 4. Group game objects according to object template numbers and group them into different object groups
[0047] After setting the template number for the game object, determine whether there is a group with the template number in the object. If not, set a new object group with the name of the template number. Add the selected game object to this object group. If a new object of this resource type is added later, the corresponding template number is also set directly through the program when adding it, and it is added to this object group; if it exists, the game object is directly added to the corresponding object group.
[0048] 5. Export the required game object information by object grouping
[0049] According to the object requirements that the user needs to export, find the corresponding object grouping, obtain the position and attribute information of all game objects in the object grouping in the game scene, and export them into files for subsequent use.
[0050] See also Figure 2 As shown, the present invention also provides a system for quickly exporting objects in a game map, the system comprising: a construction interface module, an object template making module, a template number setting module, an object grouping module, and an export data module;
[0051] The interface building module is used to add game objects to the game scene to build a complete game interface;
[0052] The object template making module makes object templates corresponding to different object types according to the object types in the game scene;
[0053] The template number setting module selects a game object and sets an object template number for the game object;
[0054] The object grouping module groups the game objects according to the object template numbers and collects them into different object groups;
[0055] The data export module finds the corresponding object group according to the object requirements to be exported by the user, obtains all game objects in the object group, obtains the position and attribute information of the game objects in the game scene, and exports them into a file for subsequent use.
[0056] The implementation method of the interface construction module is further specified as follows: in the game scene, by adding the resource file of the game scene to the map scene, parsing the resource file, generating game objects in the game scene, and finally forming a complete game interface scene; the generated game objects include trees, grass, stones, boxes, characters, buckets, wooden fences, beasts and buildings.
[0057] Among them, the implementation method of the object template production module is further specified as follows: there are a lot of game objects in the constructed game scene; object templates are created for these game objects, different object templates are set according to the different attributes of each game object, and a template number is set for each object template to form a template configuration file; the object template is set in a way that an ini-type configuration file is formed, with the template number of the template as the group name and the attribute value as the content; the attribute value is the game object attribute value, and each game object has corresponding name, description, health, size, appearance, activity range and configuration attributes of skill attributes.
[0058] The implementation method of the template number setting module is further specifically as follows: in the game scene, a game object to be exported is selected, the corresponding object template number is obtained through the template configuration file, and the corresponding object template number is set for the game object, so that the attributes corresponding to the template number can be set to the game object, because the subsequently exported files require the attributes unique to these game objects.
[0059] The object grouping module is further specifically implemented as follows: after setting the template number for the game object, determine whether there is a group with the template number in the game object. If not, set a new object group with the name of the template number; add the selected game object to the object group, and if a new game object of this resource type is added later, when adding it, the corresponding template number is also directly set through the program and added to the object group; if there is, directly add the game object to the corresponding object group.
[0060] The application scenarios of the present invention are as follows:
[0061] In game scenes, it is often necessary to export map objects of different resource types, set object-specific properties for them, and export these object properties into files for subsequent configuration in the game.
[0062] First, you need to add game objects to the game scene, such as trees, grass, houses, characters, boxes, stones and other game objects to form a complete game interface. This is mainly done by adding the resource files of these objects to the map scene and parsing these resource files to form game objects.
[0063] Next, you need to create object templates for the game objects in the map scene. According to the different properties of each object, set different object templates to set its name, description, health, size, appearance and other properties. And set a template number for each object template to form a template configuration file. The following will show an example of the template setting of a box:
[36000]
[0065] describe=Magic Battle Royale-Object-Box
[0066] Name=Box
[0067] minhealth=100
[0068] maxhealth=1000
[0069] activaterange=20
[0070] armor=2
[0071] look=31
[0072] viewDistance=2000
[0073] category=256
[0074] toyinfoid=0
[0075] broadcastmap=1
[0076] ghost=1
[0077] objsize=18
[0078] objsizeEx=18
[0079] objmodelsize=50
[0080] isused=0
[0081] This example shows a box template with a minimum health of 100, a maximum health of 1000, a look of model number 31, a name of box, and a template number starting with 36000.
[0082] Then, in the game scene, select the box in the map, read the template configuration, and get the template number of the box as 36000. Then set the template number of the box to 36000, which is equivalent to setting all the properties of template 36000 to the box.
[0083] After setting the template number, determine whether there is a group with the template number 36000 in the game object group. If not, set a new object group with the group name 36000. And add the box object just selected to this object group. When selecting multiple objects, you can directly select all the boxes in the group, which can realize batch operation without repeating the operation for each object, reducing the workload. If you add a new object of the same resource file later, the program will automatically determine whether there is already an object of the resource type in the map, and whether the object has been configured with a template number. If the template number has been configured, the newly added object will also be configured with the corresponding template number and added to the corresponding group. This means that as long as the template number is set once for the same box object, all boxes on the map will automatically identify the resource through the program, configure it with the same template number, and add it to the same object group, eliminating the tedious operation of configuring the template number. Automatic recognition by the program ensures the correctness and convenience of the configuration.
[0084] After configuring the template number, the objects on the map have actually been grouped according to the template. According to the objects that the user needs to export, find the corresponding object group, obtain the position and properties of all game objects in the object group in the game scene, and export them into files for subsequent use. The exported file is shown below, which includes both the template properties of the object and the specific properties in the map scene, such as the position in the map. [136001]
[0086] name = box
[0087] templateid=36000
[0088] mapid=101
[0089] lookid=31
[0090] equipmentid=139
[0091] posX=-69.424797
[0092] posY=-20.085100
[0093] posZ=-5.667820
[0094] orientation=439.000000
[0095] spawntimesecs=1000
[0096] spawndist=0
[0097] currentwaypoint=1
[0098] curhealth=3000
[0099] curmana=300
[0100] is_dead=0
[0101] movementType=0
[0102] spawnMask=1
[0103] camp=3
[0104] waypath=0
[0105] removeAfterDead=1
[0106] objsize=50
[0107] is_staticmask=1
[0108] regiongroupid=1
[0109] genrate=100
[0110] Here, 136001 refers to the exported ID sequence, the name (name) is box, the template number (templateid) is 36000, and the following are some other properties of the object.
[0111] In summary, the present invention can template map objects, batch process objects of the same resource type, set specific template attributes, and quickly export them through template grouping, thereby greatly improving the efficiency of map object export.
[0112] The above description is only a preferred embodiment of the present invention. All equivalent changes and modifications made according to the scope of the patent application of the present invention should fall within the scope of the present invention.
Claims
1. A method for quickly exporting objects in a game map, characterized in that: The method comprises the following steps: Step S1, adding game objects to the game scene to build a complete game interface; Step S2: according to the object types in the game scene, create object templates corresponding to different object types; Step S3, selecting a game object and setting an object template number for the game object; Step S4, grouping the game objects according to the object template numbers, and aggregating them into different object groups; Step S5: according to the object requirements to be exported by the user, find the corresponding object group, obtain all the game objects in the object group, obtain the position and attribute information of the game objects in the game scene, and export them into a file for subsequent use.
2. A method for quickly exporting objects in a game map according to claim 1, characterized in that: The step S1 is further specified as follows: in the game scene, by adding the resource file of the game scene to the map scene, parsing the resource file, generating game objects in the game scene, and finally forming a complete game interface scene; the generated game objects include trees, grass, stones, boxes, characters, buckets, wooden fences, beasts and buildings.
3. A method for quickly exporting objects in a game map according to claim 1, characterized in that: The step S2 is further specifically as follows: there are a lot of game objects in the constructed game scene; Creating object templates for these game objects, setting different object templates according to different attributes of each game object, and setting a template number for each object template to form a template configuration file; The object template is set in such a way that an ini-type configuration file is formed, with the template number of the template as the group name and the attribute value as the content; The attribute values are game object attribute values, and each game object has corresponding configuration attributes such as name, description, health, size, appearance, activity range, and skill attributes.
4. A method for quickly exporting objects in a game map according to claim 3, characterized in that: The step S3 is further specifically as follows: in the game scene, a game object to be exported is selected, the corresponding object template number is obtained through the template configuration file, and the corresponding object template number is set for the game object, so that the attributes corresponding to the template number can be set to the game object, because the subsequently exported files require the unique attributes of these game objects.
5. A method for quickly exporting objects in a game map according to claim 1, characterized in that: The step S4 is further specifically as follows: after setting the template number for the game object, determining whether there is a group with the template number in the game object, if not, setting a new object group, the object group name being the name of the template number; The selected game object is added to this object group. If a new game object of this resource type is added later, the corresponding template number is directly set through the program when adding it, and it is added to this object group. If so, add the game object directly to the corresponding object group.
6. A system for quickly exporting objects in a game map, characterized by: The system includes: a construction interface module, an object template making module, a template number setting module, an object grouping module, and a data exporting module; The interface building module is used to add game objects to the game scene to build a complete game interface; The object template making module makes object templates corresponding to different object types according to the object types in the game scene; The template number setting module selects a game object and sets an object template number for the game object; The object grouping module groups the game objects according to the object template numbers and collects them into different object groups; The data export module finds the corresponding object group according to the object requirements to be exported by the user, obtains all game objects in the object group, obtains the position and attribute information of the game objects in the game scene, and exports them into a file for subsequent use.
7. A system for quickly exporting objects in a game map according to claim 6, characterized in that: The implementation method of the interface construction module is further specified as follows: in the game scene, by adding the resource file of the game scene to the map scene, parsing the resource file, generating game objects in the game scene, and finally forming a complete game interface scene; the generated game objects include trees, grass, stones, boxes, characters, buckets, wooden fences, beasts and buildings.
8. A system for quickly exporting objects in a game map according to claim 6, characterized in that: The object template making module is further specifically implemented as follows: there are a lot of game objects in the constructed game scene; Creating object templates for these game objects, setting different object templates according to different attributes of each game object, and setting a template number for each object template to form a template configuration file; The object template is set in such a way that an ini-type configuration file is formed, with the template number of the template as the group name and the attribute value as the content; The attribute values are game object attribute values, and each game object has corresponding configuration attributes such as name, description, health, size, appearance, activity range, and skill attributes.
9. A system for quickly exporting objects in a game map according to claim 8, characterized in that: The implementation method of the template number setting module is further specifically as follows: in the game scene, a game object to be exported is selected, the corresponding object template number is obtained through the template configuration file, and the corresponding object template number is set for the game object, so that the attributes corresponding to the template number can be set to the game object, because the subsequently exported files require the attributes unique to these game objects.
10. A system for quickly exporting objects in a game map according to claim 6, characterized in that: The object grouping module is further specifically implemented as follows: after setting the template number for the game object, determine whether there is a group with the template number in the game object, and if not, set a new object group, and the object group name is the name of the template number; The selected game object is added to this object group. If a new game object of this resource type is added later, the corresponding template number is directly set through the program when adding it, and it is added to this object group. If so, add the game object directly to the corresponding object group.
Citation Information
Patent Citations
Data export and import method based on object definition
CN105701251A
Game scene data processing method, apparatus and device, and storage medium
CN111494957A