Game development method and device based on packaging function library

By encapsulating the layered architecture of the function library and using a lightweight script engine, the problem of low development efficiency in rehabilitation medical equipment games is solved, enabling efficient and secure cross-platform game development.

CN121255151AActive Publication Date: 2026-01-02SHANGHAI ZHUODAO MEDICAL TECH CO LTD +1
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202511802307.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-02
Publication Date
2026-01-02
Estimated Expiration
2045-12-02

AI Technical Summary

Technical Problem

The development of games related to rehabilitation medical equipment faces challenges such as limited hardware resources, high development complexity, and high costs for cross-platform adaptation and maintenance, resulting in low development efficiency.

Method used

It adopts a layered architecture based on encapsulated function libraries, including a game base layer, agent layer, tool component layer and control protocol layer. It integrates a lightweight script engine, develops game logic through preset interfaces, and dynamically loads and updates game behavior at runtime.

Benefits of technology

It improves game development efficiency, reduces system resource requirements, simplifies cross-platform adaptation and maintenance, and ensures hardware security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121255151A_ABST
    Figure CN121255151A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a game development method and device based on a packaging function library, and relates to the technical field of rehabilitation medical embedded system game development technologies. The method comprises the following steps: acquiring a target function required by game development; organizing the target functions through a preset layered framework, and forming a packaging function library; and developing game logic based on an interface provided by the packaging function library. Through the method and the device, the problem of low game development efficiency is solved, and the effect of improving the game development efficiency is further achieved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the field of rehabilitation medical embedded system game development, in particular, to a game development method and device based on a packaged function library. BACKGROUND

[0002] Currently in the field of rehabilitation medical devices, users often need to perform thousands of repeated rehabilitation medical actions on the rehabilitation medical devices to achieve the training purpose. For example, the recovery of hand grip strength requires repeated "tighten-loosen" actions; for the recovery of arm muscles, repeated arm lifting is required, and the process is extremely boring, and patients (especially children or the elderly) are likely to develop resistance, resulting in poor training effect.

[0003] Currently, some small games are developed to help patients with rehabilitation training. For example, for the training of arm muscle recovery, a "racing car" type game can be developed, at which time the user pushes the mechanical arm of the medical device to control the direction of the "racing car" in the game; for wrist rotation rehabilitation training, a "screw tightening" game can be developed, and some game methods of rehabilitation medical devices are to control the mechanical arm to complete tasks such as "cooking in a virtual kitchen", "driving an airplane through a ring", etc.; or in the form of a soft robot glove, a game focusing on fine finger movement training is designed, such as "grabbing blocks" and "sorting beans", etc. For reference, please refer to Patent Application No. 202510544230.2.

[0004] Such small games are usually installed in the system of the rehabilitation medical device through an embedded module, and the game logic, rendering, and interaction functions need to be integrated into the original control mainboard of the rehabilitation medical device. At this time, the control mainboard is responsible for motor control, sensor data acquisition, safety monitoring, and other core training functions while running the small game, which results in the following problems for developers: limited hardware resources, high development complexity, high cross-platform adaptation and maintenance costs, etc.; common pain points include: Insufficient hardware abstraction layer: device interfaces such as screen, audio, and execution components are scattered, and game logic is coupled with specific hardware.

[0005] Scattered basic functions: common capabilities such as timing, screen caching, and graphics rendering lack unified packaging. Difficult to cross platforms: different target platform configurations are scattered, and the cost of unified building and adaptation is high.

[0006] Non-uniform life cycle management: initialization, running, pausing, and ending management are not standardized.

[0007] The above problems ultimately result in low efficiency of game development for rehabilitation medical devices, and there is currently no good solution. SUMMARY

[0008] This invention provides a game development method and apparatus based on an encapsulated function library, which at least solves the problem of low game development efficiency in related technologies.

