Cross-platform game development method and system

CN122816643APending Publication Date: 2026-09-25CHONGQING FENGFANYUN IND CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611185231.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-06
Publication Date
2026-09-25

AI Technical Summary

Technical Problem

[0005]本发明的目的在于提供一种跨平台游戏开发方法及系统,解决了现有技术中跨平台游戏开发时适配代码冗余、开发效率低下以及渲染、界面、资源管理模块相互割裂导致维护成本高的问题

Benefits of technology

[0014]本发明的一种跨平台游戏开发方法及系统,首先建立统一渲染抽象层和平台适配层,用于屏蔽底层图形接口差异并统一处理输入、文件存储及动态资源选择;然后基于上述两层开发自动化构建工具链,将语法树描述文件自动转换为各目标平台的可执行代码及资源包体;最后在生成的可执行包体中集成跨平台数据同步框架,用于运行时多客户端操作指令的汇集、依赖裁决与状态同步。本发明有效解决了现有技术中跨平台游戏开发存在的适配代码冗余、开发效率低下以及渲染、界面、资源管理模块相互割裂导致维护成本高的问题,显著降低了多平台适配的人力成本与代码冗余度,提升了跨平台游戏的开发与迭代效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122816643A_ABST
    Figure CN122816643A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of computer software development, and discloses a cross-platform game development method and system, which first establishes a unified rendering abstraction layer and a platform adaptation layer, is used for shielding the difference of a bottom layer graphic interface and uniformly processing input, file storage and dynamic resource selection; then develops an automatic construction tool chain based on the two layers, automatically converts a syntax tree description file into executable code and a resource package body of each target platform; and finally integrates a cross-platform data synchronization framework in the generated executable package body, is used for collecting, dependence decision and state synchronization of operation instructions of multiple clients in runtime. The application effectively solves the problems of redundant adaptation code, low development efficiency and high maintenance cost caused by the mutual separation of rendering, interface and resource management modules in the prior art cross-platform game development, significantly reduces the human cost and code redundancy of multi-platform adaptation, and improves the development and iteration efficiency of the cross-platform game.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer software development technology, and in particular to a cross-platform game development method and system. Background Technology

[0002] With the rapid development of the digital entertainment industry, games need to cover multiple operating systems and hardware platforms, including Windows, Android, iOS, and various game consoles, to expand their user base and enhance market competitiveness. Currently, cross-platform game development commonly employs layered architectures or middleware technologies. This involves encapsulating low-level graphics rendering interfaces (such as DirectX, OpenGLES, and Vulkan), abstracting platform-related inputs and outputs, and file systems to enable the compilation and execution of the same game logic on different platforms. For example, existing technologies include general graphics rendering solutions that isolate platform differences through window abstraction layers and language binding layers, as well as cross-platform program adaptation methods based on interface-compatible code replacement. Furthermore, to address data synchronization issues in cross-platform games, the industry has developed technologies such as cloud-based adjudication and dependency-based directed graph construction to solve the problem of inconsistent states among multiple clients. These solutions have, to some extent, improved the development efficiency of cross-platform games.

[0003] However, existing cross-platform game development methodologies still have significant limitations. First, at the graphics rendering and underlying interface adaptation levels, most solutions require developers to write independent adaptation code or maintain multiple sets of interface mapping tables for each target platform. This leads to the duplication of similar rendering logic across different platforms, resulting in high code redundancy. Furthermore, changes to the interface on any platform often require simultaneous modifications to the adaptation code on other platforms, leading to high maintenance costs. Second, the cross-platform adaptation processes for the user interface and resource management modules are fragmented. Interface adaptation typically relies on manually adjusting layout parameters or resolution mapping, while resource management employs independent download and caching strategies, lacking a unified abstraction layer to coordinate dependencies between interface layout, resource identifiers, and platform APIs. Third, while existing data synchronization solutions address the fundamental issue of multi-platform state consistency, they fail to systematically integrate the synchronization mechanism with code generation, adaptation configuration, and resource packaging within the development process. This means developers still need to handle the differentiated requirements of each platform, such as login authentication, progress storage, and matching isolation, hindering further improvements in overall development efficiency.

