Resource loading method, related device, equipment and storage medium
Through the method of instantiating and adjusting game sub-objects in resource template files, the problem of low position adjustment efficiency in game development is solved, and a fast and efficient game development process is achieved.
Patent Information
- Application Number
- CN202310806878.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-03
- Publication Date
- 2025-01-03
AI Technical Summary
During the game development process, users need to continuously add and adjust the location of game objects, resulting in long game editing time and low efficiency.
By obtaining resource template files containing multiple game resources, generating and instantiating multiple game sub-objects, and adjusting the location of these objects according to the editing operations of the game scene, one-time loading and adjustments are achieved.
It greatly improves the efficiency of game development, reduces the time for position adjustment, and simplifies the game editing process.
Smart Images

Figure CN119236411A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing, and in particular to a resource loading method, related devices, equipment and storage medium. Background Art
[0002] Files used in various games produced by users using game engines, including images, animations, models, special effects and other resources. These game resources can be instantiated into game objects and loaded into the game engine for running.
[0003] Currently, in the game editing process, when a user adds a game object, he or she obtains the desired game object by loading the game resources corresponding to the game object.
[0004] In the above process of adding game objects, the user needs to continuously add game objects and adjust the positions of game objects when editing the imagined scene. The game editing time is long, resulting in low game development efficiency. Summary of the invention
[0005] The embodiment of the present application provides a resource loading method and related devices. When instantiating game resources, multiple game resources can be loaded at one time, and multiple game sub-objects with adjusted positions can be directly instantiated without the need to adjust the positions, which greatly improves the efficiency of game development.
[0006] In view of this, the present application provides a resource loading method, including:
[0007] Acquire a first resource template file, the first resource template file includes a plurality of first game resources and a first position parameter, the first position parameter indicates a positional relationship between the plurality of first game sub-objects, and the first game sub-objects and the first game resources have a corresponding relationship in data;
[0008] Generate a first game object according to the first resource template file, where the first game object includes a plurality of first game sub-objects;
[0009] In response to an editing operation based on a game scene, the first game object is adjusted according to the editing operation.
[0010] Another aspect of the present application provides a resource loading device, comprising:
[0011] An acquisition unit, used for acquiring a first resource template file, the first resource template file comprising a plurality of first game resources and a first position parameter, the first position parameter indicating a positional relationship between the plurality of first game sub-objects, the first game sub-objects and the first game resources having a corresponding relationship in data;
[0012] A generating unit, configured to generate a first game object according to a first resource template file, wherein the first game object includes a plurality of first game sub-objects;
[0013] An adjustment unit is used to respond to an editing operation based on a game scene and adjust the first game object according to the editing operation.
[0014] In one possible design, in another implementation of another aspect of the embodiment of the present application,
[0015] The acquisition unit is further used to acquire the overwrite parameter corresponding to the first game sub-object, the first resource template file includes the overwrite parameter corresponding to the first game sub-object, and the overwrite parameter corresponding to the first game sub-object includes the position information of the first game sub-object;
[0016] The adjustment unit is further used to adjust the position of the first game sub-object according to the overwrite parameter corresponding to the first game sub-object.
[0017] In a possible design, in another implementation of another aspect of the embodiment of the present application, the generating unit is specifically used for:
[0018] Instantiate a plurality of first game resources into a plurality of first game sub-objects;
[0019] The position of each first game sub-object is adjusted according to the first position parameter.
[0020] In one possible design, in another implementation of another aspect of the embodiment of the present application,
[0021] The acquisition unit is further used to acquire the first sub-object and the second sub-object;
[0022] The generating unit is further configured to generate a first resource template file according to a first relative position relationship between the first sub-object and the second sub-object, and a game resource corresponding to the first sub-object and a game resource corresponding to the second sub-object.
[0023] In a possible design, in another implementation of another aspect of the embodiment of the present application, the resource loading device further includes a determining unit, and the determining unit is specifically used to:
[0024] Get the local coordinate system;
[0025] A first relative position relationship is determined according to the positions of the first sub-object and the second sub-object in the local coordinate system.
[0026] In one possible design, in another implementation of another aspect of the embodiment of the present application,
[0027] The acquisition unit is also used to acquire the third sub-object;
[0028] The generation unit is also used to generate a second resource template file according to multiple first game resources, second relative position relationships and game resources corresponding to third sub-objects, wherein the second relative position relationship includes the position relationship between any two sub-objects among the first sub-object, the second sub-object and the third sub-object.
[0029] In one possible design, in another implementation of another aspect of the embodiment of the present application,
[0030] The acquisition unit is further used to acquire the adjustment parameter of the first sub-object;
[0031] The adjustment unit is also used for:
[0032] The position of the first sub-object is adjusted according to the adjustment parameters, and the override parameters corresponding to the first sub-object are modified. The first resource template file includes the override parameters corresponding to the first game sub-object, and the override parameters corresponding to the first game sub-object are used to record the adjusted position of the first game sub-object.
[0033] In a possible design, in another implementation of another aspect of the embodiment of the present application, the acquiring unit is specifically configured to:
[0034] In response to a selection instruction for the first sub-object, presenting an overwrite parameter interface corresponding to the selection instruction;
[0035] Get the input data in the override parameter interface;
[0036] The tuning parameters are determined based on the input data.
[0037] In one possible design, in another implementation of another aspect of the embodiment of the present application, the plurality of game sub-objects further include a fourth sub-object, and the first sub-object is a parent object of the fourth sub-object;
[0038] The adjusting unit is further used to adjust the position of the fourth sub-object accordingly according to the position adjustment of the first sub-object.
[0039] In one possible design, in another implementation of another aspect of the embodiment of the present application,
[0040] The acquisition unit is further used to acquire a name for the first sub-object and the second sub-object, where the name is used to distinguish the first sub-object from the second sub-object;
[0041] The resource loading device also includes a recording unit, which is specifically used to:
[0042] Record the naming in the first resource template file.
[0043] In one possible design, in another implementation of another aspect of the embodiment of the present application,
[0044] The acquisition unit is further used to acquire a third resource template file, the third resource template file includes a plurality of second game resources and a second position parameter, the second position parameter indicates a positional relationship between a plurality of second game sub-objects, and the second game sub-objects and the second game resources have a corresponding relationship in data;
[0045] The build unit is also used to:
[0046] Generate a second game object according to the third resource template file, where the second game object includes a plurality of second game sub-objects;
[0047] A fourth resource template file is generated according to the plurality of first game resources, the plurality of second game resources and the third relative position relationship, wherein the third relative position relationship includes the position relationship between any two sub-objects between the plurality of first game sub-objects and the plurality of second game sub-objects.
[0048] Another aspect of the present application provides a computer device, comprising:
[0049] memories, transceivers, processors, and bus systems;
[0050] Wherein, the memory is used to store programs;
[0051] The processor is used to execute the program in the memory, including executing the above-mentioned methods;
[0052] The bus system is used to connect the memory and the processor so that the memory and the processor can communicate with each other.
[0053] Another aspect of the present application provides a computer-readable storage medium, in which instructions are stored. When the computer-readable storage medium is run on a computer, the computer is enabled to execute the above-mentioned methods.
[0054] Another aspect of the present application provides a computer program product or a computer program, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided by the above aspects.
[0055] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
[0056] In an embodiment of the present application, a resource loading method is provided. The method can obtain a first resource template file including multiple first game resources, load multiple corresponding first game sub-objects according to the multiple first game resources, all the first game sub-objects together constitute the first game object, and then adjust the first game object according to the editing operation of constructing the game scene. Among them, the first position parameter in the first resource template file indicates the positional relationship between the multiple first game sub-objects. In the above manner, when instantiating game resources, the user can load multiple game resources at one time, and can directly instantiate multiple game sub-objects with adjusted positions without the need to adjust the positions, which greatly improves the efficiency of game development. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 This is a schematic diagram of a network architecture in an embodiment of the present application;
[0058] Figure 2 A schematic diagram of a resource loading method in an embodiment of the present application;
[0059] Figure 3 A schematic diagram of the format of a resource template file in an embodiment of the present application;
[0060] Figure 4 This is a schematic diagram of generating a first game object in an embodiment of the present application;
[0061] Figure 5 A schematic diagram of the format of another resource template file in an embodiment of the present application;
[0062] Figure 6 A schematic diagram of a local coordinate system in an embodiment of the present application;
[0063] Figure 7 A schematic diagram of the format of another resource template file in an embodiment of the present application;
[0064] Figure 8 This is a schematic diagram of adding an object to an editing interface in an embodiment of the present application;
[0065] Fig. 9 This is a schematic diagram of a form of overwriting parameter interface in an embodiment of the present application;
[0066] Fig.10 This is a schematic diagram of another form of overwriting parameter interface in an embodiment of the present application;
[0067] Fig.11 This is a schematic diagram of the position change of an overwriting parameter interface in an embodiment of the present application;
[0068] Fig.12 A schematic diagram of the format of another resource template file in an embodiment of the present application;
[0069] Fig.13 A schematic diagram of the format of another resource template file in an embodiment of the present application;
[0070] Fig.14 A schematic diagram of adding a template file to an editing interface in an embodiment of the present application;
[0071] Fig.15 This is a schematic diagram of the structure of a resource loading device in an embodiment of the present application;
[0072] Fig.16 It is a structural schematic diagram of a computer device in an embodiment of the present application. DETAILED DESCRIPTION
[0073] The embodiments of the present application provide a resource loading method, related apparatus, device and storage medium for loading multiple game sub-objects at one time, and can directly instantiate multiple game sub-objects with adjusted positions without the need to adjust the positions, thereby greatly improving the efficiency of game development.
[0074] The terms "first", "second", "third", "fourth", etc. (if any) 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, for example. In addition, the terms "including" and "corresponding to" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0075] To facilitate understanding, some terms or concepts involved in the embodiments of the present application are first explained.
[0076] Game engines refer to some pre-written editable computer game systems or core components of some interactive real-time graphics applications. These systems provide game designers with various tools needed to write games, with the aim of allowing game designers to easily and quickly create game programs without starting from scratch. Most of them support multiple operating platforms, such as Linux, Mac OS X, and Microsoft Windows. Game engines include the following systems: rendering engine (i.e. "renderer", including 2D graphics engine and 3D graphics engine), physics engine, collision detection system, sound effects, script engine, computer animation, artificial intelligence, network engine, and scene management.
[0077] Game resources: are files used in various games produced by users using game engines, including images, animations, models, special effects and other resources. These game resources will be managed, loaded and run in the game engine.
[0078] Game object: The program object that actually runs game resources in the game.
[0079] Serialization: Serialization is the process of converting an object's state information into a form that can be stored or transmitted. During serialization, an object writes its current state to a temporary or persistent storage area. Later, the object can be recreated by reading or deserializing the object's state from the storage area. For example, a game engine loading game resources to run in a game program is a serialization process, and restoring the generated game objects as files is deserialization.
[0080] Instantiation: In the application embodiment, it can be understood as the process of serializing game resources into game objects. Among them, one game resource can be instantiated into multiple game objects.
[0081] See also Figure 1 ,like Figure 1 The figure shows a schematic diagram of a network architecture provided by an embodiment of the present application. Figure 1 As shown, the network architecture can be applied to a data processing system in a virtual game scene. The data processing system may specifically include Figure 1 The server 1, the game production terminal cluster 2 and the user terminal cluster 3 are shown. The game production terminal cluster 2 may include one or more game production terminals, and the number of game production terminals in the game production terminal cluster 2 is not limited. Figure 1 As shown, the multiple game production terminals may specifically include a game production terminal 21, a game production terminal 22, a game production terminal 23, ..., a game production terminal 2n; Figure 1 As shown, game production terminal 21, game production terminal 22, game production terminal 23, ..., game production terminal 2n can be respectively connected to the server 1 through a network, so that each game production terminal can exchange data with the server 1 through the network connection.
[0082] The user terminal cluster may specifically include one or more user terminals, and the number of user terminals in the user terminal cluster 3 is not limited. Figure 1 As shown, the multiple user terminals may specifically include user terminal 31, user terminal 32, user terminal 33, ..., user terminal 3n; Figure 1As shown, user terminal 31, user terminal 32, user terminal 33, ..., user terminal 3n can respectively establish network connections with server 1, so that each user terminal can exchange data with server 1 through the network connection.
[0083] Among them, Figure 1 The server 1 shown can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, as well as big data and artificial intelligence platforms.
[0084] It should be understood that in a virtual game scenario, Figure 1 Each game making terminal in the game making terminal cluster 2 shown in the figure can be installed with a game making client (for example, a game editor). When the game making client runs in each game making terminal, it can be respectively connected to the above-mentioned Figure 1 Data is exchanged between the servers 1 shown. It can be understood that the game production client here can be used to create virtual model objects, virtual special effects objects and virtual vegetation objects for target objects in a game (i.e., target game) based on a mobile terminal, and correspondingly, the game resources for loading the virtual model objects, virtual special effects objects and virtual vegetation objects can be virtual model resources, virtual special effects resources and virtual vegetation resources.
[0085] A game editor is an engine tool provided by a game engine that can run edited scripts. Each game engine has its own corresponding game editor. A resource loading script is a pre-compiled script that can be run in a game editor. The resource loading script is used to call game resources in the game process of the target game started in the game editor, such as calling the map scene, game props, and game characters in the game, so that the game engine can load the game resource data corresponding to these game resources into the running memory of the game production terminal on the terminal device where the game is running.
[0086] The target games here may include but are not limited to competitive games, parkour games, shooting games, and board games. Figure 1 A game production terminal is selected from the multiple game production terminals shown as the target game production terminal. The target game production terminal here may include: smart phones, tablet computers, laptops, desktop computers, smart TVs and other smart terminals with game data processing functions.
[0087] For ease of understanding, the embodiments of the present application may be Figure 1 The game production terminal 31 shown is used as a target game production terminal. When the game production user is in the target game production terminal, for the desired game scene, the game production user loads the game objects in the game production terminal 31, such as by loading virtual model objects, virtual special effect objects and virtual vegetation objects, and adjusting the positional relationship between the objects, to generate the desired game scene.
[0088] It should be understood that users in the market can instantiate the game resources produced by the game engine into game objects through the editor, and complete the setting of the game scene by continuously adding game objects in the editor and adjusting the position of the game objects. For the setting of the same game scene, the user still needs to load game resources one by one to generate game objects, and adjust the position, resulting in a long game editing time and low game development efficiency. In the scheme of the embodiment of the present application, the game editor can load a resource template file to generate multiple game objects instantiated by multiple game resources, and the position between multiple game objects is specified by the position parameter in the resource template file. Then the embodiment of the present application can load multiple game resources in the game editor at one time, directly instantiate multiple game sub-objects adjusted in position, and no need to adjust the position again, which greatly improves the efficiency of game development in the game editor.
[0089] To implement the above solution, an embodiment of the present application provides a resource loading method, which is described below from the perspective of a game production terminal.
[0090] See also Figure 2 ,like Figure 2 The figure is a flow chart of a resource loading method provided in an embodiment of the present application, the method comprising:
[0091] Step 201. Obtain a first resource template file, the first resource template file includes a plurality of first game resources and a first position parameter, the first position parameter indicates a positional relationship between a plurality of first game sub-objects, and the first game sub-objects and the first game resources have a corresponding relationship in data.
[0092] In one or more embodiments, for the developed game scene, the user can pre-configure the game resources, load the game resources through the game production terminal, and the user can select the first resource template file according to the game scene requirements. Accordingly, the game production terminal can read the basic information of the resource template file, including the file storage location, file version, etc. Among them, for multiple game objects that are reused, the user can pre-configure the first resource template file including multiple first game resources and first position parameters. The first position parameter can indicate the position relationship between multiple first game sub-objects corresponding to the multiple first game resources. The first game resource and the first game sub-object have a corresponding relationship in data, and the resource data of the first game resource and the operating data of the first game sub-object correspond to each other, that is, one first game resource can be instantiated into one or more first game sub-objects. The position relationship between multiple first game sub-objects can include the relative relationship between any one of the first game sub-objects and other first game sub-objects, such as relative distance, relative direction, etc., and the first position parameter is the storage form of the relative distance or relative direction, etc. in the first resource template file.
[0093] For example, the format of the resource template file can be referred to Figure 3 As shown, the resource template file can be divided into basic file information and game sub-object information, where the basic file information records the basic information of the template file, such as file name, creator, creation version, etc. The game sub-object information records the referenced game resource files, and each resource file should be directly serialized into a game object in the game. Figure 3 In the example, three game sub-objects are referenced (such as game sub-object 1, game sub-object 2, and game sub-object 3). Each game sub-object can record the position parameters of the game sub-object and the resource path of the game resource corresponding to the game sub-object ( Figure 3 Take game sub-object 1 as an example).
[0094] Step 202: Generate a first game object according to the first resource template file, where the first game object includes a plurality of first game sub-objects.
[0095] In one or more embodiments, after obtaining the first resource template file, the game production terminal can traverse the information of all first game sub-objects recorded in the first resource template file, read the first game resources according to the storage location of each first game resource, and serialize them, that is, instantiate them into specific first game objects. Among them, each first game sub-object is generated by instantiating the corresponding first game resource, and multiple first game sub-objects are arranged according to the position relationship indicated by the first position parameter, and multiple first game sub-objects and their position arrangement constitute the first game object.
[0096] For example, the schematic diagram for generating the first game object can be found in Figure 4 As shown, the interface of the first game object presented by the game production terminal can be called an editing interface. The editing interface can be divided into a game object display area and a resource display area. For the generated first game object, it is assumed that the first game object includes two game sub-objects, such as Figure 4 There are two avatars in the game object display area, and the position relationship between the two avatars is determined by the position parameters (the avatars here are only examples, and can be models, special effects or vegetation, etc., and the position relationship can be such as the static position relationship between houses), while the resources corresponding to the two avatars are displayed in the resource display area, such as resource 1 and resource 2.
[0097] Step 203: In response to an editing operation based on the game scene, adjust the first game object according to the editing operation.
[0098] In one or more embodiments, after the user loads the first resource template file to generate the first game object, the user can also edit the first game object according to the requirements of the game scene being constructed, and the game production terminal adjusts the first game object according to the editing operation. Exemplarily, the user can migrate the entire first game object to the corresponding position by dragging or other means, and the user can also instruct to adjust the color of one or more first game sub-objects in the first game object. Among them, the game scene display is the game scene area of the game scene editing page, and the game scene editing page is generated according to the game scene configuration file.
[0099] It should be noted that in this application, the game scene configuration file refers to the game asset file, and the game asset refers to all digital resources used to fill the game world. Common role models, terrains, game animations, and computer graphics all belong to game assets. For example, the game asset file is a digital asset file corresponding to the Houdini software. Houdini software is a three-dimensional computer graphics software developed by Side Effects Software Inc. (SESI for short) of Canada. SESI was founded by Kim Davidson and Greg Hermanovic in 1987. Houdini software is a product designed entirely based on the node mode, and its structure, operation mode, etc. are very different from other three-dimensional software. Houdini software encapsulates the integrated nodes into a subnet to create digital assets in HDA (Houdini Digital Asset) format, and then imports them into the game scene editing software to programmatically adjust the digital assets through the game scene editing software.
[0100] The embodiment of the present application obtains a first resource template file including multiple first game resources, loads multiple corresponding first game sub-objects according to the multiple first game resources, and all the first game sub-objects together constitute the first game object, and then adjusts the first game object according to the editing operation of constructing the game scene. Among them, the first position parameter in the first resource template file indicates the positional relationship between the multiple first game sub-objects. In this way, when instantiating game resources, the user can load multiple game resources at one time, and can directly instantiate multiple game sub-objects with adjusted positions without having to adjust the positions, which greatly improves the efficiency of game development.
[0101] Optionally, in the above Figure 2 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, after generating the first game object according to the first resource template file, the method further includes:
[0102] Obtaining an overwrite parameter corresponding to the first game sub-object, the first resource template file including the overwrite parameter corresponding to the first game sub-object, the overwrite parameter corresponding to the first game sub-object including position information of the first game sub-object;
[0103] The position of the first game sub-object is adjusted according to the overridden parameter corresponding to the first game sub-object.
[0104] In one or more embodiments, the first resource template file also stores an override parameter for adjusting the position of the first game sub-object, and the override parameter is used to overwrite the position parameter of the same first game sub-object in the first position parameter. After the first game object is generated according to the first game resource and the first position parameter, the position of the first game sub-object can be adjusted accordingly according to the difference in the override parameter of the first game sub-object. Exemplarily, assuming that the parameter of game sub-object 1 in the first position parameter is 1, and the parameter of game sub-object 1 in the override parameter is 2, the position of game sub-object 1 is adjusted based on 2 in the override parameter. Among them, the parameters in the override parameter can be the same as the parameters in the first position parameter, or they can be different. When they are different, it means that the position of the first game sub-object can be different from the position when the first resource template file is configured, and it does not have to be consistent with the first resource template file itself.
[0105] For example, another format diagram of a resource template file with overwrite parameters added can be referred to Figure 5 As shown, the resource template file is in Figure 3 Based on this, a list of override parameters is added to Figure 3Taking game sub-object 1, game sub-object 2 and game sub-object 3 in the example, the overridden parameter list includes parameter 1 corresponding to game sub-object 1, parameter 2 corresponding to game sub-object 2 and parameter 3 corresponding to game sub-object 3. Taking parameter 1 as an example, parameter 1 can include the parameter name of the parameter you want to change for the game sub-object and the parameter value of the specific change of the parameter name. It can also include an overridden variable name, which is used to refer to the game sub-object to avoid erroneous changes to the position of other game sub-objects.
[0106] In the embodiment of the present application, a method for overriding position parameters is provided. Through the above method, the implementation of overriding parameters allows the parameters of the instantiated game object and the source resource file to be inconsistent, so that the game object generated by this resource template has a certain "personality" of its own, which increases the flexibility of users in producing game resources and greatly improves the efficiency of game development and production resources.
[0107] Optionally, in the above Figure 2 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, generating a first game object according to a first resource template file includes:
[0108] Instantiate a plurality of first game resources into a plurality of first game sub-objects;
[0109] The position of each first game sub-object is adjusted according to the first position parameter.
[0110] In one or more embodiments, the first game resource is stored in the device in the form of a file. When the first resource template file is loaded, the state information of the first game resource can be converted into a form that can be stored or transmitted by serialization, that is, it can be stored in a temporary storage area of the game production terminal or transmitted to another device. After generating the first game sub-object, the game production terminal also needs to adjust the position of each current first game sub-object so that it meets the position indicated by the first position parameter. The first game sub-objects after the position adjustment constitute the first game object.
[0111] In an embodiment of the present application, a method for instantiating a game object is provided. Through the above method, after generating multiple first game sub-objects, the positions of the first game sub-objects can also be automatically adjusted, that is, when loading game resources, a game object with an adjusted position can be generated, saving the user's position adjustment time and improving game development efficiency.
[0112] Optionally, in the above Figure 2 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, the plurality of first game sub-objects include a first sub-object and a second sub-object, and before obtaining the first resource template file, the method further includes:
[0113] Get the first sub-object and the second sub-object;
[0114] A first resource template file is generated according to a first relative position relationship between the first sub-object and the second sub-object, and a game resource corresponding to the first sub-object and a game resource corresponding to the second sub-object.
[0115] In one or more embodiments, when configuring the first resource template file, the user can freely combine various game resources according to their own needs, such as the user can configure the first resource template file by combining 2, 3 or more game objects. Assuming that the user requires the combination of two first game sub-objects to be reused, the game resources corresponding to the two first game sub-objects can be combined to configure the first resource template file. The two selected first game sub-objects can be called the first sub-object and the second sub-object. The game production terminal can generate the first sub-object according to the user's loading instruction for the game resource corresponding to the first sub-object, and generate the second sub-object according to the user's loading instruction for the game resource corresponding to the second sub-object. The user can freely adjust the positional relationship between the first sub-object and the second sub-object, such as the adjustment of distance and direction. The game production terminal can generate the first resource template file based on the user's save instruction, the game resources corresponding to the first sub-object and the game resources corresponding to the second sub-object in the current editing interface, and the first relative position relationship between the first sub-object and the second sub-object. Exemplarily, assuming that the first sub-object is a person and the second sub-object is a tool, the positional relationship between the person and the tool can be that the tool is held in the person's hand or that the tool is near the person (such as a scene where the tool falls). In this case, the first game object is the person holding the tool or the tool falling near the person; assuming that the first sub-object is a person and the second sub-object is the earth, the positional relationship between the person and the earth can be that the person is standing on the earth or that the person is above the earth. In this case, the first game object is that the person is standing on the earth or that the person is above the earth; assuming that the first sub-object is a person and the second sub-object is a person, the second person can be in front of, behind, to the left, to the right, or diagonally, etc. of the first person, and the distance between the two people can also be adjusted freely.
[0116] In the embodiment of the present application, a combination method of game objects is provided. Through the above implementation method, users can freely combine game resources, that is, customize resource templates, to speed up game development efficiency.
[0117] Optionally, in the above Figure 2 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, after obtaining the first sub-object and the second sub-object, the method further includes:
[0118] Get the local coordinate system;
[0119] A first relative position relationship is determined according to the positions of the first sub-object and the second sub-object in the local coordinate system.
[0120] In one or more embodiments, in order to ensure the accuracy of the first relative position relationship between the first sub-object and the second sub-object, the game production terminal can obtain a local coordinate system when generating the first resource template file. The local coordinate system covers the first sub-object and the second sub-object, and the first relative position relationship can be determined based on the positions of the first sub-object and the second sub-object in the local coordinate system. Among them, the local coordinate system can be pre-established or established based on the positions of the first sub-object and the second sub-object. The first relative position relationship can be the displacement between the first sub-object and the second sub-object, or the rotation of the first sub-object or the second sub-object. Taking the second sub-object as an example, the rotation can be the rotation of the second sub-object relative to the first sub-object, or the rotation of the second sub-object relative to the coordinate axis, which is not limited here. The first relative position relationship can also include the scaling degree of the first sub-object or the second sub-object, that is, the degree of reduction or enlargement of the sub-object relative to another sub-object, or the degree of reduction or enlargement of the sub-object relative to the reference size.
[0121] For example, a schematic diagram of the local coordinate system can be referred to Figure 6 As shown, the zero point position of the local coordinate system is not limited in the game object display area. The local coordinate system includes the x-axis, y-axis and z-axis. The local coordinate system can be explicit or implicit, that is, it can be manually selected to be visible or invisible. The first sub-object and the second sub-object can both determine the coordinates based on the local coordinate system. Based on the local coordinate system, the position parameter can indicate the displacement, rotation, scaling, etc. of the game sub-object. The format of the resource template file can also be Figure 4 or Figure 5 Based on the above, the position parameters of the game sub-object 1 are changed to displacement, rotation, and scaling. Figure 5 Based on, the format of the resource template file can also be as follows Figure 7 shown.
[0122] In an embodiment of the present application, a method for determining a relative position relationship is provided. Through the above implementation, the relative position is determined according to the coordinates of the first sub-object and the second sub-object in the local coordinate system, thereby improving the accuracy of the relative position.
[0123] Optionally, in the above Figure 2 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, after generating a first resource template file according to the first relative position relationship between the first sub-object and the second sub-object, and the game resources corresponding to the first sub-object and the game resources corresponding to the second sub-object, the method further includes:
[0124] Get the third child object;
[0125] A second resource template file is generated according to a plurality of first game resources, a second relative position relationship and game resources corresponding to a third sub-object, wherein the second relative position relationship includes a position relationship between any two sub-objects among the first sub-object, the second sub-object and the third sub-object.
[0126] In one or more embodiments, for the first resource template file that has been generated, in the embodiment of the present application, the first game object generated by the first resource template file can also be added to the game object. For the first resource template file that has been loaded, that is, the editing interface of the game production terminal has displayed the first game object, the user can add the third sub-object according to his own needs, and accordingly, the game production terminal loads the game resources corresponding to the third sub-object according to the user's loading instruction, and generates the third sub-object in the editing interface. The user can adjust the position of the third sub-object. When the user determines the current position, for example, selects to save, the game production terminal can determine the position relationship between the first sub-object, the second sub-object and the third sub-object as the second relative position relationship, and then the game production terminal can generate the second resource template file based on the game resources corresponding to the first sub-object and the game resources corresponding to the second sub-object in the first resource template file, the game resources corresponding to the third sub-object, and the second relative position relationship. The second relative position relationship may include the position relationship between any two sub-objects between the first sub-object, the second sub-object and the third sub-object, that is, the relative position of the first sub-object and the second sub-object, the relative position of the first sub-object and the third sub-object, and the relative position of the second sub-object and the third sub-object.
[0127] Exemplarily, the first game object does not include the third sub-object. The schematic diagram of the editing interface after adding the third sub-object can refer to Figure 8 As shown, the game object display area includes the first game object before being added and the third sub-object after being added. The first game object includes the first sub-object and the second sub-object. In addition to resource 1 and resource 2, the resource display area also includes resource 3 corresponding to the third sub-object.
[0128] In the embodiment of the present application, a method for adding game objects to a resource template file is provided. Through the above implementation, the user can further combine game resources based on the resource template file, that is, speed up the configuration efficiency of game resources and further improve the efficiency of game development.
[0129] Optionally, in the above Figure 2On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, after generating a first resource template file according to the first relative position relationship between the first sub-object and the second sub-object, and the game resources corresponding to the first sub-object and the game resources corresponding to the second sub-object, the method further includes:
[0130] Get the adjustment parameters of the first sub-object;
[0131] The position of the first sub-object is adjusted according to the adjustment parameters, and the override parameters corresponding to the first sub-object are modified. The first resource template file includes the override parameters corresponding to the first game sub-object, and the override parameters corresponding to the first game sub-object are used to record the adjusted position of the first game sub-object.
[0132] In one or more embodiments, for the first resource template file that has been generated, the first position parameter in the first resource template file is fixed. When the positional relationship between sub-objects needs to be changed due to scene requirements, the user can adjust the position of the sub-object. The user can adjust the position of the first sub-object. Accordingly, the game production terminal obtains the adjustment parameters of the first sub-object according to the user's adjustment instruction, such as adjusting the relative distance, adjusting the relative direction, or adjusting the size of the first sub-object, and the game production terminal can adjust the position of the first sub-object on the editing interface according to the adjustment parameter. At this time, the game production terminal can also record the adjustment of the first sub-object in the first resource template file, such as configuring an overwrite parameter list in the first resource template file, and the overwrite parameter list includes the overwrite parameter of the first sub-object, that is, the overwrite parameter of the first sub-object can be used to overwrite the position parameter of the first sub-object in the first position parameter, and the game production terminal can modify the overwrite parameter of the first sub-object according to the adjustment parameter. Among them, the overwrite parameter can be initially empty or the same as the parameter on the first position parameter, which is not limited here. In the embodiment of the present application, the user can also directly move the position of the sub-object. After the user saves, the game production terminal automatically updates the position adjustment to the overwrite parameter corresponding to the sub-object in the resource template file.
[0133] In the embodiment of the present application, a method for adjusting the position of a game object is provided. Through the above implementation, the position of any game object in the combined game object generated by the resource template file can be freely adjusted, while improving the individuality of the resource template file, avoiding reconfiguration of the resource template file, and improving the development efficiency of game resources.
[0134] Optionally, in the above Figure 2 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, obtaining the adjustment parameter of the first sub-object includes:
[0135] In response to a selection instruction for the first sub-object, presenting an overwrite parameter interface corresponding to the selection instruction;
[0136] Get the input data in the override parameter interface;
[0137] The tuning parameters are determined based on the input data.
[0138] In one or more embodiments, the user edits the adjustment parameters by selecting the first sub-object in the editing interface to generate a selection instruction, or by selecting the loading object that refers to the first sub-object in the loading list of the editing interface. The selection method may be a single click, a double click, or a right click. In response to the selection instruction, an overwrite parameter interface corresponding to the selection instruction may be presented in the editing interface. The user may directly input input data indicating the position adjustment of the first sub-object through the overwrite parameter interface, and the game production terminal may determine the adjustment parameters for the first sub-object based on the input data. Exemplarily, the overwrite parameter interface may be displayed in the form of a pop-up window, which may provide an area for filling in the overwrite parameters, and the game production terminal may determine the input data based on the information filled in the pop-up window. In the embodiment of the present application, a selection button for an overwrite parameter interface may also be directly provided, that is, in addition to inputting the position adjustment parameters, the user also needs to fill in the sub-object to be adjusted.
[0139] For example, the form of overriding parameter interface can be found in Fig. 9 As shown, the game object display area includes the first sub-object and the second sub-object. The resource display area displays resource 1 used by the first sub-object and resource 2 used by the second sub-object. After the user selects resource 1, the override parameter interface corresponding to the first sub-object can pop up. The override parameter interface can include the parameter name and parameter value to be overwritten. Another form of the override parameter interface can be found in Fig.10 As shown, the game object display area includes the first sub-object and the second sub-object, and the resource display area displays resource 1 used by the first sub-object and resource 2 used by the second sub-object. In particular, the resource display area is also provided with an overwrite button. When the user selects overwrite, an overwrite parameter interface pops up. In addition to the parameter name and parameter value to be overwritten, the overwrite parameter interface also includes the name of the sub-object to be adjusted. Fig.10 As an example, the position change diagram of the override parameter interface can be referred to Fig.11 As shown, assuming that the initial displacement of the second sub-object is 1, the positions of the first sub-object and the second sub-object in the game object display area can be as follows: Fig.11 As shown in the upper part, when the displacement of the second sub-object is input as 2 through the overwrite parameter interface, the positions of the first sub-object and the second sub-object in the game object display area can be as follows Fig.11 Shown below.
[0140] In the embodiment of the present application, a method for determining adjustment parameters is provided. Through the above implementation, the user selects to modify the object, and the override parameter interface corresponding to the object pops up. The adjustment parameters are determined according to the input data of the override parameter interface, which provides the possibility of position adjustment for the combined game objects. The presented override parameter interface facilitates the user to adjust the position of the game objects.
[0141] Optionally, in the above Figure 2 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, the multiple game sub-objects further include a fourth sub-object, and the first sub-object is a parent object of the fourth sub-object;
[0142] After adjusting the position of the first sub-object according to the adjustment parameter, the method further includes:
[0143] The position of the fourth sub-object is adjusted accordingly according to the position adjustment of the first sub-object.
[0144] In one or more embodiments, the positional relationship of some game objects is fixed, that is, when adjusting the position of one of the game objects, it is also necessary to adjust the other game objects to the corresponding position. In the embodiment of the present application, these game objects with fixed positional relationships can be regarded as parent-child relationships. When multiple game sub-objects also include a fourth sub-object, if the positional relationship between the fourth sub-object and the first sub-object is fixed, the first sub-object can be set as the parent object of the fourth sub-object, or the fourth sub-object can be set as the parent object of the first sub-object, that is, the fourth sub-object performs the same position change as the position of the first sub-object changes, or the first sub-object performs the same position change as the position of the fourth sub-object changes. Exemplarily, assuming that the first sub-object is a person, the fourth sub-object can be a hat, clothing, or decoration, etc. When the position of the person changes, the hat, clothing, or decoration also needs to be fixed on the person and move with it.
[0145] For example, the format of the resource template file can be found in Figure 3 or Figure 5 or Figure 7 Add the parent object name based on Figure 7 Based on this example, another format diagram of the resource template file can be referred to Fig.12 As shown, the format information of the game sub-object 1 also includes the parent object name. When the game sub-object indicated by the parent object name moves, the game sub-object 1 also moves accordingly.
[0146] In the embodiment of the present application, a method of position following adjustment is provided. Through the above implementation, the user only needs to adjust the position of one game object, and the positions of other game objects with the game object as the parent object will also change accordingly, saving the time of position adjustment and increasing the speed of game development.
[0147] Optionally, in the above Figure 2 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, the plurality of first game resources include a first resource, the first resource corresponds to a first sub-object and a second sub-object, and the method further includes:
[0148] Obtaining names for the first sub-object and the second sub-object, where the names are used to distinguish the first sub-object from the second sub-object;
[0149] Record the naming in the first resource template file.
[0150] In one or more embodiments, some game objects may appear multiple times in a game scene, that is, multiple identical game objects may appear in a game screen, and the game object may be obtained by loading the same game resource. When the first sub-object and the second sub-object are the same game objects, and the first sub-object and the second sub-object are both generated by loading the first resource, in order to distinguish the first sub-object from the second sub-object, the first sub-object and the second sub-object may be named respectively, and the naming may assist the user to refer to the sub-object in the editing interface according to the sub-object name, and the game production terminal may save the naming in the first resource template file, so that each time the first resource template file is loaded, the user can distinguish each sub-object. Among them, the naming may be automatically named by the game production terminal, such as automatically adding serial numbers such as 1, 2, and 3, or may be named by the user input or the automatic naming of the game production terminal may be modified, which is not limited here. Exemplarily, assuming that multiple people appear in a game screen at the same time, and these people are generated by loading the corresponding game resources, the user can dress these people with corresponding decorations, and when referring to these people in the file, they can be distinguished by naming, such as person 1, person 2, person 3, etc., or by adding corresponding role names, etc.
[0151] For example, the format of the resource template file can be found in Figure 3 or Figure 5 or Figure 7 or Fig.12 Add a name based on Fig.12 Based on this example, another format diagram of the resource template file can be referred to Fig.13 As shown, the format information of the game sub-object 1 also includes a naming name, and the naming name uniquely refers to the game sub-object 1 in the resource template file.
[0152] In the embodiment of the present application, a method for distinguishing game objects is provided. Through the above implementation, the names of multiple game objects from the same game resource are recorded in the resource template file, and each game object can be directly distinguished each time it is loaded, thereby improving the efficiency of game editing.
[0153] Optionally, in the above Figure 2 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, after generating the first game object according to the first resource template file, the method further includes:
[0154] Acquire a third resource template file, the third resource template file includes a plurality of second game resources and a second position parameter, the second position parameter indicates a positional relationship between the plurality of second game sub-objects, and the second game sub-objects and the second game resources have a corresponding relationship in data;
[0155] Generate a second game object according to the third resource template file, where the second game object includes a plurality of second game sub-objects;
[0156] A fourth resource template file is generated according to the plurality of first game resources, the plurality of second game resources and the third relative position relationship, wherein the third relative position relationship includes the position relationship between any two sub-objects between the plurality of first game sub-objects and the plurality of second game sub-objects.
[0157] In one or more embodiments, for the first resource template file that has been generated, in addition to continuing to add game objects one by one to the first game object generated by the first resource template file, a third resource template file can also be directly loaded on the basis of loading the first resource template file. The third resource template file can be the first resource template file, or it can be other resource template files except the first resource template file. The third resource template file is also pre-configured by the user, including multiple second game resources, and a second position parameter indicating the positional relationship between multiple second game sub-objects corresponding to the multiple second game resources. The second game resources and the second game sub-objects have a corresponding relationship in data, that is, a second game resource can be instantiated into one or more second game sub-objects, and multiple second game sub-objects and their positional arrangement constitute a second game object. The positional relationship between multiple second game sub-objects may include the relative relationship between any second game sub-object and other second game sub-objects.
[0158] Specifically, the game production terminal can traverse the information of all second game sub-objects recorded in the third resource template file, read the second game resources and serialize them according to the storage location of each second game resource, that is, instantiate them into second game objects arranged according to the position relationship indicated by the second position parameter. When the user determines to save the first game object and the second game object on the current editing interface as a template file, the game production terminal can determine the game resources corresponding to each first game sub-object in the first game object and the game resources corresponding to each second game sub-object in the second game object, and save the game resources corresponding to each first game sub-object, the game resources corresponding to each second game sub-object in the second game object and the third relative position relationship as a fourth resource template file. The third relative position relationship may include the position relationship between any two sub-objects between multiple first game sub-objects and multiple second game sub-objects. Loading the fourth resource template file will directly generate multiple first game sub-objects and multiple second game sub-objects.
[0159] For example, the schematic diagram of the editing interface after adding the third resource template file can refer to Fig.14 As shown, the game object display area includes the first game object before adding and the second game object after adding. The first game object includes the first sub-object and the second sub-object. The second game object includes the fourth sub-object and the fifth sub-object, taking the fourth sub-object and the fifth sub-object as examples. In addition to resource 1 and resource 2, the resource display area also includes resource 4 corresponding to the fourth sub-object and resource 5 corresponding to the fifth sub-object. After the user chooses to save, resource 1, resource 2, resource 4 and resource 5 are merged into one file.
[0160] In the embodiment of the present application, another method of adding game objects to a resource template file is provided. Through the above implementation, the user can further combine resource template files based on the resource template files, that is, speed up the configuration efficiency of game resources and further improve the efficiency of game development.
[0161] The resource loading device in this application is described in detail below. Fig.15 , Fig.15 This is a schematic diagram of an embodiment of a resource loading device in an embodiment of the present application. The resource loading device 150 includes:
[0162] The acquisition unit 1501 is used to acquire a first resource template file, where the first resource template file includes a plurality of first game resources and a first position parameter, where the first position parameter indicates a positional relationship between the plurality of first game sub-objects, and the first game sub-objects and the first game resources have a corresponding relationship in data;
[0163] A generating unit 1502 is used to generate a first game object according to a first resource template file, where the first game object includes a plurality of first game sub-objects;
[0164] The adjustment unit 1503 is used to respond to an editing operation based on the game scene and adjust the first game object according to the editing operation.
[0165] In the embodiment of the present application, a resource loading device is provided. With the above device, when instantiating game resources, users can combine multiple resources according to their own needs to generate template files, that is, custom templates, and can load multiple game resources at one time, and can directly instantiate multiple game sub-objects with adjusted positions without the need to adjust the positions, which greatly improves the efficiency of game development.
[0166] Optionally, in the above Fig.15 On the basis of the corresponding embodiment, in another embodiment of the resource loading device 150 provided in the embodiment of the present application,
[0167] The acquisition unit 1501 is further used to acquire the overwrite parameter corresponding to the first game sub-object, the first resource template file includes the overwrite parameter corresponding to the first game sub-object, and the overwrite parameter corresponding to the first game sub-object includes the position information of the first game sub-object;
[0168] The adjustment unit 1503 is further configured to adjust the position of the first game sub-object according to the overwrite parameter corresponding to the first game sub-object.
[0169] In the embodiment of the present application, a resource loading device is provided. With the above device, the implementation of overwriting parameters allows the parameters of the instantiated game object and the source resource file to be inconsistent, so that the game object generated by this resource template has a certain "personality" of its own, which increases the flexibility of users in producing game resources and greatly improves the efficiency of game development and production resources.
[0170] Optionally, in the above Fig.15 On the basis of the corresponding embodiment, in another embodiment of the resource loading device 150 provided in the embodiment of the present application, the generating unit 1502 is specifically used for:
[0171] Instantiate a plurality of first game resources into a plurality of first game sub-objects;
[0172] The position of each first game sub-object is adjusted according to the first position parameter.
[0173] In an embodiment of the present application, a resource loading device is provided. With the above device, after generating multiple first game sub-objects, the positions of the first game sub-objects can also be automatically adjusted, that is, when loading game resources, game objects with adjusted positions can be generated, saving the user's position adjustment time and improving game development efficiency.
[0174] Optionally, in the above Fig.15 On the basis of the corresponding embodiment, in another embodiment of the resource loading device 150 provided in the embodiment of the present application,
[0175] The acquisition unit 1501 is further used to acquire the first sub-object and the second sub-object;
[0176] The generating unit 1502 is further configured to generate a first resource template file according to a first relative position relationship between the first sub-object and the second sub-object, and a game resource corresponding to the first sub-object and a game resource corresponding to the second sub-object.
[0177] In an embodiment of the present application, a resource loading device is provided. With the above device, users can freely combine game resources, that is, customize resource templates, to speed up game development efficiency.
[0178] Optionally, in the above Fig.15 On the basis of the corresponding embodiment, in another embodiment of the resource loading device 150 provided in the embodiment of the present application, the resource loading device 150 further includes a determining unit 1504, and the determining unit 1504 is specifically used to:
[0179] Get the local coordinate system;
[0180] A first relative position relationship is determined according to the positions of the first sub-object and the second sub-object in the local coordinate system.
[0181] In an embodiment of the present application, a resource loading device is provided. By using the above device, the relative position is determined according to the coordinates of the first sub-object and the second sub-object in the local coordinate system, thereby improving the accuracy of the relative position.
[0182] Optionally, in the above Fig.15 On the basis of the corresponding embodiment, in another embodiment of the resource loading device 150 provided in the embodiment of the present application,
[0183] The acquiring unit 1501 is further used to acquire a third sub-object;
[0184] The generation unit 1502 is also used to generate a second resource template file according to multiple first game resources, second relative position relationships and game resources corresponding to third sub-objects, wherein the second relative position relationship includes the position relationship between any two sub-objects among the first sub-object, the second sub-object and the third sub-object.
[0185] In the embodiment of the present application, a resource loading device is provided. With the above device, the user can further combine game resources based on the resource template file, that is, speed up the configuration efficiency of game resources and further improve the game development efficiency.
[0186] Optionally, in the above Fig.15 On the basis of the corresponding embodiment, in another embodiment of the resource loading device 150 provided in the embodiment of the present application,
[0187] The acquisition unit 1501 is further used to acquire adjustment parameters of the first sub-object;
[0188] The adjustment unit 1503 is further configured to:
[0189] The position of the first sub-object is adjusted according to the adjustment parameters, and the override parameters corresponding to the first sub-object are modified. The first resource template file includes the override parameters corresponding to the first game sub-object, and the override parameters corresponding to the first game sub-object are used to record the adjusted position of the first game sub-object.
[0190] In an embodiment of the present application, a resource loading device is provided. With the above device, the position of any game object in the combined game object generated by the resource template file can be freely adjusted, while improving the individuality of the resource template file, avoiding reconfiguration of the resource template file, and improving the development efficiency of game resources.
[0191] Optionally, in the above Fig.15 On the basis of the corresponding embodiment, in another embodiment of the resource loading device 150 provided in the embodiment of the present application, the acquisition unit 1501 is specifically used for:
[0192] In response to a selection instruction for the first sub-object, presenting an overwrite parameter interface corresponding to the selection instruction;
[0193] Get the input data in the override parameter interface;
[0194] The tuning parameters are determined based on the input data.
[0195] In an embodiment of the present application, a resource loading device is provided. With the above device, when a user selects to modify an object, an override parameter interface corresponding to the object pops up, and adjustment parameters are determined according to input data of the override parameter interface, providing the possibility of position adjustment for the combined game objects, and the presented override parameter interface facilitates the user to adjust the position of the game objects.
[0196] Optionally, in the above Fig.15 On the basis of the corresponding embodiment, in another embodiment of the resource loading device 150 provided in the embodiment of the present application, the multiple game sub-objects further include a fourth sub-object, and the first sub-object is a parent object of the fourth sub-object;
[0197] The adjusting unit 1503 is further configured to adjust the position of the fourth sub-object accordingly according to the position adjustment of the first sub-object.
[0198] In an embodiment of the present application, a resource loading device is provided. With the above device, the user only needs to adjust the position of one game object, and the positions of other game objects with the game object as the parent object will also change accordingly, saving the time of position adjustment and increasing the speed of game development.
[0199] Optionally, in the above Fig.15 On the basis of the corresponding embodiment, in another embodiment of the resource loading device 150 provided in the embodiment of the present application,
[0200] The acquisition unit 1501 is further used to acquire a name for the first sub-object and the second sub-object, where the name is used to distinguish the first sub-object from the second sub-object;
[0201] The resource loading device 150 further includes a recording unit 1505, which is specifically used for:
[0202] Record the naming in the first resource template file.
[0203] In an embodiment of the present application, a resource loading device is provided. By using the above device, the names of multiple game objects from the same game resource are recorded in a resource template file, and each loading can directly distinguish each game object, thereby improving game editing efficiency.
[0204] Optionally, in the above Fig.15 On the basis of the corresponding embodiment, in another embodiment of the resource loading device 150 provided in the embodiment of the present application,
[0205] The acquisition unit 1501 is further used to acquire a third resource template file, the third resource template file includes a plurality of second game resources and a second position parameter, the second position parameter indicates a positional relationship between the plurality of second game sub-objects, and the second game sub-objects and the second game resources have a corresponding relationship in data;
[0206] The generating unit 1502 is further configured to:
[0207] Generate a second game object according to the third resource template file, where the second game object includes a plurality of second game sub-objects;
[0208] A fourth resource template file is generated according to the plurality of first game resources, the plurality of second game resources and the third relative position relationship, wherein the third relative position relationship includes the position relationship between any two sub-objects between the plurality of first game sub-objects and the plurality of second game sub-objects.
[0209] In the embodiment of the present application, a resource loading device is provided. With the above device, users can further combine resource template files based on resource template files, that is, speed up the configuration efficiency of game resources and further improve the efficiency of game development.
[0210] Fig.16 : This is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. The computer device 300 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 322 (for example, one or more processors) and a memory 332, and one or more storage media 330 (for example, one or more mass storage devices) storing application programs 342 or data 344. Among them, the memory 332 and the storage medium 330 can be short-term storage or permanent storage. The program stored in the storage medium 330 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the node device. Furthermore, the central processing unit 322 can be configured to communicate with the storage medium 330 to execute a series of instruction operations in the storage medium 330 on the computer device 300.
[0211] The computer device 300 may also include one or more power supplies 326, one or more wired or wireless network interfaces 350, one or more input and output interfaces 358, and / or one or more operating systems 341, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.
[0212] The steps performed by the game production terminal in the above embodiment can be based on the Fig.16 The computer device structure shown.
[0213] A computer-readable storage medium is also provided in an embodiment of the present application, on which a computer program is stored. When the computer program is executed by a processor, the steps of the methods described in the above embodiments are implemented.
[0214] A computer program product is also provided in an embodiment of the present application, including a computer program, which, when executed by a processor, implements the steps of the methods described in the above embodiments.
[0215] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0216] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0217] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0218] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0219] If the integrated unit is implemented in the form of a software functional unit 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 application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0220] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A resource loading method, characterized in that: include: Acquire a first resource template file, wherein the first resource template file includes a plurality of first game resources and a first position parameter, wherein the first position parameter indicates a positional relationship between a plurality of first game sub-objects, and the first game sub-objects and the first game resources have a corresponding relationship in data; Generate a first game object according to the first resource template file, wherein the first game object includes the plurality of first game sub-objects; In response to an editing operation based on a game scene, the first game object is adjusted according to the editing operation.
2. The method according to claim 1, characterized in that After generating the first game object according to the first resource template file, the method further includes: Obtaining an overwrite parameter corresponding to the first game sub-object, where the first resource template file includes the overwrite parameter corresponding to the first game sub-object, and the overwrite parameter corresponding to the first game sub-object includes position information of the first game sub-object; The position of the first game sub-object is adjusted according to the overwrite parameter corresponding to the first game sub-object.
3. The method according to claim 1, characterized in that Generating the first game object according to the first resource template file comprises: Instantiating the plurality of first game resources into the plurality of first game sub-objects; The position of each of the first game sub-objects is adjusted according to the first position parameter.
4. The method according to claim 1, characterized in that: The plurality of first game sub-objects include a first sub-object and a second sub-object. Before obtaining the first resource template file, the method further includes: Get the first sub-object and the second sub-object; The first resource template file is generated according to a first relative position relationship between the first sub-object and the second sub-object, and a game resource corresponding to the first sub-object and a game resource corresponding to the second sub-object.
5. The method according to claim 4, characterized in that After acquiring the first sub-object and the second sub-object, the method further includes: Get the local coordinate system; The first relative position relationship is determined according to the positions of the first sub-object and the second sub-object in the local coordinate system.
6. The method according to claim 4, characterized in that After generating the first resource template file according to the first relative position relationship between the first sub-object and the second sub-object, and the game resources corresponding to the first sub-object and the game resources corresponding to the second sub-object, the method further includes: Get the third child object; A second resource template file is generated according to the multiple first game resources, the second relative position relationship and the game resources corresponding to the third sub-object, wherein the second relative position relationship includes the position relationship between any two sub-objects among the first sub-object, the second sub-object and the third sub-object.
7. The method according to claim 4, characterized in that After generating the first resource template file according to the first relative position relationship between the first sub-object and the second sub-object, and the game resources corresponding to the first sub-object and the game resources corresponding to the second sub-object, the method further includes: Obtaining adjustment parameters of the first sub-object; The position of the first sub-object is adjusted according to the adjustment parameters, and the override parameters corresponding to the first sub-object are modified. The first resource template file includes the override parameters corresponding to the first game sub-object, and the override parameters corresponding to the first game sub-object are used to record the adjusted position of the first game sub-object.
8. The method according to claim 7, characterized in that The acquiring the adjustment parameter of the first sub-object comprises: In response to a selection instruction for the first sub-object, presenting an overwriting parameter interface corresponding to the selection instruction; Obtain input data in the overwrite parameter interface; The adjustment parameter is determined according to the input data.
9. The method according to claim 7, characterized in that: The plurality of game sub-objects further include a fourth sub-object, and the first sub-object is a parent object of the fourth sub-object; After adjusting the position of the first sub-object according to the adjustment parameter, the method further includes: The position of the fourth sub-object is adjusted accordingly according to the position adjustment of the first sub-object.
10. The method according to claim 4, characterized in that The plurality of first game resources include a first resource, the first resource corresponds to the first sub-object and the second sub-object, and the method further includes: Obtaining names for the first sub-object and the second sub-object, where the names are used to distinguish the first sub-object from the second sub-object; The naming is recorded in the first resource template file.
11. The method according to any one of claims 1 to 10, characterized in that: After generating the first game object according to the first resource template file, the method further includes: Acquire a third resource template file, the third resource template file comprising a plurality of second game resources and a second position parameter, the second position parameter indicating a positional relationship between a plurality of second game sub-objects, the second game sub-objects and the second game resources having a corresponding relationship in data; Generate a second game object according to the third resource template file, wherein the second game object includes the plurality of second game sub-objects; A fourth resource template file is generated according to the plurality of first game resources, the plurality of second game resources and a third relative position relationship, wherein the third relative position relationship includes a position relationship between any two sub-objects between the plurality of first game sub-objects and the plurality of second game sub-objects.
12. A resource loading device, characterized in that: include: An acquisition unit, configured to acquire a first resource template file, wherein the first resource template file includes a plurality of first game resources and a first position parameter, wherein the first position parameter indicates a positional relationship between a plurality of first game sub-objects, and the first game sub-objects and the first game resources have a corresponding relationship in data; A generating unit, configured to generate a first game object according to the first resource template file, wherein the first game object includes the plurality of first game sub-objects; An adjustment unit is used to respond to an editing operation based on a game scene and adjust the first game object according to the editing operation.
13. A computer device, characterized in that: include: memories, transceivers, processors, and bus systems; Wherein, the memory is used to store programs; The processor is used to execute the program in the memory, comprising the following steps: The processor is used to execute the program in the memory, including executing the method according to any one of claims 1 to 11; The bus system is used to connect the memory and the processor so that the memory and the processor can communicate with each other.
14. A computer-readable storage medium comprising instructions, which, when executed on a computer, causes the computer to perform the method according to any one of claims 1 to 11.
15. A computer program product, characterized in that When the computer program product is executed on a computer, the computer performs the method according to any one of claims 1 to 11.
