Method, system and electronic device for dynamically modifying game object functionality
By receiving and parsing function modification instructions, a mapping relationship between game objects and updated functions is established, solving the problem of not being able to dynamically modify the functions of game objects in traditional game development. This enables flexible function adjustments during game runtime, enhancing the game's playability and fun.
Patent Information
- Application Number
- CN202410628828.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-21
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2044-05-21
AI Technical Summary
Traditional game development methods cannot dynamically modify the functionality of game objects during game runtime, leading to increased workload for developers and high update costs for users, and failing to meet players' personalized needs for game object functionality.
By receiving and parsing function modification instructions, a mapping relationship between game objects and updated functions is established, enabling dynamic function modification of game objects at runtime. This includes receiving game objects and storing them in the updated game functions, using the game engine to implement function updates, and dynamically adjusting the functions of game objects through the function modification interface and the engine.
It enables flexible modification of game functions during runtime, enhances the game's playability and fun, reduces the workload for developers and the update costs for users, and has a wide range of applications.
Smart Images

Figure CN118557967B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of game development, and in particular to a method and system for dynamically modifying the function of a game object, and an electronic device. BACKGROUND
[0002] In the field of electronic games, the functions of game objects are usually determined during the design phase, and developers will preset and hardcode specific game object functions before the game is released. However, this method makes it very difficult, if not impossible, to modify and adjust the functions of game objects after the game is released, unless by releasing game updates or patches. This method not only increases the workload of developers, but also increases the time and cost of users downloading and installing updates. On the other hand, with the development of the game industry and the diversification of player needs, dynamic modification of game objects has become an urgent need. Players want to modify the functions of game objects according to their preferences and game progress, such as changing the skills of characters, adjusting the difficulty of monsters, and even creating new game objects. However, traditional game development methods cannot meet these dynamic modification needs.
[0003] Therefore, there is a need for a method that can dynamically modify the functions of game objects during game execution to meet the needs of players and game developers. SUMMARY
[0004] To overcome the problems in the related art, one of the purposes of the present application is to provide a method for dynamically modifying the functions of game objects, which can flexibly modify the functions of game objects during game execution and meet the different needs of users, enhancing the playability and interest of the game.
[0005] A method for dynamically modifying the functions of game objects, comprising:
[0006] receiving and parsing a function modification instruction, and storing the parsed function modification instruction in a database;
[0007] implementing an updated game function corresponding to the function modification instruction;
[0008] receiving a game object and storing the game object in the updated game function;
[0009] establishing a mapping relationship between the updated game function and the game object, so that the game object exhibits new functions in the game.
[0010] In a preferred technical solution of the present application, the function modification instruction includes game object attributes, newly added game play types, and game object IDs that need to execute the newly added game play types.
[0011] In the preferable technical solution of the present application, the parsed function modification instruction is stored in the database, comprising:
[0012] verifying whether the function modification instruction conforms to the preset format;
[0013] segmenting the function modification instruction after judging that the function modification instruction conforms to the preset format; wherein the segmented instruction comprises game object attribute, newly added game play type and game object ID;
[0014] format-converting and storing the segmented instruction.
[0015] In the preferable technical solution of the present application, the segmenting of the function modification instruction further comprises:
[0016] judging whether the segmented instruction has errors;
[0017] generating error prompt if the segmented instruction has errors;
[0018] feeding back the error prompt to the user or the developer.
[0019] In the preferable technical solution of the present application, the format-converting and storing of the segmented instruction further comprises:
[0020] packaging the format-converted instruction to generate a modification instruction object;
[0021] wherein the modification instruction object is used for modifying and updating the format-converted instruction.
[0022] In the preferable technical solution of the present application, the receiving of the game object and the storing of the game object in the updated game function comprises:
[0023] establishing game object ID group in the updated game function;
[0024] storing the ID of the accepted game object in the game object ID group.
[0025] In the preferable technical solution of the present application, the establishing of the mapping relationship between the updated game function and the game object comprises:
[0026] acquiring the ID of the updated game function;
[0027] assigning the ID of the updated game function to the game object in the database.
[0028] In the preferable technical solution of the present application, after the game object exhibits new function in the game, further comprising:
[0029] The game object is deleted from the updated game function, so that the game object cannot execute the updated game function.
[0030] A second object of the present application is to provide a system for dynamically modifying the function of a game object, which is used to execute the method for dynamically modifying the function of a game object as described above, and the system comprises:
[0031] A game function database for storing game functions;
[0032] A function modification interface for receiving function modification instructions input by a user or a developer;
[0033] A function modification engine for dynamically modifying function data in the game function database according to the received function modification instructions, so as to change the function of the game object;
[0034] A game object modification interface for adding a game object to the game function database or for deleting a game object from the game function database.
[0035] A third object of the present application is to provide an electronic device comprising:
[0036] A processor; and
[0037] A memory having executable code stored thereon, which, when executed by the processor, causes the processor to execute the method for dynamically modifying the function of a game object as described above.
[0038] The present application has the following beneficial effects:
[0039] The method for dynamically modifying the function of a game object provided by the present application comprises the following steps: receiving and analyzing function modification instructions, storing the analyzed function modification instructions in a database; implementing updated game functions corresponding to the function modification instructions; receiving a game object and storing the game object in the updated game functions; and establishing a mapping relationship between the updated game functions and the game object, so that the game object exhibits new functions in the game. This method can flexibly modify the function of a game object during game running, can meet different needs of users, and can enhance the playability and interest of the game. This method can accept function modification instructions input by a user or a developer during game running, then analyze and store the instructions, and implement corresponding updated game functions in the game. Then, the game object is added to the updated game functions, so that the game object exhibits new functions in the game. This method for dynamically modifying the function of a game object has the advantages of high flexibility, convenient modification, wide application range, meeting different needs of users, and enhancing the playability and interest of the game.
[0040] This application also provides a system and electronic device capable of performing the above-described method for dynamically modifying the functions of game objects. This system can flexibly modify the functions of game objects during game runtime without modifying the game's source code or releasing new game updates. Attached Figure Description
[0041] Figure 1 This is a flowchart illustrating the method for dynamically modifying game objects provided by the present invention;
[0042] Figure 2 This is a flowchart illustrating the parsing function modification instructions provided by the present invention;
[0043] Figure 3 This is a flowchart illustrating the process of determining whether a split instruction is incorrect when dividing a function modification instruction, as provided by the present invention.
[0044] Figure 4 This is a schematic diagram of the system for dynamically modifying game objects provided by the present invention.
[0045] Figure label:
[0046] 1. Function modification interface; 2. Game object modification interface; 3. Game function database; 4. Function modification engine. Detailed Implementation
[0047] Preferred embodiments of the invention will now be described in more detail with reference to the accompanying drawings. While preferred embodiments of the invention are shown in the drawings, it should be understood that the invention can be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that the invention will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
[0048] In the video game industry, the functionality of game objects is typically determined during the design phase. Developers pre-define and hard-code specific game object functions before game release. However, this approach makes modifying and adjusting game object functions extremely difficult, even nearly impossible, after game release, unless through game updates or patches. This not only increases the workload for developers but also increases the time and cost for users to download and install updates. On the other hand, with the development of the game industry and the diversification of player needs, dynamic modification of game objects has become an urgent requirement. Players want to modify the functionality of game objects according to their preferences and game progress, such as changing character skills, adjusting monster difficulty, or even creating entirely new game objects. However, traditional game development methods cannot meet these needs for dynamic modification.
[0049] Based on this, this application provides a method for dynamically modifying the functionality of game objects.
[0050] Example 1
[0051] like Figures 1-3 As shown, this embodiment provides a method for dynamically modifying the functionality of game objects, including:
[0052] S100: Receive and parse the function modification instruction, and store the parsed function modification instruction in the database;
[0053] Specifically, the function modification instructions include game object attributes, newly added gameplay types, and the game object ID that needs to execute the newly added gameplay.
[0054] The database in this application can be in-game memory or in non-volatile memory in electronic computing. The database can be used to store game object data or game functionality.
[0055] In addition, this application can be designed according to game design and player needs. The new gameplay types may include changing the attributes of game objects, such as speed, strength, durability, etc.; behaviors, such as movement patterns, attack methods, etc.; or effects, such as visual effects, sound effects, etc.
[0056] S200, Implement the game update function corresponding to the function modification command;
[0057] The game engine typically implements the game update functionality corresponding to the function modification command. The game engine retrieves the code from the function modification command and executes the relevant code to implement the corresponding function.
[0058] S300: Receive the game object and store it in the updated game function;
[0059] S400. Establish a mapping relationship between updated game functions and game objects, enabling game objects to exhibit new functions in the game. Updated game functions refer to modified game functions, which vary depending on the game.
[0060] This application establishes a mapping relationship between game update functions and game objects, enabling dynamic modification of game object functions during gameplay. Traditional methods of modifying game object functions involve adding / deleting code, which is complex and cannot be dynamically modified during runtime; it requires direct modification of the source code. Therefore, in many games, a function may already exist, but it's difficult to assign it to a specific object as needed; the function of such an object needs to be determined during game development. The technical solution of this application establishes a mapping relationship between game update functions and game objects. This relationship can be implemented using lists or hash tables. During the update process, by traversing the IDs of game objects in the list and matching them with the updated game functions, the game object can exhibit the new function. Furthermore, during gameplay, various trigger functions can dynamically add and delete functions in the list, and even unexpected functions can be added.
[0061] The aforementioned method for dynamically modifying the functionality of game objects includes: receiving and parsing function modification instructions, storing the parsed instructions in a database; implementing the updated game functionality corresponding to the modification instructions; receiving game objects and storing them in the updated game functionality; and establishing a mapping relationship between the updated game functionality and the game objects, enabling the game objects to exhibit new functionality in the game. This method allows for flexible modification of game object functionality during game runtime, meeting diverse user needs and enhancing the game's playability and enjoyment. Specifically, this method accepts function modification instructions input by users or developers during game execution, parses and stores these instructions, and implements corresponding updated game functionality within the game. Adding the game object to the updated game functionality then allows the game object to exhibit new functionality in the game. This method for dynamically modifying game object functionality offers advantages such as high flexibility, ease of modification, and wide applicability, meeting diverse user needs and enhancing the game's playability and enjoyment.
[0062] Furthermore, the parsing of the function modification instruction involves storing the parsed function modification instruction in a database, including:
[0063] S110. Verify whether the function modification command conforms to the preset format;
[0064] S120. After determining that the function modification instruction conforms to the preset format, the function modification instruction is segmented; wherein, the segmented instruction includes game object attributes, newly added gameplay type, and game object ID;
[0065] S130. Convert and store the segmented instructions. The conversion involves changing the extracted segmented instructions from a string type to an appropriate data type (such as integer, floating-point number, etc.) so that they can be applied to game objects later.
[0066] When parsing the function modification instructions in this application, the game engine can only obtain the game update function corresponding to the function modification instructions after parsing the function modification instructions.
[0067] To effectively parse these instructions, a flexible and easy-to-understand instruction format is needed. The following provides a possible method for parsing game function modification instructions: Instruction format: <Target object type>: <Target object ID>: <Gameplay type> = <New value>. The target object can be a game object; the gameplay type can be different types such as boosting or sprinting; the new value is the new attribute value that the player or developer wants to set.
[0068] The verification process first checks whether the input command conforms to the defined format. It checks if all necessary parts are included and if the format is correct. Only if the format is correct and all parts are complete can the function modify the command be parsed.
[0069] Furthermore, the segmentation of the function modification instruction also includes:
[0070] S1201. Determine if there are any errors in the split instructions;
[0071] S1202. If an error is found in the segmented instructions, an error message is generated.
[0072] S1203. Provide error feedback to the user or developer.
[0073] The function modification command may contain formatting errors, and there may also be errors within each command itself. This application addresses this by setting error alerts. After the function modification command is successfully parsed, the segmented command is checked and judged to ensure that the segmented command is correct and to avoid subsequent execution failures. If the segmented command is determined to be incorrect, feedback is sent to the user or developer so that the user can make timely corrections. Incorrect commands may include invalid command formats, unconvertible data types, etc.
[0074] In a preferred embodiment, after converting and storing the segmented instructions, the process further includes:
[0075] S140. Encapsulate the converted instructions to generate a modification instruction object;
[0076] The modified instruction object is used to modify and update the converted instruction.
[0077] The modified command object can be a pre-packaged API. In the game, the modified command object can appear on the game interface. If the user is not satisfied with the added command, they can modify it by entering the modified command object, which allows for secondary modifications to the updated game functions.
[0078] Specifically, receiving the game object and storing it in the updated game function includes:
[0079] Create a game object ID group in the updated game features;
[0080] Store the ID of the received game object in the Game Object ID group.
[0081] Furthermore, establishing the mapping relationship between the game update function and the game object includes:
[0082] Get the ID to update game features;
[0083] The ID of the game feature to be updated is assigned to the game object in the database. The ID of the game feature to be updated is matched one-to-one with the game object that needs the update.
[0084] By creating a game object ID group within the game and adding the IDs of game objects for which new functionality needs to be added, the game object can be updated with a unique ID. In practical applications, each updated game function has a unique ID. To check if an object possesses a certain function, check if the object has a corresponding function ID. Once the ID of the updated game function matches the game object ID, the game object can then display the updated game function. For example, enabling the game object to display a jump function.
[0085] In a preferred embodiment, after the game object exhibits new functionality in the game, it further includes:
[0086] Remove the game object from the updated game functionality, making the game object unable to perform the updated game functionality.
[0087] This application enables the game engine to exhibit new functions by adding or deleting game objects in the game functionality.
[0088] The following example, which dynamically adds a jump function, illustrates in detail the method for dynamically modifying game objects in this application:
[0089] Suppose in a game, our existing objects, such as potted plants, do not have a jumping function, and we need to add a jumping function.
[0090] First, we need to analyze the situation. Within a certain time t, we need to lower the center of gravity h of the potted plant by a certain distance Δh. Then, we apply an upward force to the potted plant, giving it an upward velocity v (this velocity will continuously change, with the initial velocity being v0). We do not consider changes in potential energy here. The jumping phenomenon is manifested through the position of the potted plant's center of gravity and its deformation. For now, we will ignore the deformation and only consider the position of the center of gravity.
[0091] First, implement the potted plant jumping function we need to add. Implement the formula h = v0t – 0.5gt. 2 Where h is in meters (m), v0 is the initial velocity in meters per second (m / s), t is time in seconds (s), and g is the acceleration due to gravity.
[0092] The data needed to add the jump function to the object is known: h. Add v0, but don't merge it with the planar velocity for design convenience. To avoid adjusting the object's data, we don't store the upward velocity data on the object itself, but rather on the jump function. Adding the object to the jump function will implement the jump functionality. If you no longer need the object's jump function, simply remove the object from the jump function.
[0093] Example 2
[0094] like Figure 4 As shown, this embodiment provides a system for dynamically modifying game objects. The system is used to execute the method for dynamically modifying game objects as described above. The system includes:
[0095] Game Feature Database 3 is used to store game features; the game feature database can be configured with lists or hash tables to store game features.
[0096] Function Modification Interface 1 is used to receive function modification instructions input by users or developers. The function modification interface can be an API in the game. By adding the function modification interface, users or developers can add new functions to the game.
[0097] Function Modification Engine 4 is used to dynamically modify the function data in the game function database according to the received function modification instructions, thereby changing the function of game objects.
[0098] Game object modification interface 3 is used to add game objects to or delete game objects from the game function database.
[0099] The following describes the working process of the system for dynamically modifying game objects as described in this application:
[0100] First, a game function database is established to store data on game functions such as characters, monsters, and items. Then, a function modification interface is provided through the game interface, allowing players or developers to input function modification commands.
[0101] When a player or developer inputs a feature modification command, the system parses the command to determine the game feature that needs to be modified. Then, the feature modification engine dynamically modifies the game features in the game feature database based on the parsing results.
[0102] For example, a player can use the function modification interface to increase a character's attack power by 10%. After receiving this instruction, the system adds the function to increase attack power by 10% to the game's function database.
[0103] Next, the user inputs the game object that needs to have its attack power increased by 10% into the game object modification interface, and establishes a one-to-one mapping between the game object ID and the newly added game function. Finally, the system applies the modified game object data to the game. When the game runs, it iterates through the game function database, and when the newly added game function is executed, the corresponding game object will exhibit the new function.
[0104] In this way, players can dynamically modify the functionality of game objects without waiting for game updates or modifying the game source code.
[0105] Example 3
[0106] This embodiment provides an electronic device, which includes a memory and a processor. The memory stores executable code, which, when executed by the processor, causes the processor to perform the method described above for dynamically modifying game objects.
[0107] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.
[0108] Memory can include various types of storage units, such as system memory, read-only memory (ROM), and permanent storage devices.
[0109] The memory stores executable code, which, when processed by the processor, can cause the processor to execute some or all of the methods described above for dynamically modifying game objects.
[0110] Unless otherwise specifically stated, the relative arrangement, numerical expressions, and values of the components and steps set forth in these embodiments do not limit the scope of this application. Any specific values in all examples shown and discussed herein should be interpreted as merely exemplary and not as limitations. Therefore, other examples of exemplary embodiments may have different values. It should be noted that similar reference numerals and letters in the following figures denote similar items; therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0111] It should be understood that spatial relative terms are intended to encompass different orientations of a device in use or operation, in addition to the orientation described in the figures. For example, if a device in the figures is inverted, a device described as "above" or "on top of" other devices or structures will subsequently be positioned as "below" or "under" other devices or structures. Thus, the exemplary term "above" can include both "above" and "below". The device may also be positioned in other different ways (rotated 90 degrees or in other orientations), and the spatial relative descriptions used herein will be interpreted accordingly.
[0112] Furthermore, it should be noted that the use of terms such as "first" and "second" to define components is merely for the purpose of distinguishing the corresponding components. Unless otherwise stated, the above terms have no special meaning and therefore cannot be construed as limiting the scope of protection of this application.
[0113] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for dynamically modifying the functionality of a game object, characterized in that, include: Receive and parse function modification instructions, and store the parsed function modification instructions in the database; Implement the game update function corresponding to the function modification command; Receive the game object and store it in the updated game function; Establish a mapping relationship between updated game functions and game objects, so that game objects can exhibit new functions in the game; The step of receiving the game object and storing it in the updated game function includes: Create a game object ID group in the updated game features; Store the ID of the received game object in the game object ID group; The establishment of the mapping relationship between the game update function and the game object includes: Get the ID to update game features; Assign the ID for updating game features to the game object in the database; Removing the game object from the updated game functionality, preventing the game object from performing the updated game functionality, includes: Remove the relevant components of the game object from the game function database; Clean up all child objects of the game object: By running the game and observing the behavior of game objects, you can test whether the functionality of the game objects has been successfully removed and whether the game can run as expected.
2. The method for dynamically modifying game object functionality according to claim 1, characterized in that: The function modification instructions include game object attributes, new gameplay types, and the game object ID that needs to execute the new gameplay.
3. The method for dynamically modifying game object functionality according to claim 2, characterized in that: The parsed function modification instruction is stored in the database, including: Verify whether the function modification command conforms to the preset format; Once it is determined that the function modification command conforms to the preset format, the function modification command is segmented; the segmented command includes game object attributes, the newly added gameplay type, and the game object ID; The split instructions are formatted and stored.
4. The method for dynamically modifying game object functionality according to claim 3, characterized in that: When segmenting the function modification instructions, the method further includes: Determine if there are any errors in the split instructions; If an error is detected in the segmented instructions, an error message is generated. Error alerts will be sent to users or developers.
5. The method for dynamically modifying game object functionality according to claim 3, characterized in that: The process of converting and storing the segmented instructions also includes: The converted instructions are encapsulated to generate a modification instruction object; The modified instruction object is used to modify and update the converted instruction.
6. A system for dynamically modifying the functionality of game objects, the system being used to perform the method for dynamically modifying the functionality of game objects as described in any one of claims 1-5, the system comprising: Game feature database, used to store game features; The feature modification interface is used to receive feature modification instructions from users or developers. The function modification engine is used to dynamically modify the function data in the game function database according to the received function modification instructions, thereby changing the function of the game object; The game object modification interface is used to add game objects to or delete game objects from the game function database.
7. An electronic device, characterized in that, include: processor; as well as A memory having executable code stored thereon, which, when executed by the processor, causes the processor to perform a method for dynamically modifying game objects as described in any one of claims 1-5.
Citation Information
Patent Citations
Visual game data debugging method and system
CN115382216A