[0004] Therefore, how to reduce code redundancy and manpower costs in the process of adapting to multiple platforms while ensuring the efficiency of cross-platform game development has become an urgent problem to be solved in this field. Summary of the Invention

[0005] The purpose of this invention is to provide a cross-platform game development method and system, which solves the problems of redundant adaptation code, low development efficiency, and high maintenance costs caused by the fragmentation of rendering, interface, and resource management modules in the existing cross-platform game development.

[0006] To achieve the above objectives, the present invention provides a cross-platform game development method, comprising the following steps: A unified rendering abstraction layer and a platform adaptation layer are established. The unified rendering abstraction layer provides a rendering interface that is independent of the underlying graphics application programming interface and enables automatic selection of the rendering backend at runtime. The platform adaptation layer is used to map the raw events of different input devices into standardized action instructions, provide a cross-platform file storage interface, and dynamically select resource levels according to the device performance level. Based on the unified rendering abstraction layer and the platform adaptation layer, an automated build toolchain is developed. The automated build toolchain accepts a syntax tree description file as input and converts the syntax tree description file into executable code and resource packages for each target platform. Rendering-related calls are converted through the unified rendering abstraction layer, and resource-related operations are processed through the platform adaptation layer. A cross-platform data synchronization framework is integrated into the executable package generated by the automated build toolchain. The cross-platform data synchronization framework is used to aggregate multi-client operation instructions at runtime, build a directed graph of operation dependencies, and distribute a consistent state to each client.

[0007] The unified rendering abstraction layer defines a set of rendering interfaces and uses a shader compilation pipeline to convert high-level shader descriptions into target bytecode for multiple platforms. The target bytecode includes SPIR-V bytecode for the Vulkan platform, HLSL bytecode for the DirectX 12 platform, and MetalShading Language bytecode for the Metal platform. At runtime, the corresponding renderer implementation class is automatically selected based on the current operating system environment through a factory pattern or runtime dynamic loading mechanism, and the calls to the set of rendering interfaces are converted into system calls to the corresponding underlying graphics application programming interfaces.

[0008] The platform adaptation layer includes a dynamic resource adaptation module. This module collects the current device's CPU core count, GPU model, and available memory capacity. Based on the collected data, it comprehensively determines the current device's performance level, which includes high-performance, mid-range, entry-level, and low-end levels. The module receives resource identifiers, converts them into actual storage paths under the current platform through a resource identifier parsing pipeline, selects the corresponding resource variant based on the performance level during resource loading, and returns the resource instance after obtaining the resource content through a resource download pipeline.

[0009] The syntax tree description file is stored in JSON, XML, or YAML format. Each node in the syntax tree description file corresponds to a game object. The attributes of each node include the type identifier, position coordinates, size, and rendering style configuration parameters of the game object. The parent-child relationship between nodes expresses the hierarchical organization and logical association in the game world.

[0010] The automated build toolchain includes an incremental compilation module. The incremental compilation module compares the modified syntax tree description file with the syntax tree snapshot saved during the last build at the node level, calculates the hash value difference for each node, marks the absolute path of the changed node, recompiles only the code snippets corresponding to the changed nodes, generates an incremental update package, and pushes it to the update server.

[0011] During runtime, each platform client polls the update server, downloads the differential update package after detecting it, loads the new syntax tree upon the next game launch or through a hot update mechanism, and rebuilds the runtime view.

[0012] In the cross-platform data synchronization framework, the cloud synchronization server gathers parallel operation instructions from multiple clients to form a set of adjudication events for the current logical frame. For scenarios with operational dependencies, it constructs a directed graph of operational dependencies and generates a comprehensive adjudication sequence based on this graph. The cloud synchronization server calculates the order stability evaluation parameters of each operation event in the set of adjudication events. When there is no dependency between two operation events, they are determined to be able to execute in parallel. When there is a dependency between two operation events, the execution order is determined based on the directed graph of operational dependencies. The consistent state after adjudication is distributed to all connected clients in the form of incremental data packets. Each client receives the incremental data packets and performs a local state update.