[0009] According to an embodiment of the present invention, a game development method based on an encapsulated function library is provided, comprising: Obtain the target functions required for game development, wherein the target functions are obtained by filtering and selecting historical development data; The target functions are organized through a pre-defined layered architecture to form an encapsulated function library. The layered architecture includes a game base layer, a game agent layer, a tool component layer, and a control protocol layer. A lightweight script engine is integrated into the encapsulated function library, and the game logic is defined as an external script file. During game runtime, the script engine parses and executes the external script file to achieve dynamic loading and updating of game behavior. Game logic is developed based on the interfaces provided by the encapsulated function library.

[0010] In one exemplary embodiment, organizing the target functionality through the game base layer includes: Obtain a standard game base class, and define the target interface in a standardized manner based on the standard game base class, wherein the target interface includes at least one of initialization, main loop execution, pause and resume, and end cleanup; The game information is organized through the first structural tool of the game base layer, wherein the game information includes at least one of the following: game name, version, configuration parameters, and running status. The first information is defined and mapped using the second structural tool of the game's base layer to adapt to the basic requirements of different display interfaces. The first information includes at least color information.

[0011] In one exemplary embodiment, organizing the target functionality through the game proxy layer includes: The target device is encapsulated with a unified interface through a third-party architecture tool, and device availability checks, initialization / release processes, and error path logging are provided.

[0012] In one exemplary embodiment, organizing the target functionality through the tool component layer includes: Timer encapsulation is performed using the fourth structure tool; Screen caching and update optimization strategies are encapsulated using the fifth-structure tool; The sixth structure tool is used for graphical drawing interface processing to provide a multi-level log output interface.

[0013] In one exemplary embodiment, organizing the target function through the control protocol layer includes: Define the basic control protocol and command data structure in the first path.

[0014] In one exemplary embodiment, after developing the game logic based on the interface provided by the encapsulated function library, the method further includes: In the first mode, obtain the resource budget and the actual performance metrics of the system during runtime; When the actual performance indicators exceed the resource budget, performance profiling is performed to obtain performance analysis information. In the second mode, resource optimization operations are performed based on the performance analysis information, wherein the performance analysis information includes the estimated amount of performance resources saved, the optimization level, and the weight corresponding to the optimization level.

[0015] In one exemplary embodiment, the method further includes: The game proxy layer performs real-time verification of the hardware control commands issued by the game logic to the execution component based on an independently configured security policy file. If the hardware control command exceeds the scope defined in the security policy file, the game proxy layer intercepts the hardware control command.

[0016] According to another embodiment of the present invention, a game development apparatus based on a packaged function library is provided, comprising: The function acquisition module is used to acquire the target functions required for game development, wherein the target functions are obtained by filtering and screening historical development data; An encapsulation module is used to organize the target functions through a preset layered architecture and form an encapsulated function library. The layered architecture includes a game base layer, a game agent layer, a tool component layer, and a control protocol layer. A lightweight script engine is integrated into the encapsulated function library, and the game logic is defined as an external script file. During game runtime, the script engine parses and executes the external script file to achieve dynamic loading and updating of game behavior. The development module is used to develop game logic based on the interfaces provided by the encapsulated function library.

[0017] According to yet another embodiment of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored therein, wherein the computer program is configured to perform the steps in any of the above method embodiments when executed.

[0018] According to yet another embodiment of the present invention, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.

[0019] This invention organizes and encapsulates the target functions to be implemented through a pre-defined layered architecture, which can greatly improve game development efficiency. Therefore, it can solve the problem of low game development efficiency and achieve the effect of improving game development efficiency. Attached Figure Description

[0020] Figure 1 This is a flowchart of a game development method based on an encapsulated function library according to an embodiment of the present invention; Figure 2 This is a structural block diagram of a game development device based on an encapsulated function library according to an embodiment of the present invention. Detailed Implementation

[0021] The technical solutions of the embodiments of this application will be described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.

[0022] In the following description, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first," "second," etc., may explicitly or implicitly include one or more of that feature. In the description of this application, unless otherwise stated, "a plurality of" means two or more.

