Game synchronization method, device, terminal, server and storage medium
By dividing the game synchronization process into the logic layer and the presentation layer, and adopting the double-speed frame tracking technology, the problem of low synchronization efficiency in multiplayer online games is solved, fast and consistent game data synchronization is achieved, and the efficiency and rendering effect of game synchronization are improved.
Patent Information
- Application Number
- CN202011350085.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-26
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2040-11-26
AI Technical Summary
Existing synchronization methods for multiplayer online games are inefficient, especially when players are disconnected or join the game midway, making it difficult to achieve fast and consistent game data synchronization.
The game synchronization process is divided into the logic layer and the presentation layer. Through the synchronization of logical data and visual presentation objects, the double-speed frame tracking technology is adopted to improve the processing efficiency of logical frames, and the visual presentation objects are instantiated in the game scene to achieve synchronization of the game screen.
This improves the efficiency of game synchronization, reduces the time consumption of game synchronization, and ensures the consistency of rendering effects of game scenes. In particular, when players reconnect or join the game midway, they can quickly catch up with the game status of other players.
Smart Images

Figure CN113521743B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computers, and in particular to a game synchronization method, device, terminal, server and storage medium. Background Art
[0002] In multiplayer online games, the server needs to process and broadcast the game data generated by the game clients, enabling interaction of game data between multiple clients. Multiplayer online games have very high requirements for the real-time and consistency of interaction. Any player's operation instructions must be synchronized to all players' game clients in a timely manner, and the information received by all players must be consistent.
[0003] In order to cope with the situation where a player needs to join the game midway due to game disconnection or other reasons, the server often needs to resynchronize the data of the player's game client so that the player can interact with other players normally.
[0004] However, current game synchronization methods for the above situation are inefficient. Summary of the Invention
[0005] Embodiments of the present invention provide a game synchronization method, device, terminal, server, and storage medium, which can improve the efficiency of the game synchronization method.
[0006] An embodiment of the present invention provides a game synchronization method, applied to a client, comprising:
[0007] Constructing an initial game scene, wherein the initial game scene is composed of at least logic data and visual representation objects;
[0008] Obtain operation instructions and visual representation objects from other clients from the server;
[0009] Synchronize the logic data of the initial game scene according to the operation instructions of the other clients to obtain synchronized logic data;
[0010] Based on the synchronized logic data, instantiate the visual performance objects of the other clients in the initial game scene to obtain synchronized scene performance data;
[0011] The game screen is rendered according to the synchronized logic data and the synchronized scene performance data, so that the game scene in the game screen is synchronized with the other clients.
[0012] An embodiment of the present invention provides a game synchronization method, applied to a server, comprising:
[0013] When a game joining message of a target client is obtained, a performance reporting instruction is sent to other clients according to a preset frequency, wherein the performance reporting instruction is used to notify the other clients to report the visual performance objects of the other clients;
[0014] Obtaining visual representation objects and operation instructions of the other client;
[0015] The operation instructions and visual performance objects of the other clients are sent to the target client according to the preset frequency, so that the target client is synchronized with the game of the other clients.
[0016] An embodiment of the present invention further provides a game synchronization device, applied to a client, comprising:
[0017] An initial unit, configured to construct an initial game scene, wherein the initial game scene is composed of at least logic data and visual representation objects;
[0018] A server acquisition unit, used to acquire operation instructions and visual representation objects of other clients from the server;
[0019] A logic unit, configured to synchronize the logic data of the initial game scene according to the operation instructions of the other clients to obtain synchronized logic data;
[0020] A presentation unit, configured to instantiate the visual presentation objects of the other clients in the initial game scene based on the synchronized logical data, and obtain synchronized scene presentation data;
[0021] A screen unit is used to render a game screen according to the synchronized logic data and the synchronized scene performance data, so that the game scene in the game screen is synchronized with the other clients.
[0022] In some embodiments, after rendering the game screen according to the synchronized logic data and the synchronized scene performance data, the screen unit is further configured to:
[0023] Obtaining user operation instructions for the game scene;
[0024] Reporting the user's operation instructions for the game scene to the server.
[0025] In some embodiments, the game synchronization device further includes:
[0026] a determining unit, configured to determine a visual performance object appearing in the game scene when a performance reporting instruction is obtained from the server;
[0027] The reporting unit is used to report the visual performance objects appearing in the game scene to the server.
[0028] In some embodiments, the game synchronization device further includes:
[0029] A scene updating unit, configured to update the game scene according to the operation instructions of the other clients when the operation instructions of the other clients are obtained from the server, to obtain an updated game scene;
[0030] An updating screen unit is used to render a game screen according to the updated game scene, so that the game scene in the game screen is synchronized with the other clients.
[0031] In some embodiments, the picture unit is further used to:
[0032] Obtaining the operation instructions and visual representation objects of the other clients from the server again;
[0033] updating the synchronized logical data according to the reacquired operation instructions of the other clients to obtain updated logical data;
[0034] updating the synchronized scene representation data based on the updated logical data and the reacquired visual representation objects of other clients to obtain updated scene representation data;
[0035] The picture unit is further used for:
[0036] The game screen is rendered again according to the updated logic data and the updated scene performance data, so that the game scene in the game screen is synchronized with the other clients.
[0037] In some embodiments, the initial unit is further used to:
[0038] Display the game loading interface;
[0039] The picture unit is further used for:
[0040] Cancel displaying the game loading interface;
[0041] The game screen is displayed.
[0042] In some embodiments, the server acquisition unit is configured to:
[0043] Acquire, from the server, operation instructions and object replacement information of the other client, wherein the object replacement information includes information that multiple candidate objects are created or deleted by the other client;
[0044] The visual representation object of the other client is determined according to the object replacement information, where the visual representation object is a candidate object that has not been eliminated by the other client.
[0045] In some embodiments, the presentation unit is further configured to:
[0046] sequentially determining a target candidate object from a plurality of candidate objects in the object replacement information;
[0047] Based on the post-synchronization logic data, instantiate the target candidate object in the initial game scene to obtain post-synchronization scene performance data of the target candidate object;
[0048] Rendering a game screen according to the synchronized logic data and the synchronized scene performance data of the target candidate object;
[0049] Return and execute the steps to determine a target candidate object from the multiple candidate objects in the object replacement information in turn until all candidate objects in the object replacement information are processed, so that the game scene in the game screen is synchronized with the other clients.
[0050] An embodiment of the present invention further provides a game synchronization device, applied to a server, comprising:
[0051] a joining unit configured to, upon receiving a game joining message from a target client, send a performance reporting instruction to other clients according to a preset frequency, wherein the performance reporting instruction is used to notify the other clients to report the visual performance objects of the other clients;
[0052] A client acquisition unit, configured to acquire the visual representation object and operation instruction of the other client;
[0053] The sending unit is configured to send the operation instructions and visual performance objects of the other clients to the target client according to the preset frequency, so that the target client can synchronize its games with those of the other clients.
[0054] In some embodiments, the sending unit is further configured to:
[0055] When an operation instruction of the target client is obtained, refusing to send a performance reporting instruction to the other clients according to the preset frequency;
[0056] Obtaining an operation instruction from a client, where the client includes the target client and the other clients;
[0057] The operation instruction is sent to the client according to the preset frequency.
[0058] An embodiment of the present invention further provides a terminal and a server, comprising a memory storing a plurality of instructions; the processor loads instructions from the memory to execute the steps of any one of the game synchronization methods provided in the embodiment of the present invention.
[0059] An embodiment of the present invention further provides a computer-readable storage medium storing a plurality of instructions suitable for loading by a processor to execute the steps of any one of the game synchronization methods provided in the embodiment of the present invention.
[0060] An embodiment of the present invention can construct an initial game scene, which is composed of at least logical data and visual presentation objects; obtain operation instructions and visual presentation objects of other clients from a server; synchronize the logical data of the initial game scene according to the operation instructions of other clients to obtain synchronized logical data; based on the synchronized logical data, instantiate the visual presentation objects of other clients in the initial game scene to obtain synchronized scene presentation data; render the game screen according to the synchronized logical data and the synchronized scene presentation data, so that the game scene in the game screen is synchronized with other clients.
[0061] In this invention, by separating the logic layer and presentation layer of game synchronization, in addition to synchronizing the game's logical data, the presentation of the game scene is also synchronized through the visual presentation objects of other clients, which can improve the consistency of rendering effects and reduce the time consumed by game synchronization. As a result, this solution can improve the efficiency of game synchronization methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0063] Figure 1a Schematic diagram of a scenario of a game synchronization method provided by an embodiment of the present invention;
[0064] Figure 1b is a flowchart of a game synchronization method provided by an embodiment of the present invention;
[0065] Figure 2 is a flowchart of a game synchronization method provided by an embodiment of the present invention;
[0066] Figure 3a is a schematic diagram of applying the game synchronization method provided by an embodiment of the present invention to a multiplayer horizontal fighting game scenario;
[0067] Figure 3b 2 is a schematic diagram of a loading page of a game synchronization method provided by an embodiment of the present invention;
[0068] Figure 3c is an interactive schematic diagram of a game synchronization method provided by an embodiment of the present invention;
[0069] Figure 4 is a structural diagram of a game synchronization device provided by an embodiment of the present invention;
[0070] Figure 5 is a structural diagram of a game synchronization device provided by an embodiment of the present invention;
[0071] Figure 6 It is a structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0072] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making any creative efforts shall fall within the scope of protection of the present invention.
[0073] Embodiments of the present invention provide a game synchronization method, device, terminal, server, and storage medium.
[0074] The game synchronization device can be integrated into an electronic device, such as a terminal or a server. The terminal can be a mobile phone, tablet computer, smart Bluetooth device, laptop computer, or personal computer (PC); the server can be a single server or a server cluster consisting of multiple servers.
[0075] In some embodiments, the game synchronization device may also be integrated into multiple electronic devices. For example, the game synchronization device may be integrated into multiple servers, and the game synchronization method of the present invention may be implemented by multiple servers.
[0076] In some embodiments, the server may also be implemented in the form of a terminal.
[0077] Among them, the server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, as well as big data and artificial intelligence platforms.
[0078] The terminal may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto.
[0079] The terminal and the server may be connected directly or indirectly via wired or wireless communication, which is not limited in this application.
[0080] In some embodiments, a game synchronization system is proposed that may include a server and multiple terminals, each of which may perform network communication with the server.
[0081] Among them, the server can be equipped with a game synchronization device applied to the server, and the terminal can be equipped with a game synchronization device applied to the client. The terminals can exchange data through the server, thereby realizing game synchronization between the terminals.
[0082] For example, reference Figure 1a The game synchronization system includes a server equipped with a game synchronization device, terminal 1, terminal 2 and terminal 3; terminal 1, terminal 2 and terminal 3 can all communicate with the server over the network.
[0083] The following describes the game synchronization system using terminal 1 as the target client and terminals 2 and 3 as other clients:
[0084] The target terminal can create an initial game scene, which is composed of at least logical data and visual presentation objects; obtain operation instructions and visual presentation objects of other clients from the server; then synchronize the logical data of the initial game scene according to the operation instructions of other clients to obtain synchronized logical data; based on the synchronized logical data, instantiate the visual presentation objects of other clients in the initial game scene to obtain synchronized scene presentation data; finally, render the game screen according to the synchronized logical data and the synchronized scene presentation data, so that the game scene in the game screen is synchronized with other clients.
[0085] The server can obtain the game joining message of the target client. When the server obtains the game joining message of the target client, the server can send performance reporting instructions to other clients according to the preset frequency. The performance reporting instructions can be used to notify other clients to report the visual performance objects that appear in the game scenes of other clients; then obtain the visual performance objects and operation instructions of other clients; finally, send the operation instructions and visual performance objects of other clients to the target client according to the preset frequency, so that the target client is synchronized with the games of other clients.
[0086] It should be noted that the serial numbers of the following embodiments are not intended to limit the preferred order of the embodiments.
[0087] Cloud computing technology refers to a hosting technology that unifies hardware, software, network and other resources within a wide area network or local area network to achieve data computing, storage, processing and sharing.
[0088] Cloud gaming, also known as gaming on demand, is an online gaming technology based on cloud computing. Cloud gaming enables thin clients with relatively limited graphics and data processing capabilities to run high-quality games. In cloud gaming scenarios, the game runs not on the player's terminal but on a cloud server. The cloud server renders the game scene into a video and audio stream, which is then transmitted to the player's terminal over the network. The player's terminal does not need powerful graphics and data processing capabilities; it only needs basic streaming capabilities and the ability to receive player input and transmit it to the cloud server.
[0089] This solution can be used for game synchronization of cloud games as well as traditional games.
[0090] Before introducing this solution, we will first introduce game synchronization:
[0091] In online games, the main goal of communication between multiple clients is to synchronize the states of multiple parties. To achieve this goal, two technical directions have been proposed: frame synchronization (Lockstep, also known as lockstep synchronization) and state synchronization (StateSynchronization).
[0092] For state synchronization, when a client sends a player's operation instruction to the server, the server can calculate the player's operation result based on the player's operation instruction, and then broadcast the operation result to all clients. The client displays the game screen according to the operation result calculated by the server.
[0093] In frame synchronization, the server only forwards the operation instructions and does not need to calculate the operation results internally. The server only needs to broadcast the operation data to all clients at a fixed frequency, and the clients calculate the operation results. Since the time (frame) for each operation instruction to reach all clients is the same, the instruction results calculated by each client are also the same.
[0094] In multiplayer online games, when players disconnect and reconnect, enter the game midway, or resume the game after restarting, the client needs to obtain the operation instructions of all current players from the beginning of the game, quickly calculate all the operation instructions, and then continue the normal game.
[0095] Fast frame tracking technology can process large amounts of game data sent from the server at an extremely fast speed, so that players who reconnect or enter the game midway can maintain the same game status as other players in the game.
[0096] For example, in frame synchronization, a fixed frame rate can be used to chase frames at a higher speed. For example, by increasing the computing power consumption of rendering, the game content that is played frame by frame can be played at an extremely high speed.
[0097] For example, in state synchronization, the server can send the most recently calculated operation result to the client.
[0098] Furthermore, in multiplayer online games with a "room" concept, the game process can be divided into two phases: matching (Matchmaking) and gameplay (Gameplay). Matchmaking involves assigning online players who meet certain conditions or requirements to the same room. The client (player) connects to the designated room server and synchronizes player operations, game status, and other data through the interface provided by the room service to support player-to-player gameplay and interaction within the same room. Therefore, for multiplayer online games with a "room" concept, the room server can be used to send the most recently calculated game status and other data to the client to achieve fast frame tracking for that client.
[0099] In this embodiment, a game synchronization method is provided, which can achieve fast frame tracking of cloud games and traditional games, such as Figure 1b As shown, the specific process of the game synchronization method can be as follows:
[0100] 101. Construct an initial game scene, which is composed of at least logical data and visual presentation objects.
[0101] In this solution, the game is divided into a logic layer and a rendering layer, that is, the game data (data frame) is divided into logic data (logic frame) and rendering data (presentation frame).
[0102] Among them, the logic frame is used to define, store and calculate the game logic of game objects in the game scene, such as transforming the coordinates of game objects, rotating game objects, modifying the combat properties of logic objects, etc.
[0103] The calculation process of the game at the logic layer is continuous, that is, the next logic frame will be calculated only after the calculation of one logic frame is completed. If the calculation order of the logic frames is changed, the calculation results may be different.
[0104] Among them, the presentation frame is data used to render the game objects in the game scene according to the logical data, for example, the rendering performance is optimized through rendering schemes such as cached frames, smooth frames, prediction, and interpolation.
[0105] When the client re-enters the game scene or enters the game scene in a multiplayer game, the client needs to pre-read the game data to build the initial game scene, and then quickly track the initial game scene based on the data sent by the server.
[0106] In some embodiments, before step 101, a game loading interface may be displayed until fast frame tracking is completed, and then the game screen is displayed, so as to achieve game frame tracking without the user's perception.
[0107] Among them, the game scene is composed of at least logical data and visual presentation objects. The logical data and visual presentation objects of the game scenes running in different clients may be the same or different. When multiple clients are playing multiplayer games, in order to ensure the consistency of the game content, these clients need to be synchronized, so that at least the logical data of the game scenes running in different clients are the same.
[0108] The visual representation objects of the game scenes running in multiple synchronized clients may be the same or different. For example, multiple synchronized clients may set different visual representation objects such as screen resolution, anti-aliasing, and material quality.
[0109] Therefore, after achieving game synchronization (ie step 105), the game loading interface can be canceled and the game screen can be displayed.
[0110] The game scene may be composed of multiple instances of game models (game elements), and the game models may be character models, animal models, particle special effect models, and the like.
[0111] 102. Obtain operation instructions and visual representation objects of other clients from the server.
[0112] When the client re-enters the game scene or enters the game scene in a multiplayer game, it can also send a game join message to the server to notify the server to collect data for frame tracking, such as the operation instructions and visual performance objects of other clients.
[0113] Among them, the operation instruction can be a command for the player to operate the game object in the game scene. For example, the operation instruction can be a command for the player to operate the game character to move, attack, defend, etc. in the game scene.
[0114] Among them, the visual performance objects are game objects with visual performance rendered by other clients in the game scene, such as trees in the game scene, game characters, and skill effects of skills released by game characters, etc.
[0115] In some embodiments, the visual representation object may be represented in the form of an identifier, that is, step 102 may be to obtain the operation instructions of other clients and the identifier of the visual representation object from the server.
[0116] The identifier can be a digital number, a text name, a symbolic name, etc.
[0117] In some embodiments, since the client can render multiple visual representation objects in the game scene simultaneously, and can create and eliminate the same visual representation object multiple times in the game, step 102 may include the following steps:
[0118] Obtaining operation instructions and object replacement information from other clients from the server, where the object replacement information may include information about multiple candidate objects being created or deleted by other clients;
[0119] The visual representation object is determined according to the object replacement information, where the visual representation object is a candidate object that has not been eliminated by other clients.
[0120] The object replacement information may record the creation or elimination of each candidate object, where a candidate object refers to a game object that has been rendered or unrendered by the client in the game scene.
[0121] Since the same visual representation object can be created and eliminated multiple times, in order to reduce the rendering resources consumed by multiple creation and elimination and improve the frame chasing efficiency, in this embodiment, the object replacement information can be counted, and the visual representation objects that will eventually be rendered can be screened out from the candidate objects, so that when chasing frames, only the visual representation objects are displayed instead of all candidate objects.
[0122] Therefore, there is no need to render candidate objects that have appeared in the game scene but have been eliminated when chasing frames, which greatly reduces the rendering resources consumed by frame chasing and improves the efficiency of frame chasing.
[0123] 103. Synchronize the logic data of the initial game scene according to the operation instructions of other clients to obtain synchronized logic data.
[0124] For example, according to the operation instruction of the player on other clients, "Character X moves forward 5 meters", the logical data "Character X's position is (0, 0)" in the initial game scene is modified to obtain the synchronized logical data "Character X's position is (0, 5)".
[0125] In this embodiment, logical frames are tracked in step 103, and presentation frames are tracked in step 104. The separation of logic and rendering (presentation) allows for different frequencies of logical frame tracking and presentation frame tracking.
[0126] Since the computing resources consumed by logical frame chasing are much lower than those of presentation frames, in this embodiment, the logical frame chasing can be performed in a double-speed frame chasing manner, which greatly improves the frame chasing efficiency.
[0127] For example, the processing of one logical frame per second is changed to processing 50 logical frames per second, and so on.
[0128] In this embodiment, whenever a logical frame is received, the logical frame can be stored in the cache. When tracing frames, the logical frames stored in the cache are processed in sequence until no logical frame exists in the cache, thereby achieving logical frame tracing.
[0129] 104. Based on the synchronized logic data, instantiate the visual performance objects of other clients in the initial game scene to obtain synchronized scene performance data.
[0130] For example, based on the post-synchronization logical data "the position of character X is (0, 5)", the visual performance object "character X" of other clients is instantiated in the initial game scene, and the post-synchronization scene performance data "game character X displayed at (0, 5)" is obtained.
[0131] Instantiating the visual representation object of another client refers to placing the game model of the visual representation object of the other client in the game scene. The game model of the visual representation object of the other client may have set parameters.
[0132] In some embodiments, in addition to instantiating only the visual representation objects in the initial game scene, all candidate objects in the object replacement information may be instantiated to achieve the effect of rendering the game screen frame by frame instead of only rendering the last frame of the game. Therefore, step 104 may further include the following steps:
[0133] sequentially determining a target candidate object from among a plurality of candidate objects in the object replacement information;
[0134] Based on the post-synchronization logic data, instantiate the target candidate object in the initial game scene to obtain the post-synchronization scene performance data of the target candidate object;
[0135] Rendering the game screen according to the synchronized logic data and the synchronized scene performance data of the target candidate object;
[0136] Return and execute the steps to determine a target candidate object from multiple candidate objects in the object replacement information in sequence until all candidate objects in the object replacement information are processed, so that the game scene in the game screen is synchronized with other clients.
[0137] 105. Render the game screen according to the synchronized logic data and the synchronized scene performance data, so that the game scene in the game screen is synchronized with other clients.
[0138] The completion of step 105 indicates that the game frame tracking is completed.
[0139] In some embodiments, since there is a time difference between the start of frame chasing and the completion of frame chasing, the client may continue to obtain operation instructions and visual representation objects from other clients to chase frames between the start of frame chasing and the completion of frame chasing, until the game status of the client and the other clients is the same. That is, before step 105, the following steps may be further included:
[0140] Obtain the operation instructions and visual representation objects of other clients from the server again;
[0141] The synchronized logical data is updated according to the operation instructions of other clients obtained again to obtain the updated logical data;
[0142] The synchronized scene representation data is updated based on the updated logical data and the visual representation objects of other clients obtained again to obtain the updated scene representation data;
[0143] After rendering the game screen according to the synchronized logic data and the synchronized scene performance data, it also includes:
[0144] The game screen is rendered again according to the updated logic data and the updated scene performance data, so that the game scene in the game screen is synchronized with other clients.
[0145] In some embodiments, after the game frame tracking is completed, normal game synchronization can be performed, so the following steps may be included after step 105:
[0146] Obtain user operation instructions for game scenes;
[0147] Report the user's operation instructions for the game scene to the server.
[0148] In some embodiments, after the game frame tracking is completed, if another client is disconnected and reconnected or enters the game midway, the client may further record the visual objects that appear in its game scene and send the visual objects to the other client that is disconnected and reconnected or enters the game midway through the server so that the other client can follow the frame. After step 105, the following steps may be further included:
[0149] When receiving the performance reporting instruction from the server, determine the visual performance object that appears in the game scene;
[0150] Report the visual representation object to the server.
[0151] In some embodiments, after the game frame tracking is completed, normal game synchronization can be performed, so the following steps may be included after step 105:
[0152] When the server receives an operation instruction from another client, the game scene is updated according to the operation instruction from the other client to obtain an updated game scene;
[0153] The game screen is rendered according to the updated game scene, so that the game scene in the game screen is synchronized with other clients.
[0154] From the above, it can be seen that the embodiment of the present invention can construct an initial game scene, which is composed of at least logical data and visual presentation objects; obtain operation instructions and visual presentation objects of other clients from the server; synchronize the logical data of the initial game scene according to the operation instructions of other clients to obtain synchronized logical data; based on the synchronized logical data, instantiate the visual presentation objects of other clients in the initial game scene to obtain synchronized scene presentation data; render the game screen according to the synchronized logical data and the synchronized scene presentation data, so that the game scene in the game screen is synchronized with other clients.
[0155] Therefore, in this invention, by separating the logic layer and presentation layer of game synchronization, in addition to synchronizing the game's logical data, the presentation of the game scene is also synchronized through the visual presentation objects of other clients, which can improve the consistency of rendering effects and reduce the time consumed by game synchronization. As a result, this solution can improve the efficiency of the game synchronization method.
[0156] The method described in the above embodiment is applied to the client. The following will take the game synchronization method applied to the server as an example to describe in detail the method of the embodiment of the present invention.
[0157] like Figure 2 As shown, a specific process of a game synchronization method is as follows:
[0158] 201. When a game joining message of a target client is obtained, a performance reporting instruction is sent to other clients according to a preset frequency. The performance reporting instruction is used to notify other clients to report the visual performance objects of other clients.
[0159] When receiving a game join message from a target client, it can be confirmed that the target client has been disconnected and reconnected, or has entered the game scene midway. Therefore, the server can send performance reporting instructions to other clients at a fixed frequency, instructing them to report the visual objects displayed in their game scenes.
[0160] 202. Obtain visual representation objects and operation instructions of other clients.
[0161] 203. Send the operation instructions and visual performance objects of other clients to the target client according to a preset frequency, so that the target client can synchronize games with other clients.
[0162] In some embodiments, after the game frame tracking is completed, normal game synchronization can be performed, and the notification of other clients to report visual performance objects is stopped. Therefore, after step 203, the game synchronization method can further include the following process:
[0163] When receiving an operation instruction from a target client, the system refuses to send performance reporting instructions to other clients according to a preset frequency.
[0164] Obtaining operation instructions from the client, which may include the target client and other clients;
[0165] Send operation instructions to the client according to the preset frequency.
[0166] From the above, it can be seen that this solution can improve the efficiency of the game synchronization method.
[0167] The game synchronization solution provided by the embodiment of the present invention can be applied to game scenarios of various game types.
[0168] For example, taking cloud-based multiplayer fighting games as an example, this solution can support horizontal fighting games that have high requirements for rendering, catching up and restoration. In particular, for games that do not have full background verification and cannot obtain status slices well, as well as games that hope to be not limited to game rooms and have more rich gameplay designs, this solution can achieve the effect of fast frame tracking.
[0169] For example, reference Figure 3a In this embodiment, a multiplayer online horizontal fighting game without a room is used as an example to introduce a solution for quickly reconnecting after a game terminal is disconnected or for catching up with the game frame rate:
[0170] First, when the player logs in to the multiplayer online horizontal fighting game, a TCP (Transmission Control Protocol, a network communication method) connection can be established between the player client and the game server, and it can be determined whether the player needs to start a new game or reconnect to the game that was running before the disconnection; if the player needs to start a new game, the multi-player battle is realized according to the normal game synchronization process, and the normal game synchronization process can use UDP (User Datagram Protocol, a network communication method) connection for frame synchronization; if the player needs to reconnect to the game that was running before the disconnection, the player client can obtain frame data from the server and load the game data of the local game, such as combat resources, so as to achieve fast frame chasing. After the frame chasing is completed, the player client realizes multi-player battle according to the normal game synchronization process.
[0171] When a player joins a game midway, the game client may display a game loading interface while loading game data. The game loading interface may be a preset two-dimensional image, animation, text introduction, etc. For example, the game loading interface may be a preset game CG (Computer Graphics) animation.
[0172] For example, reference Figure 3b When a player joins a game midway, in addition to displaying the game loading interface while loading game data, the game client can also use this solution to quickly chase frames. During this fast chasing process, the rendering performance of the game scene can be Figure 3c The game loading interface shown is obscured. In addition to the normal loading of game data, there can be an additional short period of time for rapid game frame tracking. This game frame tracking can use the game synchronization method provided by this solution. During the frame tracking process, the game loading interface can continue to be displayed, so that the rendering of the game scene during the frame tracking is obscured by the game loading interface until the frame tracking is completed, making the player unable to perceive the frame tracking process.
[0173] In this solution, a frame-tracking solution based on double speed can be used to achieve faster frame tracking, so that the game process of other clients that takes dozens of minutes can be caught up in just a few seconds. In addition, this solution can make the rendering effect consistent with other clients to meet the requirements of horizontal fighting games for consistency of rendering effects on different clients.
[0174] First, this solution can separate the logic layer and presentation layer of the game, so that the data frame is divided into logic frame and presentation frame.
[0175] Since the computational overhead of logical frames is relatively small, this scheme can use a double-speed frame tracking scheme to track logical frames, that is, to perform logical operations on multiple data frames in a very short time, thereby improving the efficiency of game synchronization.
[0176] However, due to the relatively large computational overhead of display frames and the difficulty in achieving seamless restoration of the image performance, the reference Figure 3c This solution specifically improves the frame tracking process of rendering performance as follows:
[0177] (1) First, after the target client rejoins the battle midway, it can send a game joining message to the server, so that the server notifies other clients that in addition to reporting the operation instructions for frame synchronization, it also needs to record and report the visual performance object ID that appears in each frame of the game scene.
[0178] The server may send the obtained operation instructions and visual representation object ID to the target client at a fixed preset frequency.
[0179] During the logical frame recovery process, the target client can use the visual object IDs in each frame to determine the visual objects that will appear in the last frame of the game scene at the end of the frame chase. These visual objects can then be instantiated to achieve game rendering. This solution significantly reduces the number of objects instantiated during the frame chase process, significantly reducing the time required for game synchronization while ensuring rendering consistency, thereby improving the efficiency of the game synchronization method.
[0180] (2) It takes a while for the target client to start chasing frames and complete the frame chasing. During this period, the operation instructions generated by other clients and the change information of the visual object ID in the scene will also be continuously collected by the server and sent to the target client. The target client can save them in the cache until there are no more operation instructions and visual object IDs in the scene remaining in the cache during the frame chasing process.
[0181] (3) After the frame tracking is completed, the target client can report the player's operation instructions to the server. At this time, other clients no longer need to report the visual performance object ID to the server, and the target client and other clients enter the regular game battle.
[0182] Therefore, this solution can be used to create open frame synchronization gameplay, and the solution provided by the embodiment of the present invention can better improve the consistency of rendering effects and reduce the time consumption of game synchronization. Therefore, this solution can improve the efficiency of the game synchronization method.
[0183] To better implement the above method, an embodiment of the present invention further provides a game synchronization device. The game synchronization device can be integrated into an electronic device, such as a terminal or a server. The terminal can be a mobile phone, tablet computer, smart Bluetooth device, laptop computer, personal computer, etc. The server can be a single server or a server cluster consisting of multiple servers.
[0184] For example, in this embodiment, the method of the embodiment of the present invention will be described in detail by taking the game synchronization device being specifically integrated into a terminal as an example.
[0185] For example, Figure 4 As shown, the game synchronization device may include an initialization unit 401, a server acquisition unit 402, a logic unit 403, a presentation unit 404, and a screen unit 405, as follows:
[0186] (1) Initial Unit 401:
[0187] The initialization unit 401 can be used to construct an initial game scene, which is composed of at least logic data and visual performance objects.
[0188] In some embodiments, the initialization unit 401 may also be used to display a game loading interface before constructing the initial game scene.
[0189] (2) Server acquisition unit 402:
[0190] The server acquisition unit 402 may be configured to acquire operation instructions and visual representation objects of other clients from the server.
[0191] In some embodiments, the server acquisition unit 402 may be configured to:
[0192] Obtaining operation instructions and object replacement information from other clients from the server, where the object replacement information may include information about multiple candidate objects being created or deleted by other clients;
[0193] The visual representation object is determined according to the object replacement information, where the visual representation object is a candidate object that has not been eliminated by other clients.
[0194] (3) Logic unit 403:
[0195] The logic unit 403 may be configured to synchronize the logic data of the initial game scene according to the operation instruction to obtain synchronized logic data.
[0196] (IV) Performance Unit 404:
[0197] The presentation unit 404 may be configured to instantiate a visual presentation object in the initial game scene based on the synchronized logic data to obtain synchronized scene presentation data.
[0198] In some embodiments, the presentation unit 404 may also be used to:
[0199] sequentially determining a target candidate object from among a plurality of candidate objects in the object replacement information;
[0200] Based on the post-synchronization logic data, instantiate the target candidate object in the initial game scene to obtain the post-synchronization scene performance data of the target candidate object;
[0201] Rendering the game screen according to the synchronized logic data and the synchronized scene performance data of the target candidate object;
[0202] Return and execute the steps to determine a target candidate object from multiple candidate objects in the object replacement information in sequence until all candidate objects in the object replacement information are processed, so that the game scene in the game screen is synchronized with other clients.
[0203] (V) Picture unit 405:
[0204] The screen unit 405 can be used to render the game screen according to the synchronized logic data and the synchronized scene performance data, so that the game scene in the game screen is synchronized with other clients.
[0205] In some embodiments, after being used to render the game screen according to the synchronized logic data and the synchronized scene performance data, the screen unit 405 may also be used to:
[0206] Obtain user operation instructions for game scenes;
[0207] Report the user's operation instructions for the game scene to the server.
[0208] In some embodiments, the game synchronization device may further include:
[0209] A determination unit may be used to determine a visual performance object appearing in a game scene when a performance reporting instruction is obtained from a server;
[0210] The reporting unit can be used to report the visual representation object to the server.
[0211] In some embodiments, the game synchronization device may further include:
[0212] The scene update unit can be used to update the game scene according to the operation instructions obtained from other clients from the server to obtain the updated game scene;
[0213] The update screen unit can be used to render the game screen according to the updated game scene, so that the game scene in the game screen is synchronized with other clients.
[0214] In some embodiments, the picture unit 405 may also be used to:
[0215] Obtain the operation instructions and visual representation objects sent again by other clients from the server;
[0216] The synchronized logic data is updated according to the resent operation instruction to obtain updated logic data;
[0217] The synchronized scene performance data is updated based on the updated logical data to obtain the updated scene performance data;
[0218] The picture unit 405 can also be used for:
[0219] The game screen is rendered again according to the updated logic data and the updated scene performance data, so that the game scene in the game screen is synchronized with other clients.
[0220] In some embodiments, the picture unit 405 may also be used to:
[0221] Cancel the display of the game loading interface;
[0222] Display the game screen.
[0223] In specific implementation, the above units can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above units can be found in the previous method embodiments and will not be repeated here.
[0224] From the above, it can be seen that the game synchronization device of this embodiment is composed of an initial unit to construct an initial game scene, and the initial game scene is composed of at least logical data and visual presentation objects; the server acquisition unit obtains the operation instructions and visual presentation objects of other clients from the server; the logic unit synchronizes the logical data of the initial game scene according to the operation instructions to obtain synchronized logical data; the presentation unit instantiates the visual presentation object in the initial game scene based on the synchronized logical data to obtain synchronized scene presentation data; the screen unit renders the game screen according to the synchronized logical data and the synchronized scene presentation data, so that the game scene in the game screen is synchronized with other clients.
[0225] Therefore, the embodiment of the present invention can improve the efficiency of the game synchronization method.
[0226] For example, in this embodiment, the method of the embodiment of the present invention will be described in detail by taking the game synchronization device being specifically integrated into the server as an example.
[0227] For example, Figure 5 As shown, the game synchronization device may include a joining unit 501, a client obtaining unit 502, and a sending unit 503, as follows:
[0228] (1) Add unit 501:
[0229] The joining unit 501 may be configured to, upon receiving a game joining message from a target client, send a performance reporting instruction to other clients according to a preset frequency. The performance reporting instruction may be configured to notify other clients to report visual performance objects.
[0230] (2) Client acquisition unit 502:
[0231] The client acquisition unit 502 may be used to acquire visual representation objects and operation instructions of other clients;
[0232] (3) Sending unit 503:
[0233] The sending unit 503 may be configured to send the operation instructions and the visual representation object to the target client according to a preset frequency, so that the target client can synchronize games with other clients.
[0234] In some embodiments, the game synchronization device may also be used to:
[0235] When receiving an operation instruction from a target client, the system refuses to send performance reporting instructions to other clients according to a preset frequency.
[0236] Obtaining operation instructions from the client, which may include the target client and other clients;
[0237] Send operation instructions to the client according to the preset frequency.
[0238] In specific implementation, the above units can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above units can be found in the previous method embodiments and will not be repeated here.
[0239] From the above, it can be seen that when the game synchronization device of this embodiment obtains the game joining message of the target client, the joining unit sends the performance reporting instruction to other clients according to the preset frequency, and the performance reporting instruction can be used to notify other clients to report the visual performance object; the client acquisition unit obtains the visual performance objects and operation instructions of other clients; the sending unit sends the operation instructions and visual performance objects to the target client according to the preset frequency, so that the target client is synchronized with the game of other clients.
[0240] Therefore, the embodiment of the present invention can improve the efficiency of the game synchronization method.
[0241] An embodiment of the present invention further provides an electronic device, which may be a terminal, a server, or the like. The terminal may be a mobile phone, a tablet computer, a smart Bluetooth device, a laptop computer, a personal computer, or the like; the server may be a single server or a server cluster consisting of multiple servers, or the like.
[0242] In some embodiments, the game synchronization device may also be integrated into multiple electronic devices. For example, the game synchronization device may be integrated into multiple servers, and the game synchronization method of the present invention may be implemented by multiple servers.
[0243] In this embodiment, the electronic device of this embodiment is a terminal or a server as an example for detailed description. Figure 6 , which shows a schematic structural diagram of an electronic device involved in an embodiment of the present invention, specifically:
[0244] The electronic device may include one or more processing core processors 601, one or more computer-readable storage media memories 602, a power supply 603, an input module 604, and a communication module 605. Those skilled in the art will appreciate that Figure 6The electronic device structure shown in the figure does not constitute a limitation of the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange components differently.
[0245] Processor 601 is the control center of the electronic device, connecting all parts of the electronic device using various interfaces and circuits. By running or executing software programs and / or modules stored in memory 602 and accessing data stored in memory 602, it performs various functions of the electronic device and processes data, thereby performing overall testing of the electronic device. In some embodiments, processor 601 may include one or more processing cores. In some embodiments, processor 601 may integrate an application processor and a modem processor, wherein the application processor primarily handles the operating system, user interface, and application programs, while the modem processor primarily handles wireless communications. It is understood that the modem processor may not be integrated into processor 601.
[0246] The memory 602 can be used to store software programs and modules. The processor 601 executes various functional applications and data processing by running the software programs and modules stored in the memory 602. The memory 602 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 602 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage device. Accordingly, the memory 602 may also include a memory controller to provide the processor 601 with access to the memory 602.
[0247] The electronic device also includes a power supply 603 for supplying power to various components. In some embodiments, the power supply 603 can be logically connected to the processor 601 via a power management system, thereby enabling the power management system to manage charging, discharging, and power consumption. The power supply 603 can also include one or more DC or AC power supplies, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and other arbitrary components.
[0248] The electronic device may further include an input module 604, which may be configured to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0249] The electronic device may further include a communication module 605. In some embodiments, the communication module 605 may include a wireless module. The electronic device may perform short-range wireless transmission via the wireless module of the communication module 605, thereby providing the user with wireless broadband Internet access. For example, the communication module 605 may be used to help the user send and receive emails, browse web pages, and access streaming media.
[0250] Although not shown, the electronic device may further include a display unit and the like, which will not be described in detail here.
[0251] Specifically in this embodiment, the processor 601 in the electronic device will load the executable files corresponding to the processes of one or more applications into the memory 602 according to the following instructions, and the processor 601 will run the applications stored in the memory 602 to achieve various functions.
[0252] For example, in some embodiments, the electronic device may be a terminal. The processor 601 in the terminal may load executable files corresponding to one or more application processes into the memory 602 according to the following instructions, and the processor 601 may run the application stored in the memory 602 to implement various functions as follows:
[0253] Constructing an initial game scene, which is composed of at least logic data and visual representation objects;
[0254] Obtain operation instructions and visual representation objects from other clients from the server;
[0255] Synchronize the logic data of the initial game scene according to the operation instructions to obtain synchronized logic data;
[0256] Based on the synchronized logic data, instantiate the visual performance object in the initial game scene to obtain the synchronized scene performance data;
[0257] The game screen is rendered according to the synchronized logic data and the synchronized scene performance data, so that the game scene in the game screen is synchronized with other clients.
[0258] For example, in some embodiments, the electronic device may be a server. The processor 601 in the server may load executable files corresponding to one or more application processes into the memory 602 according to the following instructions, and the processor 601 may run the application stored in the memory 602 to implement various functions as follows:
[0259] When a game joining message from a target client is received, a performance reporting instruction is sent to other clients according to a preset frequency. The performance reporting instruction can be used to notify other clients to report visual performance objects;
[0260] Obtain visual representation objects and operation instructions from other clients;
[0261] The operation instructions and visual performance objects are sent to the target client according to the preset frequency so that the target client can synchronize the games with other clients.
[0262] The specific implementation of the above operations can be found in the previous embodiments and will not be repeated here.
[0263] From the above, it can be seen that this solution can improve the efficiency of the game synchronization method.
[0264] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be accomplished by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0265] To this end, an embodiment of the present invention provides a computer-readable storage medium, which stores a plurality of instructions, and the instructions can be loaded by a processor to execute the steps in any one of the game synchronization methods provided in the embodiment of the present invention.
[0266] For example, in some embodiments, the instruction may execute the following steps:
[0267] Constructing an initial game scene, which is composed of at least logic data and visual representation objects;
[0268] Obtain operation instructions and visual representation objects from other clients from the server;
[0269] Synchronize the logic data of the initial game scene according to the operation instructions to obtain synchronized logic data;
[0270] Based on the synchronized logic data, instantiate the visual performance object in the initial game scene to obtain the synchronized scene performance data;
[0271] The game screen is rendered according to the synchronized logic data and the synchronized scene performance data, so that the game scene in the game screen is synchronized with other clients.
[0272] For example, in some embodiments, the instruction may execute the following steps:
[0273] When a game joining message from a target client is received, a performance reporting instruction is sent to other clients according to a preset frequency. The performance reporting instruction can be used to notify other clients to report visual performance objects;
[0274] Obtain visual representation objects and operation instructions from other clients;
[0275] The operation instructions and visual performance objects are sent to the target client according to the preset frequency so that the target client can synchronize the games with other clients.
[0276] The storage medium may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0277] According to one aspect of the present application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various optional implementations of the aforementioned embodiments for game synchronization, game loading, and game frame tracking.
[0278] Since the instructions stored in the storage medium can execute the steps in any game synchronization method provided in the embodiments of the present invention, the beneficial effects that can be achieved by any game synchronization method provided in the embodiments of the present invention can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0279] The above is a detailed introduction to a game synchronization method, device, terminal, server and computer-readable storage medium provided in an embodiment of the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there may be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A game synchronization method, characterized in that: Applied to the client, including: Constructing an initial game scene, wherein the initial game scene is composed of at least logic data and visual representation objects; Obtain operation instructions and visual representation objects from other clients from the server; Synchronize the logic data of the initial game scene according to the operation instructions of the other clients to obtain synchronized logic data; Based on the synchronized logic data, instantiate the visual performance objects of the other clients in the initial game scene to obtain synchronized scene performance data; Rendering a game screen according to the synchronized logic data and the synchronized scene performance data, so that the game scene in the game screen is synchronized with the other clients; The obtaining of the operation instructions and visual representation objects of the other clients from the server includes: Acquire, from the server, operation instructions and object replacement information of the other client, wherein the object replacement information includes information that multiple candidate objects are created or deleted by the other client; determining the visual representation object of the other client according to the object replacement information, where the visual representation object is a candidate object that has not been eliminated by the other client; The instantiating of the visual representation objects of the other clients in the initial game scene includes: placing game models of the visual representation objects of the other clients in the initial game scene, wherein the game models of the visual representation objects of the other clients include preset parameters.
2. The game synchronization method according to claim 1, wherein: After rendering the game screen according to the synchronized logical data and the synchronized scene performance data, the method further includes: Obtaining user operation instructions for the game scene; Reporting the user's operation instructions for the game scene to the server.
3. The game synchronization method according to claim 2, wherein: Also includes: When a performance reporting instruction is obtained from the server, determining a visual performance object appearing in the game scene; Report the visual performance objects appearing in the game scene to the server.
4. The game synchronization method according to claim 2, wherein: Also includes: When the operation instruction of the other client is obtained from the server, the game scene is updated according to the operation instruction of the other client to obtain an updated game scene; The game screen is rendered according to the updated game scene, so that the game scene in the game screen is synchronized with the other clients.
5. The game synchronization method according to claim 1, wherein: Before rendering the game screen according to the synchronized logical data and the synchronized scene performance data, the method further includes: Obtaining the operation instructions and visual representation objects of the other clients from the server again; updating the synchronized logical data according to the reacquired operation instructions of the other clients to obtain updated logical data; updating the synchronized scene representation data based on the updated logical data and the reacquired visual representation objects of other clients to obtain updated scene representation data; After rendering the game screen according to the synchronized logical data and the synchronized scene performance data, the method further includes: The game screen is rendered again according to the updated logic data and the updated scene performance data, so that the game scene in the game screen is synchronized with the other clients.
6. The game synchronization method according to claim 1, wherein: Before constructing the initial game scene, the following steps are also included: Display the game loading interface; After rendering the game screen according to the synchronized logical data and the synchronized scene performance data, the method further includes: Cancel displaying the game loading interface; The game screen is displayed.
7. The game synchronization method according to claim 1, wherein: The instantiating of the visual performance objects of the other clients in the initial game scene based on the synchronized logical data to obtain synchronized scene performance data further includes: sequentially determining a target candidate object from a plurality of candidate objects in the object replacement information; Based on the post-synchronization logic data, instantiate the target candidate object in the initial game scene to obtain post-synchronization scene performance data of the target candidate object; Rendering a game screen according to the synchronized logic data and the synchronized scene performance data of the target candidate object; Return and execute the steps to determine a target candidate object from the multiple candidate objects in the object replacement information in turn until all candidate objects in the object replacement information are processed, so that the game scene in the game screen is synchronized with the other clients.
8. A game synchronization method, characterized in that: Applicable to servers, including: When a game joining message of a target client is obtained, a performance reporting instruction is sent to other clients according to a preset frequency, wherein the performance reporting instruction is used to notify the other clients to report the visual performance objects of the other clients; Obtaining visual representation objects and operation instructions of the other client; Sending the operation instructions and visual performance objects of the other clients to the target client according to the preset frequency, so that the target client synchronizes the game with the other clients; The target client synchronizes the game with the other clients, including: constructing an initial game scene, the initial game scene being composed of at least logic data and visual representation objects; obtaining operation instructions and visual representation objects of other clients from a server; synchronizing the logic data of the initial game scene according to the operation instructions of the other clients to obtain synchronized logic data; instantiating the visual representation objects of the other clients in the initial game scene based on the synchronized logic data to obtain synchronized scene representation data; rendering a game screen according to the synchronized logic data and the synchronized scene representation data, so that the game scene in the game screen is synchronized with that of the other clients; The obtaining of the operation instructions and visual representation objects of the other clients from the server includes: obtaining the operation instructions and object replacement information of the other clients from the server, the object replacement information including information that a plurality of candidate objects are created or eliminated by the other clients; determining the visual representation objects of the other clients based on the object replacement information, the visual representation objects being candidate objects that have not been eliminated by the other clients; The instantiating of the visual representation objects of the other clients in the initial game scene includes: placing game models of the visual representation objects of the other clients in the initial game scene, wherein the game models of the visual representation objects of the other clients include preset parameters.
9. The game synchronization method according to claim 8, wherein: After sending the operation instructions and visual representation objects of the other clients to the target client according to the preset frequency, the method further includes: When an operation instruction of the target client is obtained, refusing to send a performance reporting instruction to the other clients according to the preset frequency; Obtaining an operation instruction from a client, where the client includes the target client and the other clients; The operation instruction is sent to the client according to the preset frequency.
10. A game synchronization device, characterized in that: Applied to the client, including: An initial unit, configured to construct an initial game scene, wherein the initial game scene is composed of at least logic data and visual representation objects; The server acquisition unit is configured to acquire operation instructions and visual representation objects of other clients from the server; the acquiring operation instructions and visual representation objects of the other clients from the server comprises: acquiring operation instructions and object replacement information of the other clients from the server, the object replacement information comprising information that a plurality of candidate objects are created or eliminated by the other clients; and determining the visual representation objects of the other clients based on the object replacement information, the visual representation objects being candidate objects that have not been eliminated by the other clients. A logic unit, configured to synchronize the logic data of the initial game scene according to the operation instructions of the other clients to obtain synchronized logic data; a presentation unit configured to instantiate the visual presentation objects of the other clients in the initial game scene based on the post-synchronization logic data to obtain post-synchronization scene presentation data; wherein the instantiating of the visual presentation objects of the other clients in the initial game scene comprises: placing a game model of the visual presentation object of the other clients in the initial game scene, wherein the game model of the visual presentation object of the other clients comprises pre-set parameters; A screen unit is used to render a game screen according to the synchronized logic data and the synchronized scene performance data, so that the game scene in the game screen is synchronized with the other clients.
11. A game synchronization device, characterized in that: Applicable to servers, including: a joining unit configured to, upon receiving a game joining message from a target client, send a performance reporting instruction to other clients according to a preset frequency, wherein the performance reporting instruction is used to notify the other clients to report the visual performance objects of the other clients; A client acquisition unit, configured to acquire the visual representation object and operation instruction of the other client; a sending unit, configured to send the operation instructions and visual performance objects of the other clients to the target client according to the preset frequency, so that the target client can synchronize games with the other clients; The target client synchronizes the game with the other clients, including: constructing an initial game scene, the initial game scene being composed of at least logic data and visual representation objects; obtaining operation instructions and visual representation objects of other clients from a server; synchronizing the logic data of the initial game scene according to the operation instructions of the other clients to obtain synchronized logic data; instantiating the visual representation objects of the other clients in the initial game scene based on the synchronized logic data to obtain synchronized scene representation data; rendering a game screen according to the synchronized logic data and the synchronized scene representation data, so that the game scene in the game screen is synchronized with that of the other clients; The obtaining of the operation instructions and visual representation objects of the other clients from the server includes: obtaining the operation instructions and object replacement information of the other clients from the server, the object replacement information including information that a plurality of candidate objects are created or eliminated by the other clients; determining the visual representation objects of the other clients based on the object replacement information, the visual representation objects being candidate objects that have not been eliminated by the other clients; The instantiating of the visual representation objects of the other clients in the initial game scene includes: placing game models of the visual representation objects of the other clients in the initial game scene, wherein the game models of the visual representation objects of the other clients include preset parameters.
12. A terminal, characterized in that: The system comprises a processor and a memory, wherein the memory stores a plurality of instructions; the processor loads instructions from the memory to execute the steps in the game synchronization method according to any one of claims 1 to 7.
13. A server, characterized in that: It comprises a processor and a memory, wherein the memory stores a plurality of instructions; the processor loads instructions from the memory to execute the steps in the game synchronization method according to any one of claims 8 to 9.
14. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the steps of the game synchronization method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Game data processing method and device, storage medium and electronic equipment
CN111744177A