[0013] A cross-platform game development system, including: A unified rendering abstraction layer module, which is connected to the automated build toolchain module, is used to provide the automated build toolchain module with a platform-independent rendering interface mapping table; A platform adaptation layer module, which is connected to the automated build toolchain module, is used to provide a unified call entry point for cross-platform application programming interfaces to the automated build toolchain module; An automated build toolchain module is connected to the unified rendering abstraction layer module and the platform adaptation layer module, respectively. It is used to receive the syntax tree description file, the rendering interface mapping table and the unified call entry point, and convert the syntax tree description file into an executable package for each target platform. The automated build toolchain module is also connected to the cross-platform data synchronization framework module, which is used to deploy the executable package to the target platform. A cross-platform data synchronization framework module is connected to the automated build toolchain module and is used to run in the executable package generated by the automated build toolchain module to achieve consistent synchronization of game states between multiple clients and cross-device connection of players.

[0014] This invention discloses a cross-platform game development method and system. First, a unified rendering abstraction layer and a platform adaptation layer are established to shield differences in underlying graphics interfaces and uniformly handle input, file storage, and dynamic resource selection. Then, an automated toolchain is developed based on these two layers to automatically convert syntax tree description files into executable code and resource packages for each target platform. Finally, a cross-platform data synchronization framework is integrated into the generated executable package for the aggregation, dependency adjudication, and state synchronization of multi-client operation instructions at runtime. This invention effectively solves the problems of redundant adaptation code, low development efficiency, and high maintenance costs caused by the fragmentation of rendering, interface, and resource management modules in existing cross-platform game development technologies. It significantly reduces the manpower costs and code redundancy of multi-platform adaptation, and improves the development and iteration efficiency of cross-platform games. Attached Figure Description

[0015] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below.

[0016] Figure 1 This is a flowchart of the steps of the cross-platform game development method according to the first embodiment of the present invention.

[0017] Figure 2 This is a principle block diagram of the cross-platform game development system according to the second embodiment of the present invention.

[0018] In the diagram: 201 - Unified Rendering Abstraction Layer Module, 202 - Platform Adaptation Layer Module, 203 - Automated Build Toolchain Module, 204 - Cross-Platform Data Synchronization Framework Module. Detailed Implementation

[0019] The embodiments of the present invention are described in detail below. Examples of the embodiments are shown in the accompanying drawings. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain the present invention, but should not be construed as limiting the present invention.

[0020] First embodiment: Please refer to Figure 1 This invention provides a cross-platform game development method, including the following steps: S101: Establish a unified rendering abstraction layer and a platform adaptation layer. The unified rendering abstraction layer provides a rendering interface that is independent of the underlying graphics application programming interface and enables automatic selection of the rendering backend at runtime. The platform adaptation layer is used to map the raw events of different input devices into standardized action instructions, provide a cross-platform file storage interface, and dynamically select resource levels according to the device performance level. Specifically, the unified rendering abstraction layer is used to shield the differences in the underlying graphics application programming interfaces of different operating systems. Specifically, this layer defines a set of rendering interfaces independent of the underlying graphics interface, which includes at least a renderer interface, a texture interface, a shader interface, and a mesh buffer interface. The upper-level game logic only needs to call the drawing commands in these unified interfaces, such as drawing meshes, binding textures, and setting shader parameters, without needing to know whether the underlying system actually uses DirectX, Vulkan, Metal, or OpenGL ES. To achieve automatic runtime selection of the rendering backend, a factory pattern or runtime dynamic loading mechanism is adopted in the unified rendering abstraction layer. When the program starts, the system automatically detects the currently running operating system environment and instantiates the corresponding concrete renderer class according to the pre-established mapping relationship between the platform and the renderer implementation class. For example, the D3D12Renderer class is instantiated on the Windows platform, the VulkanRenderer class on the Android platform, and the MetalRenderer class on the iOS platform. Each concrete renderer class internally encapsulates the underlying operations of the corresponding native graphics interface, such as device management, command queues, pipeline states, and frame buffers. Furthermore, to address the incompatibility issues of shader languages ​​across different platforms, the Unified Rendering Abstraction Layer also includes a unified shader compilation pipeline. Developers use a high-level shader description language to write shader code. During the compilation phase, this shader compilation pipeline calls open-source compilation toolchains such as glslang and SPIRV-Cross to convert the high-level shader description into SPIR-V bytecode required for the Vulkan platform, HLSL bytecode required for the DirectX 12 platform, and Metal ShadingLanguage bytecode required for the Metal platform, respectively. At runtime, each concrete renderer class loads the target bytecode for its corresponding platform, completing the creation and binding of the shader program.