[0023] Furthermore, in this application, directional terms such as "upper," "lower," "left," and "right" may be defined relative to the orientation of the components shown in the accompanying drawings. It should be understood that these directional terms can be relative concepts, used for relative description and clarification, and may change accordingly depending on the orientation of the components in the accompanying drawings.

[0024] In this application, unless otherwise expressly specified and limited, the term "connection" should be interpreted broadly. For example, "connection" can be a fixed connection, a detachable connection, or an integral part; it can be a direct connection or an indirect connection through an intermediate medium. Furthermore, the term "coupled" can refer to an electrical connection that enables signal transmission.

[0025] As used herein, “about,” “approximately,” or “approximately” includes the stated value and the average value within an acceptable range of deviation from the given value, wherein the acceptable range of deviation is determined by a person skilled in the art taking into account the measurement under discussion and the error associated with the measurement of the given quantity (i.e., the limitations of the measurement system).

[0026] Example 1 This embodiment provides a game development method based on a packaged function library. Figure 1 This is a flowchart of a game development method based on an encapsulated function library according to an embodiment of the present invention, such as... Figure 1 As shown, the process includes the following steps: Step S11: Obtain the target functions required for game development, wherein the target functions are obtained by filtering and selecting historical development data; In this embodiment, developers or users first select or input the functions to be implemented through the interactive interface, or filter the functions based on historical data using a filtering tool to obtain the best and simplest functions, and then carry out subsequent development based on these functional requirements.

[0027] Step S12: The target functions are organized through a preset layered architecture to form an encapsulated function library. The layered architecture includes a game base layer, a game agent layer, a tool component layer, and a control protocol layer. A lightweight script engine is integrated into the encapsulated function library, and the game logic is defined as an external script file. During game runtime, the script engine parses and executes the external script file to achieve dynamic loading and updating of game behavior. In this embodiment, the required functions are compiled and organized through the game base layer, game agent layer, tool component layer and control protocol layer, respectively, so as to quickly realize game development; and in order to improve the subsequent game running efficiency, a lightweight script engine can also be encapsulated into the function library.

[0028] The game's foundation layer provides the game lifecycle and basic interfaces; the game agent layer abstracts and encapsulates devices such as screen, audio, and execution components; the tool component layer provides general capabilities such as timers, screen caching, and graphics rendering; and the control protocol layer provides control protocol definitions and interface entry points. Specifically, the game foundation layer first obtains and defines a standardized game base class to cover interfaces such as initialization, main loop execution, pause and resume, and end cleanup, thereby standardizing the basic process of the game project and achieving lifecycle management. Then, it organizes game information such as game name, version, configuration parameters, and running status through structures like `GameInfo` (the first structure tool), which can be tailored or extended according to project needs. Finally, it provides commonly used color definitions and mappings through utility classes like `GameColor` (the second structure tool) to adapt to the basic requirements of different display interfaces, thus building a color system. Similarly, the game agent layer first abstracts the device, that is, it encapsulates the screen, audio, and execution components (such as motors / vibrations) through `GameAgent` (the third structure tool), with typical capabilities including: Screen (`agent / Screen). `: Combining basic drawing and display buffering (with `utils / ScreenCache). (Compatibility); Adaptability to different resolutions / color depths is expanded by the project side according to the device.

[0029] Audio (`agent / Audio.hpp`): Placeholder for playback and basic control interface; specific encoding / decoding / streaming processing is integrated by the project depending on the hardware and system capabilities provided.

[0030] Execution components (such as `agent / Motor.hpp` and `agent / Vibrator.hpp`): provide motion control interfaces; specific control strategies and safety limits are implemented by the project according to the equipment specifications.