[0021] The platform adaptation layer encapsulates the differences in user input, file storage, and resource management across operating systems. Regarding user input, the platform adaptation layer includes a unified input processing module. This module defines a standardized set of action commands, such as semantic actions like jump, attack, move, and interact. For each target platform, this module implements a specific input mapper, converting raw input events into these standardized action commands. Specifically, in mobile implementations, touch events on the left half of the screen are mapped to movement actions, and clicks on specific areas on the right are mapped to jump actions; in PC implementations, the WASD keys are mapped to movement actions, and the spacebar is mapped to jump actions. These mapped standardized action commands are then passed to the upper-layer game logic, eliminating platform-specific input judgment branches in the core game code. Regarding file storage, the platform adaptation layer provides a unified file system operation interface and preference settings access interface. The file system operation interface encapsulates basic functions such as file creation, reading, writing, deletion, and directory traversal. Each platform's underlying implementation calls the corresponding native API, such as CreateFile on Windows, AssetManager with JNI file operations on Android, and IndexedDB on the Web platform. The preference settings access interface encapsulates the saving and reading of lightweight application configuration data, and calls the Windows Registry, Android SharedPreferences, or iOS NSUserDefaults at the underlying level.

[0022] In terms of dynamic resource management, the platform adaptation layer includes a dynamic resource adaptation module. This module first collects the hardware information of the current device, including the number of CPU cores, GPU model, and available memory capacity. Based on this information, the module comprehensively determines the performance level of the current device, which is divided into high-performance, mid-range, entry-level, and low-end. When the game needs to load resources, the upper-layer logic passes a resource identifier, such as a resource name or relative path, to the dynamic resource adaptation module. The resource identifier parsing pipeline inside this module first converts the resource identifier into the actual storage path under the current platform. For example, it automatically adds the assets / prefix on the Android platform and directly uses the relative path on the Windows platform. Subsequently, the resource loading pipeline selects the corresponding resource level from multiple preset resource variants on the server according to the previously determined device performance level. For example, high-performance devices load 4K resolution texture maps and fully detailed model meshes, while low-end devices load low-resolution textures and simplified models. The resource download pipeline is responsible for obtaining the selected resource content from the local cache or remote server, and using content fingerprints to determine whether there is reusable cached data, and finally returning the resource instance to the caller. Through the above mechanism, the platform adaptation layer ensures that the game can be presented with optimal visual quality and smooth operation on different devices.

[0023] S102: Based on the unified rendering abstraction layer and the platform adaptation layer, develop an automated build toolchain. The automated build toolchain takes a syntax tree description file as input and converts the syntax tree description file into executable code and resource packages for each target platform. Rendering-related calls are converted through the unified rendering abstraction layer, and resource-related operations are processed through the platform adaptation layer. Specifically, the core function of the automated build toolchain is to take the syntax tree description file written by developers as input, and through a series of automated processing steps, output executable code and resource packages for each target platform. The syntax tree description file is stored in a structured data format, such as JSON, XML, or YAML. Each node corresponds to a game object, and the attributes of each node at least include the type identifier, position coordinates, size, and rendering style configuration parameters of the game object. The parent-child relationship between nodes is used to express the hierarchical organization and logical connections in the game world.

[0024] The automated build toolchain first receives the syntax tree description file and calls the built-in syntax tree parser to read and parse it, converting it into an abstract syntax tree structure in memory. The abstract syntax tree retains the hierarchical information and node attributes of the original description file, facilitating subsequent traversal and transformation. Next, the intermediate code generator traverses the abstract syntax tree, converting each node and its attributes into a platform-independent intermediate representation. This intermediate representation is a standardized sequence of instructions between the high-level description and the low-level code, independent of any specific operating system or hardware architecture. For example, a node describing a button control is converted into intermediate representation instructions containing the control type, position coordinates, size, and click event response.

[0025] Subsequently, the platform adaptation unit, based on the target platform set specified in the configuration file (e.g., simultaneously generating executable packages for Windows, Android, and Web platforms), converts the intermediate representation into specific code corresponding to each platform. During code generation, for parts involving graphics rendering calls, such as drawing models in the scene, applying materials, and shaders, the platform adaptation unit does not directly generate native code for specific graphics APIs. Instead, it calls the rendering interfaces provided by the unified rendering abstraction layer established in step S101. Specifically, the generated platform code contains call statements to abstract interfaces such as renderer interfaces, texture interfaces, and shader interfaces. These calls are automatically converted into system calls to the underlying graphics APIs by the unified rendering abstraction layer at runtime. For resource management-related operations, such as loading textures, reading configuration files, or saving game saves, the platform adaptation unit calls the unified file storage interface and the dynamic resource adaptation module interface provided by the platform adaptation layer in step S101, ensuring that resource acquisition and storage behaviors remain consistent across platforms.

[0026] In addition to code generation, the automated build toolchain also includes a resource packaging unit. This unit is responsible for collecting all the resource files required by the game, including texture maps, model files, audio files, and animation data, and performing necessary format conversions according to the requirements of the target platform. For example, for mobile platforms, the resource packaging unit converts common PNG textures to compression formats natively supported by mobile GPUs, such as ASTC or ETC2, to reduce the package size and improve loading speed. After conversion, the resource packaging unit packages the code and resources together, generating an executable package for each target platform. This package can be directly distributed to the corresponding app store or deployed to devices for execution.

[0027] In addition, the automated build toolchain includes an incremental compilation module. This module avoids a full recompile for every modification during version iterations after the game's release. Specifically, the incremental compilation module performs a node-level difference comparison between the modified syntax tree description file by the developers and the syntax tree snapshot saved during the last successful build. During the difference comparison, a hash value is calculated for each node. When the hash value of a node changes, the absolute path of that node is marked, such as changes in the width and height attributes of "scene root node / battle interface / level 3 dialog box node". The incremental compilation module only recompiles the code snippets corresponding to the changed nodes, while directly reusing the intermediate results of the previous build for unchanged nodes. Based on the above difference comparison results, the incremental compilation module generates a lightweight differential update package and pushes it to the update server. This mechanism significantly reduces the workload of repeated compilation and significantly improves iteration efficiency.

[0028] The automated build toolchain fully leverages the established unified rendering abstraction layer and platform adaptation layer to efficiently convert syntax tree description files into executable deliverables for each platform, avoiding the need for developers to manually write adaptation code for each platform and significantly reducing development costs.

[0029] S103: Integrate a cross-platform data synchronization framework into the executable package generated by the automated build toolchain. The cross-platform data synchronization framework is used to collect multi-client operation instructions and build operation dependency directed graphs at runtime, and distribute consistent states to each client.

[0030] Specifically, the cross-platform data synchronization framework is used to solve the problem of game state consistency when players switch between different platform devices, as well as the problem of operation conflicts between multiple clients in real-time interactive scenarios. The framework is deployed between the cloud server and the clients on various platforms. The clients are embedded in the executable package generated in step S102, and the server runs independently in the cloud environment.

[0031] Specifically, each client has a built-in event listening and reporting module during runtime. This module captures various operation commands generated by local players in real time, including character movement, skill release, item use, and interaction triggers. Each operation command is encapsulated into a data structure containing operation type, operation parameters, timestamp, and player identifier, and after serialization, it is reported to the cloud synchronization server via a secure network connection.