[0031] GIF(`agent / Gif). `: Provides a simple GIF parsing / playback interface (depending on the repository's implementation capabilities).

[0032] Then, device status and resource management are performed to provide necessary device availability checks, initialization / release processes, and error path logging (in conjunction with `utils / Trace). Complex condition monitoring, automatic calibration, and fault diagnosis can be extended and implemented in the project if needed.

[0033] For the utility component layer, this is achieved through a timer (`utils / GameTimer). `, i.e., the fourth structure tool) provides a high-precision timer encapsulation (based on the existing implementation in the repository) for game timing control, periodic task scheduling, and asynchronous callback triggering; cross-platform adaptation is achieved through internal conditional compilation of the function library or platform-layer implementation provided by the project side; then, it is achieved through screen caching (`utils / ScreenCache). The fifth structural tool provides screen caching and basic update optimization methods (such as dirty areas / incremental updates, provided within the existing implementation scope) to reduce redundant drawing and invalid refreshes, and improve display performance and stability; subsequently, it provides graphics drawing (utils / Trace). The sixth structural tool provides a multi-level log output interface, supporting development debugging and runtime problem localization. Log levels and output backends (console / file / remote) are configured according to the actual project. The control protocol layer defines the basic control protocol and command / data structures in the following path as the interface agreement between the game and external control terminals / devices, thus implementing the protocol definition: `src / controlport / generalctrl / protocol / GameCtrlProtocol.h`. Specific transmission media (such as UDP, serial port, USB, etc.) and encoding / decoding details are implemented by the project side according to the target platform / driver conditions. Additionally, JSON / binary parameter passing, version compatibility strategies, etc., are optional extensions. When the project introduces the corresponding libraries and implementations, unified encoding / decoding and compatibility processing can be added at this layer to achieve protocol integration and expansion.

[0034] It should be noted that when building and deploying across platforms, CMake can be used to manage project builds to support common compilers / toolchains; platform differences can be handled through conditional compilation or toolchain file configuration; and for embedded target platforms, cross-compilation can be configured through toolchain files; specific optimizations (such as real-time kernel options, debugging symbols, and performance analysis integration) are selected by the project according to the target platform and deployment environment.

[0035] Furthermore, the function library incorporates a lightweight scripting engine (such as Lua, mPython, or a self-developed DSL interpreter) and provides two-way binding between C++ and scripting languages. This allows the core game flow, object behavior, and event responses to be written as external script files (such as level1.lua) instead of being hard-coded in C++. When the C++ GameBase executes the run method, it calls the scripting engine to execute these scripts. Meanwhile, the game's required resources, such as images, audio, and configuration files, are preprocessed into a resource package (assets.pak) using a packaging tool. The function library provides a resource manager, allowing resources to be loaded / unloaded from the resource package on demand at runtime. After the device boots up, the C++ framework runs. When a game scene is entered, the framework loads and executes the corresponding logic script. When game logic needs to be updated, developers only need to update the script files and resource packages via the network or external storage and restart the application for the changes to take effect. There is no need to recompile and flash the entire firmware, greatly reducing system resource requirements.

[0036] Additionally, a security boundary supervisor can be integrated into the game proxy layer. This supervisor sits between the game logic's calls to the proxy interface and the actual physical hardware driver, and its workflow is as follows: Loading the safety policy: During system initialization, the supervisor loads a separate safety policy file (e.g., safety_profile.json) from non-volatile storage. This file defines the safe operating boundaries of all critical actuators (such as the rehabilitation robot arm, motors, vibration motors, etc.), for example: { "motor_A": { "max_speed": 100, "max_force": 50, "valid_range": [-90, 90]}}.

[0037] Command interception and verification: When the game logic application calls a command such as GameAgent.motor_A.setSpeed, the call is not directly passed to the driver, but is first intercepted by the security boundary supervisor.

[0038] Decision-making and execution: The supervisor compares the command parameters with the loaded security policy. If the request exceeds the limit, the supervisor will execute a pre-defined corrective action, such as clamping the command parameters to a safe value or directly rejecting the command and logging a serious error. Only commands that pass the verification are allowed to proceed. This mechanism ensures that even if there are serious errors in the game logic, the hardware cannot perform dangerous actions, which is crucial for high-safety scenarios such as medical rehabilitation equipment.

[0039] Step S13: Develop game logic based on the interface provided by the encapsulated function library.

[0040] In this embodiment, after the functions are organized, modular development can be carried out based on the organized functions, which greatly improves development efficiency.

[0041] Example 2 The difference from Example 1 is that, based on the encapsulated function library of the game base layer, game proxy layer, and tool component layer, the following steps are further included: Development Mode (First Mode): In this mode, a lightweight resource manager is integrated during system build. Developers can define a resource budget for key functional modules or game scenarios. When the application runs on the target hardware, the resource manager will monitor resource consumption in real time, intervene in behaviors that exceed the budget, and generate a detailed performance analysis report.

[0042] Deployment Mode (Second Mode): When preparing to compile the final release version, the build process calls a profiling-guided optimization tool, which reads the performance profiling report and creatively employs an adaptive resource degradation algorithm based on a cost-benefit model to guide automated optimization.

[0043] The core of this algorithm lies in calculating an Optimization Efficiency Index (OEI) for each potential resource degradation operation (e.g., reducing the resolution of an image from 1024x1024 to 512x512). The formula for calculating this index is as follows: in, Represents normalized performance benefits. This indicates the estimated amount of performance resources that can be saved after performing the downgrade operation (e.g., the number of KB of memory or the number of milliseconds of CPU saved). This value is calculated based on the actual data in the performance profiling report, combined with resource characteristics (such as the relationship between image format and size). This represents the total budget value corresponding to the performance metric; normalization by dividing by the budget value makes the performance gains of different types (memory, CPU) comparable, thus determining what percentage of the optimization objective can be achieved in a given operation; the denominator This represents the weighted user experience cost, where This indicates the degree of degradation (e.g., mild degradation = 1, moderate = 2, severe = 3). The higher the level, the greater the damage to the picture or sound quality. This indicates the weight of the resource type. Degrading different types of resources has different impacts on user experience; for example, a decrease in the sound quality of background music. It may be lower resolution than the core interactive UI. These weights are less likely to be noticed because they are pre-configured by developers based on application characteristics. It is a global experience sensitivity coefficient (e.g., 0.1 to 1.0) used to adjust the aggressiveness of the overall optimization strategy. The higher the value, the more the system tends to optimize conservatively to protect the user experience.

[0044] In practical applications, the tool calculates the OEI value of all available degradation options and starts executing the operation with the highest OEI. The option with the highest OEI means that it is the best choice to obtain the maximum relative performance return with the least user experience cost. The tool will then execute this process in a loop until the system's various performance indicators have met the budget requirements according to the analysis report.

[0045] This implementation replaces the traditional one-size-fits-all degradation strategy and can intelligently weigh multiple optimization options to achieve refined and optimized resource allocation. By quantifying user experience costs, it ensures that the optimization process always prioritizes sacrificing details that are least important to users, thereby preserving the core quality of the application to the greatest extent while meeting performance constraints. Moreover, the entire optimization process is executed automatically by the tool, and developers can flexibly customize optimization strategies by adjusting weights and sensitivity coefficients to adapt to the needs of different projects or different release channels. It also transforms performance issues from post-event discovery to real-time alerts and interventions during development, greatly shortening the debugging cycle.

[0046] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0047] This embodiment also provides a game development apparatus based on a packaged function library, which is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0048] Figure 2 This is a structural block diagram of a game development apparatus based on a packaged function library according to an embodiment of the present invention, such as... Figure 2 As shown, the device includes: The function acquisition module 21 is used to acquire the target functions required for game development, wherein the target functions are obtained by filtering and screening historical development data; The encapsulation module 22 is used to organize the target functions through a preset layered architecture and form an encapsulated function library. The layered architecture includes a game base layer, a game agent layer, a tool component layer, and a control protocol layer. A lightweight script engine is integrated into the encapsulated function library, and game logic is defined as external script files. During game runtime, the script engine parses and executes the external script files to achieve dynamic loading and updating of game behavior. Development module 23 is used to develop game logic based on the interfaces provided by the encapsulated function library.