[0032] After receiving parallel operation instructions from multiple clients, the cloud synchronization server first aggregates the instructions on a logical frame basis, forming a set of adjudication events for the current logical frame. To avoid out-of-order instructions due to network latency, the server performs preliminary sorting based on the timestamps and logical frame numbers carried by each instruction. Subsequently, the server executes an adjudication algorithm to determine the final execution order among multiple operation instructions. When two or more operation instructions involve the same game resource and have mutual exclusion or dependency relationships, such as two players simultaneously opening the same treasure chest, the server constructs an operation dependency directed graph. The nodes of this directed graph are each operation event, and the directed edges represent the dependencies between operations; for example, operation A must be executed before operation B. Based on this, the server calculates the order stability evaluation parameter for each operation event. This parameter measures the degree of impact of different sorting methods on the final game state under the current network and load conditions. When there is no dependency path between two operation events, the server determines that they can be executed in parallel without mandatory sorting; when a dependency relationship exists, the server determines a unique execution order based on the partial order relationship in the directed graph, generating a comprehensive adjudication sequence.

[0033] After the ruling is completed, the server converts the agreed-upon state into an incremental data packet. This incremental data packet contains only state fields that have changed compared to the previous logical frame, such as changes in character coordinates, health points, or item quantities, to reduce network load. The server simultaneously distributes this incremental data packet to all currently connected clients. Upon receiving the incremental data packet, each client parses the state changes and updates its locally maintained game state model. Simultaneously, the client re-renders the game based on the updated state, ensuring that the game world seen by all players remains synchronized.

[0034] For content updates after the game's launch, each platform's client also integrates a hot update mechanism. During runtime, the client polls the update server (as described in step S102) at preset time intervals to check for the existence of a differential update package for the current version. When a new differential update package is detected, the client automatically downloads it and loads the new syntax tree description file upon the next game launch or via the hot update mechanism without restarting the game. After loading the new syntax tree, the client reconstructs the runtime view based on the new syntax tree, replacing the old version's interface and logic, thus achieving "one-time modification, multi-platform synchronous update," eliminating the need to repackage and submit to app stores for review on each platform.

[0035] When a player switches from a first-platform device to a second-platform device and wishes to continue the same game or pick up where they left off, the client on the second device immediately sends a status retrieval request to the cloud synchronization server upon startup. After verifying the player's identity, the server returns a snapshot of the player's latest complete status, including character level, skill configuration, inventory items, quest progress, and current location coordinates. The client on the second device then reconstructs the complete game based on this snapshot, allowing the player to seamlessly continue their previous game progress.

[0036] Through the aforementioned cross-platform data synchronization framework, this embodiment realizes the adjudication of operational conflicts, maintenance of state consistency, and cross-device continuity functions among multiple clients. It organically integrates the synchronization mechanism with the rendering abstraction layer, platform adaptation layer, and automated build toolchain established in steps S101 and S102, avoiding the need for developers to implement synchronization logic separately for each platform, and further improving the development efficiency and running experience of cross-platform games.

[0037] Second embodiment: Please refer to Figure 2 This invention provides a cross-platform game development system, comprising: A unified rendering abstraction layer module 201 is connected to the automated build toolchain module 203 and is used to provide the automated build toolchain module 203 with a platform-independent rendering interface mapping table. Platform adaptation layer module 202, which is connected to the automated build toolchain module 203, is used to provide the automated build toolchain module 203 with a unified call entry point for cross-platform application programming interfaces; An automated build toolchain module 203 is connected to the unified rendering abstraction layer module 201 and the platform adaptation layer module 202, respectively. It receives a syntax tree description file, the rendering interface mapping table, and the unified call entry point, and converts the syntax tree description file into an executable package for each target platform. The automated build toolchain module 203 is also connected to the cross-platform data synchronization framework module 204, which deploys the executable package to the target platform. A cross-platform data synchronization framework module 204 is connected to the automated build toolchain module 203 and is used to run in the executable package generated by the automated build toolchain module 203 to realize the consistency synchronization of game state among multiple clients and the connection of players across devices.

[0038] Specifically, during the system deployment phase, the unified rendering abstraction layer module 201 and the platform adaptation layer module 202 complete their initialization. The unified rendering abstraction layer module 201 internally encapsulates the implementations of low-level graphics rendering interfaces for different operating systems and maintains a rendering interface mapping table that records the correspondence between the unified rendering interface and the native graphics APIs of each platform. The platform adaptation layer module 202 integrates a unified input processing unit, a unified file and storage unit, and a dynamic resource adaptation unit, providing a unified cross-platform application programming interface entry point for upper-layer modules to call.

[0039] During the development phase, the automated build toolchain module 203 establishes connections with the unified rendering abstraction layer module 201 and the platform adaptation layer module 202, respectively. The automated build toolchain module 203 reads the syntax tree description file from the development environment, obtains the rendering interface mapping table from the unified rendering abstraction layer module 201, and obtains the unified call entry point for cross-platform application programming interfaces from the platform adaptation layer module 202. The syntax tree parsing unit within the automated build toolchain module 203 parses the syntax tree description file into an abstract syntax tree; the intermediate code generation unit converts the abstract syntax tree into a platform-independent intermediate representation; the platform adaptation unit converts the intermediate representation into executable code for each target platform based on the rendering interface mapping table and the unified call entry point; and the resource packaging unit completes the format conversion and packaging of resources, ultimately generating the executable package for each target platform.

[0040] During the deployment phase, the automated build toolchain module 203 deploys the generated executable package to the target platform through its output. Simultaneously, the automated build toolchain module 203 integrates the runtime components of the cross-platform data synchronization framework module 204 into the executable package. When the executable package is installed and run on the target platform, the cross-platform data synchronization framework module 204 is activated. Within this module, the client event listening and reporting unit captures local operation commands and reports them to the cloud server; the cloud adjudication and dependency analysis unit constructs and adjudicates the directed graph of operation dependencies; and the state distribution and update unit distributes the consistent state to each client, thereby achieving game state synchronization between multiple clients and cross-device player continuity.

[0041] The system organically integrates rendering abstraction, platform adaptation and automated building during the development phase, as well as cross-platform data synchronization during the runtime phase. This allows developers to efficiently produce executable games suitable for multiple platforms by maintaining only one syntax tree description file, and ensures a consistent gaming experience for players on different devices.

[0042] This invention establishes a unified rendering abstraction layer and platform adaptation layer, systematically encapsulating the differences in underlying graphics interfaces, input / output, and resource management. Based on this, an automated build toolchain is developed to achieve one-click conversion from syntax tree description files to multi-platform executable packages. Furthermore, a cross-platform data synchronization framework is integrated at runtime to achieve multi-client operation adjudication and consistent state distribution. Overall, this invention effectively solves the problems of redundant code, low development efficiency, and high maintenance costs caused by the fragmentation of rendering, interface, and resource management modules in existing cross-platform game development. It significantly reduces the manpower costs and code redundancy of multi-platform adaptation, improving the development efficiency, iteration flexibility, and user experience of cross-platform games.

[0043] The above-disclosed embodiments are merely one or more preferred embodiments of this application and should not be construed as limiting the scope of this application. Those skilled in the art can understand that all or part of the processes for implementing the above embodiments and equivalent changes made in accordance with the claims of this application still fall within the scope of this application.

Claims

1. A cross-platform game development method, characterized in that, Includes the following steps: A unified rendering abstraction layer and a platform adaptation layer are established. The unified rendering abstraction layer provides a rendering interface that is independent of the underlying graphics application programming interface and enables automatic selection of the rendering backend at runtime. The platform adaptation layer is used to map the raw events of different input devices into standardized action instructions, provide a cross-platform file storage interface, and dynamically select resource levels according to the device performance level. Based on the unified rendering abstraction layer and the platform adaptation layer, an automated build toolchain is developed. The automated build toolchain accepts a syntax tree description file as input and converts the syntax tree description file into executable code and resource packages for each target platform. Rendering-related calls are converted through the unified rendering abstraction layer, and resource-related operations are processed through the platform adaptation layer. A cross-platform data synchronization framework is integrated into the executable package generated by the automated build toolchain. The cross-platform data synchronization framework is used to aggregate multi-client operation instructions at runtime, build a directed graph of operation dependencies, and distribute a consistent state to each client.