[0049] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.

[0050] Embodiments of the present invention also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to perform the steps in any of the above method embodiments when executed.

[0051] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.

[0052] Embodiments of the present invention also provide an electronic device including a memory and a processor, the memory storing a computer program and the processor being configured to run the computer program to perform the steps in any of the above method embodiments.

[0053] In one exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.

[0054] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0055] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another apparatus, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0056] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0057] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0058] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0059] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A game development method based on an encapsulated function library, characterized in that, include: Obtain the target functions required for game development, wherein the target functions are obtained by filtering and selecting historical development data; The target functions are organized through a pre-defined layered architecture to form an encapsulated function library. The layered architecture includes a game base layer, a game agent layer, a tool component layer, and a control protocol layer. A lightweight script engine is integrated into the encapsulated function library, and the game logic is defined as an external script file. During game runtime, the script engine parses and executes the external script file to achieve dynamic loading and updating of game behavior. Game logic is developed based on the interfaces provided by the encapsulated function library.

2. The method according to claim 1, characterized in that, Organizing the target functionality through the game's base layer includes: Obtain a standard game base class, and define the target interface in a standardized manner based on the standard game base class, wherein the target interface includes at least one of initialization, main loop execution, pause and resume, and end cleanup; The game information is organized through the first structural tool of the game base layer, wherein the game information includes at least one of the following: game name, version, configuration parameters, and running status. The first information is defined and mapped using the second structural tool of the game's base layer to adapt to the basic requirements of different display interfaces. The first information includes at least color information.

3. The method according to claim 1, characterized in that, Organizing the target functionality through the game proxy layer includes: The target device is encapsulated with a unified interface through a third-party architecture tool, and device availability checks, initialization / release processes, and error path logging are provided.

4. The method according to claim 1, characterized in that, Organizing the target functionality through the tool component layer includes: Timer encapsulation is performed using the fourth structure tool; Screen caching and update optimization strategies are encapsulated using the fifth-structure tool; The sixth structure tool is used for graphical drawing interface processing to provide a multi-level log output interface.

5. The method according to claim 1, characterized in that, Organizing the target function through the control protocol layer includes: Define the basic control protocol and command data structure in the first path.

6. The method according to claim 1, characterized in that, After developing the game logic based on the interfaces provided by the encapsulated function library, the method further includes: In the first mode, obtain the resource budget and the actual performance metrics of the system during runtime; When the actual performance indicators exceed the resource budget, performance profiling is performed to obtain performance analysis information. In the second mode, resource optimization operations are performed based on the performance analysis information, wherein the performance analysis information includes the estimated amount of performance resources saved, the optimization level, and the weight corresponding to the optimization level.

7. The method according to claim 1, characterized in that, The method further includes: The game proxy layer performs real-time verification of the hardware control commands issued by the game logic to the execution component based on an independently configured security policy file. If the hardware control command exceeds the scope defined in the security policy file, the game proxy layer intercepts the hardware control command.

8. A game development device based on an encapsulated function library, characterized in that, include: The function acquisition module is used to acquire the target functions required for game development, wherein the target functions are obtained by filtering and screening historical development data; An encapsulation module is used to organize the target functions through a preset layered architecture and form an encapsulated function library. The layered architecture includes a game base layer, a game agent layer, a tool component layer, and a control protocol layer. A lightweight script engine is integrated into the encapsulated function library, and the game logic is defined as an external script file. During game runtime, the script engine parses and executes the external script file to achieve dynamic loading and updating of game behavior. The development module is used to develop game logic based on the interfaces provided by the encapsulated function library.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program is configured to perform the method described in any one of claims 1 to 7 when executed.

10. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Scene interactive limb active and passive rehabilitation training system based on virtual three-dimensional game

    CN120260821A

  • Game engine system for developing 3D game

    CN105005473A

  • Resource dynamic scheduling technology of distributed cloud computing system

    CN117762644A

  • Cross-platform game architecture, cross-platform game development method and electronic equipment

    CN118349217A

  • Printing process supervision method and system based on Internet of Things

    CN119313112A