2. The cross-platform game development method as described in claim 1, characterized in that, The unified rendering abstraction layer defines a set of rendering interfaces and uses a shader compilation pipeline to convert high-level shader descriptions into target bytecode for multiple platforms. The target bytecode includes SPIR-V bytecode for the Vulkan platform, HLSL bytecode for the DirectX 12 platform, and Metal Shading Language bytecode for the Metal platform. At runtime, the corresponding renderer implementation class is automatically selected based on the current operating system environment through a factory pattern or runtime dynamic loading mechanism, and the calls to the set of rendering interfaces are converted into system calls to the corresponding underlying graphics application programming interfaces.

3. The cross-platform game development method as described in claim 1, characterized in that, The platform adaptation layer includes a dynamic resource adaptation module. This module collects the current device's CPU core count, GPU model, and available memory capacity. Based on the collected data, it comprehensively determines the current device's performance level, which includes high-performance, mid-range, entry-level, and low-end levels. The module receives resource identifiers, converts them into actual storage paths under the current platform through a resource identifier parsing pipeline, selects the corresponding resource variant based on the performance level during resource loading, obtains the resource content through a resource download pipeline, and returns the resource instance.

4. The cross-platform game development method as described in claim 1, characterized in that, The syntax tree description file is stored in JSON, XML or YAML format; each node in the syntax tree description file corresponds to a game object, and the attributes of each node include the type identifier, position coordinates, size and rendering style configuration parameters of the game object. The parent-child relationship between nodes expresses the hierarchical organization and logical association in the game world.

5. The cross-platform game development method as described in claim 1, characterized in that, The automated build toolchain includes an incremental compilation module; the incremental compilation module compares the modified syntax tree description file with the syntax tree snapshot saved during the last build at the node level, calculates the hash value difference for each node, marks the absolute path of the changed node, recompiles only the code snippets corresponding to the changed nodes, generates an incremental update package and pushes it to the update server.

6. The cross-platform game development method as described in claim 5, characterized in that, Each platform client polls the update server during runtime, downloads the differential update package after detecting it, loads the new syntax tree the next time the game starts or through a hot update mechanism, and rebuilds the runtime view.

7. The cross-platform game development method as described in claim 1, characterized in that, In the cross-platform data synchronization framework, the cloud synchronization server gathers parallel operation instructions from multiple clients to form a set of adjudication events for the current logical frame. For scenarios with operational dependencies, it constructs a directed graph of operational dependencies and generates a comprehensive adjudication sequence based on this graph. The cloud synchronization server calculates the order stability evaluation parameters of each operation event in the set of adjudication events. When there is no dependency between two operation events, they are determined to be able to execute in parallel. When there is a dependency between two operation events, the execution order is determined based on the directed graph of operational dependencies. The consistent state after adjudication is distributed to all connected clients in the form of incremental data packets. Each client receives the incremental data packets and performs a local state update.

8. A cross-platform game development system for implementing the cross-platform game development method as described in claim 1, characterized in that, include: A unified rendering abstraction layer module, which is connected to the automated build toolchain module, is used to provide the automated build toolchain module with a platform-independent rendering interface mapping table; A platform adaptation layer module, which is connected to the automated build toolchain module, is used to provide a unified call entry point for cross-platform application programming interfaces to the automated build toolchain module; An automated build toolchain module is connected to the unified rendering abstraction layer module and the platform adaptation layer module, respectively. It is used to receive the syntax tree description file, the rendering interface mapping table and the unified call entry point, and convert the syntax tree description file into an executable package for each target platform. The automated build toolchain module is also connected to the cross-platform data synchronization framework module, which is used to deploy the executable package to the target platform. A cross-platform data synchronization framework module is connected to the automated build toolchain module and is used to run in the executable package generated by the automated build toolchain module to achieve consistent synchronization of game states between multiple clients and cross-device connection of players.