Game data processing method, device, medium and electronic equipment

By calculating the target logical frame in multiplayer games and determining the starting playback position of the animation, the problem of inconsistency between the presentation layer and the logic layer under frame synchronization technology is solved, and the gaming experience is improved.

CN114699767BActive Publication Date: 2024-12-20BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202210399239.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-15
Publication Date
2024-12-20
Estimated Expiration
2042-04-15

AI Technical Summary

Technical Problem

In multiplayer games, especially in RTS games, frame synchronization technology is difficult to ensure the consistency of the movements and positions of the presentation layer and the logic layer, resulting in poor user experience and the problem that the character actions in the presentation layer do not match the calculation results of the logic layer.

Method used

By starting the timer in the target game process, the target logic frame in the current game state is calculated based on the acquired game data, and the starting playback position of the animation to be played in the target logic frame is determined, thereby avoiding direct playback of the animation from scratch, ensuring that The animation is consistent with the logical state.

Benefits of technology

It improves the animation performance of each game character in the game, enhances the user's gaming experience, ensures that the animation is closer to the calculation results of the logic layer, and solves the problem of inconsistent actions and positions under frame synchronization technology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114699767B_ABST
    Figure CN114699767B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a game data processing method, device, medium and electronic device, including: in response to the target game proceeding to a preset game process, starting a target timer; determining a target logic frame in the current game state according to the acquired game data; when the target logic frame includes an animation to be played, determining the starting playback position of the animation to be played according to the target logic frame; starting from the starting playback position, rendering the animation to be played in the client presentation layer. In this way, the starting playback position of the animation to be played can be adjusted according to the target logic frame that needs to be rendered in the presentation frame, avoiding the problem of inconsistency between the character action and the current logic state of the game caused by directly playing the animation to be played from the beginning, so that the animation to be played better matches the calculation result of the target logic frame, and improves the animation performance of each game character in the presentation layer.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular, to a game data processing method, device, medium and electronic device. Background Art

[0002] Currently, in multiplayer games, game synchronization between multiple clients is a necessary goal that needs to be achieved, and there are two main technical directions for achieving game synchronization between multiple clients, including state synchronization and frame synchronization. The state synchronization method is often used in turn-based games. The amount of data that needs to be synchronized will increase with the increase in the number of units that need to be synchronized. Therefore, it is not practical in games that need to synchronize a large number of units, such as RTS (real-time strategy) games. Frame synchronization is a synchronization technology often used in RTS (real-time strategy) games. Frame synchronization technology does not synchronize states, but only synchronizes operations. For example, in the game, the player's operation instructions are synchronized, and the operation instructions contain the current frame index.

[0003] In games that use frame synchronization technology, the client logic layer is needed to calculate and determine the actions and position changes of each unit in the game at the presentation layer, that is, the scene that the user can see. Therefore, it is very important to ensure that the unit actions and positions rendered in the presentation layer are consistent with the calculation results of the logic layer. Summary of the invention

[0004] This summary is provided to introduce concepts in a brief form that will be described in detail in the detailed description below. This summary is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.

[0005] In a first aspect, the present disclosure provides a game data processing method, the method comprising: in response to a target game advancing to a preset game process, starting a target timer; determining a target logical frame in a current game state based on acquired game data; when an animation to be played is included in the target logical frame, determining a starting playback position of the animation to be played based on the target logical frame; starting from the starting playback position, rendering the animation to be played in a client presentation layer.

[0006] In a second aspect, the present disclosure provides a game data processing device, which includes: a starting module, which is used to start a target timer in response to the target game proceeding to a preset game process; a logical frame determination module, which is used to determine the target logical frame in the current game state according to the acquired game data; a position determination module, which is used to determine the starting playback position of the animation to be played according to the target logical frame when the animation to be played is included in the target logical frame; and a rendering module, which is used to render the animation to be played in the client presentation layer starting from the starting playback position.

[0007] In a third aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the method described in the first aspect above.

[0008] In a fourth aspect, the present disclosure provides an electronic device, comprising: a storage device on which a computer program is stored; and a processing device for executing the computer program in the storage device to implement the steps of the method described in the first aspect above.

[0009] Through the above technical scheme, after the target game reaches the preset game process, the target logical frame in the current game state can be calculated according to all the acquired game data, and when the target logical frame includes the animation to be played, the starting playback position of the animation to be played is determined according to the target logical frame, so as to avoid the problem of inconsistency between the character action and the current logical state of the game caused by directly playing the animation to be played from the beginning, so that the animation to be played better matches the calculation result of the target logical frame, improves the animation performance of each game character in the presentation layer, and further improves the game experience of users.

[0010] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale. In the drawings:

[0012] Figure 1 The figure is a flowchart of a method for processing game data according to an exemplary embodiment of the present disclosure.

[0013] Figure 2 is a flowchart of a method for processing game data according to another exemplary embodiment of the present disclosure.

[0014] Figure 3is a flowchart of a method for processing game data according to another exemplary embodiment of the present disclosure.

[0015] Figure 4 is a flowchart of a method for processing game data according to another exemplary embodiment of the present disclosure.

[0016] Figure 5 is a flowchart of a method for processing game data according to another exemplary embodiment of the present disclosure.

[0017] Figure 6 It is a structural block diagram of a game data processing device according to an exemplary embodiment of the present disclosure.

[0018] Figure 7 is a structural block diagram of a game data processing device according to another exemplary embodiment of the present disclosure.

[0019] Figure 8 A schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0020] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0021] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0022] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0023] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0024] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0025] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0026] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0027] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0028] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0029] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0030] At the same time, it is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.

[0031] Figure 1 FIG. 1 is a flowchart of a method for processing game data according to an exemplary embodiment of the present disclosure. Figure 1 As shown, the method includes steps 101 to 105.

[0032] In step 101, in response to the target game entering a preset game process, a target timer is started. The preset game process may be, for example, a game entering a specific battle mode, or any other game process that needs to ensure that the game interface animation and user operations are consistent. The target timer is used to record the rendering duration of each presentation frame in the presentation layer.

[0033] In step 102, the target logical frame in the current game state is determined based on the acquired game data. The game data may include, for example, one or more of the game operations input by the user on the client, the game operations input by other game players in the current game process sent by the server to the client, and the game setting data related to the current game process. The specific content of the game data is not limited in the present disclosure, and any game data related to the animation rendering of the game screen can be used as the game data for determining the target logical frame.

[0034] In step 103, when the target logical frame includes an animation to be played, the starting playback position of the animation to be played is determined according to the target logical frame. The duration of the animation to be played can be any preset duration, such as 1 second or 2 seconds. The animation to be played can be an animation corresponding to a character action triggered by a game operation input by a user on a client or other game players on other clients. The content of the animation to be played is not specifically limited in the present disclosure. The starting playback position can be any intermediate position in the playback process of the animation to be played. For example, for an animation to be played with a duration of 1 second, the starting playback position can be the 0.9 second of the animation to be played.

[0035] In step 104, starting from the starting playback position, the animation to be played is rendered in the client presentation layer.

[0036] In the present disclosure, the presentation layer is a functional unit for rendering the game screen to show it to the user. The presentation frame will be rendered in the interface to show the game screen to the user. The logic frame is the data calculated by the logic layer, which is used to represent the current state of the game, that is, the state of each game character in the game that is calculated based on the game operations entered by the user in his own client, the game operations entered by other game players in the current game process sent by the server to the client, and the game setting data related to the current game process. The presentation layer is driven by the logic layer, and renders the presentation frame according to the calculation results of the logic layer without affecting the logic.

[0037] From the time the target game reaches the preset game process, the target logic frame of the target game in the current game state can be calculated according to the preset rules to ensure that the client can synchronize the game operations of the user in the client and the game operations input by other game players sent by the server in a timely manner. Correspondingly, the presentation layer can also render the presentation frame according to the logic frame calculated by the logic layer from the time the target game reaches the preset game process, and present the game screen to the user in a timely manner.

[0038] In conventional frame synchronization schemes, only the logical accuracy of the logic layer can be guaranteed. Since the rendering time of the presentation frame is affected by hardware factors, the rendering time of each frame cannot be guaranteed. Therefore, there is no good way to ensure that the presentation layer can perfectly render all the logical frames calculated by the logic layer in the interface and guarantee the user's gaming experience. For example, there may be a situation where multiple logical frames calculated need to be executed in a certain presentation frame, or there may be a situation where a certain presentation frame does not execute any logical frames. Therefore, even in a good network environment, it is easy to have a very obvious problem that the character action picture being displayed in the interface does not match the logical frame calculated by the logic layer. For example, the character's attack action has not started to play on the interface, but the damage corresponding to the character's attack action has been displayed in other display interfaces.

[0039] The following is a detailed example of the process in which the above problem occurs.

[0040] Under ideal conditions, each presentation frame of the presentation layer will be refreshed at a preset frame rate. For example, if a conventional gaming device can meet a 60HZ frame rate, the user can set the game refresh frame rate to 60HZ, which is equivalent to refreshing the presentation frame 60 times per second, that is, the rendering duration of each presentation frame is 1 / 60 seconds. The logical frame will also be calculated according to the preset frame rate. For example, if the frame rate of the logical frame is 30HZ, the logical layer will calculate the logical frame every 1 / 30 second. However, the update of the logical layer depends on the actual rendering duration of the presentation frame. Specifically, the logical layer can determine the update timing of the logical layer based on the actual rendering progress of the presentation layer, that is, the value in the target timer. At the end of rendering each presentation frame, check whether the value in the target timer reaches the threshold for updating the logical frame. If so, the logical frame will be updated. For example, the frame rate of the logical frame is 30HZ, and the logical frame duration is 1 / 30 second, which means that a logical frame will be updated only after the value in the target timer reaches 1 / 30 second. Then, the target timer starts to count the rendering duration when the first presentation frame is rendered. If the rendering duration of the first presentation frame is 1 / 60, after the rendering of the first presentation frame is completed, the target timer has not reached 1 / 30 second, so the next presentation frame is rendered without updating the logical frame or processing the value in the target timer. Instead, the timing continues based on the value. If the rendering duration of the second presentation frame is 1 / 60, after the rendering of the second presentation frame is completed, the value in the target timer just reaches 1 / 30, and the update of the next logical frame can be triggered at this time. When the update of a logical frame is triggered, the frame duration corresponding to a logical frame will be eliminated in the target timer accordingly. Thus, the value in the target timer returns to 0, and the timing starts again from the next presentation frame, that is, the third presentation frame.

[0041] However, due to the different hardware capabilities of different devices, the time required for different devices to render the same presentation frame will also vary, and each presentation frame cannot be rendered at the ideal frame rate. For example, the rendering duration of a presentation frame was originally expected to be 1 / 60 seconds, but due to device hardware reasons, it actually took only 1 / 65 seconds to complete the rendering and end the rendering. Alternatively, the rendering duration of a presentation frame was originally expected to be maintained at 1 / 60 seconds, but due to device hardware reasons, it actually took 1 / 5 seconds to complete the rendering of the presentation frame. Therefore, in the actual game process, the same presentation frame may need to be rendered to multiple logical frames. For example, when the presentation layer renders the logical frame calculated by the logical layer under ideal conditions, it is assumed that after calculating that character A in the game performs attack action 1, it takes 30 logical frames (the animation duration of attack action 1 is 1 second) to calculate that character B should be hurt in response to the attack action of character A. At this time, since the rendering time of the previous presentation frame reaches 2 seconds, and the value in the target timer has accumulated to 2 seconds, it will be determined that the next presentation frame needs to update 60 logical frames if the logical frame rate is 1 / 30. As a result, the same presentation frame needs to be rendered for multiple logical frames. Furthermore, this situation may bring about problems that affect user experience. For example, if one of the 60 logical frames requires character A in the game data to execute the animation of attack action 1, and another logical frame 30 logical frames later requires character B in the game data to receive damage in response to character A's attack action 1, and both frames are included in the 60 logical frames, then the presentation layer may simultaneously start playing the animation of character A executing the attack action 1 in the current presentation frame, and at the same time display the damage to character B caused by character A's attack action 1, that is, in the same presentation frame, character B is shown to have received damage when character A just starts to execute the attack action, thereby causing the problem that the character's attack action has not yet begun, but the damage caused by the attack has already occurred.

[0042] In this embodiment, when it is determined that the target logical frame is obtained and it is determined that the target logical frame includes the animation to be played, the starting playback position of the animation to be played is determined according to the target logical frame, and then the animation to be played is rendered from the starting playback position to avoid directly playing the animation to be played from the beginning. For example, if it is determined that the target logical frame obtained includes the animation to be played, such as the animation of the attack action 1 that the above-mentioned character A needs to perform, the starting playback position of the animation to be played can be re-determined according to the target logical frame, and the animation will not be played directly from the beginning through the presentation layer, so that the playback starting point of the animation can be determined in consideration of the specific state of the target logical frame, so that the character action in the presentation layer is more consistent with the calculation result of the logical frame. For example, when the target logical frame has more than one frame, the content of the animation to be played can be deleted according to the number of frames of the logical frame to ensure that the character action animation in the presentation layer is more consistent with the calculation result of the most recent logical frame in the target logical frame, etc. The specific method of determining the start and end positions of the animation to be played according to the target logical frame is not limited in the present disclosure, as long as the character animation of the presentation layer can be made as close as possible to the calculation result of the most recent logical frame in the target logical frame.

[0043] Through the above technical scheme, after the target game reaches the preset game process, the target logical frame in the current game state can be calculated according to all the acquired game data, and when the target logical frame includes the animation to be played, the starting playback position of the animation to be played is determined according to the target logical frame, so as to avoid the problem of inconsistency between the character action and the current logical state of the game caused by directly playing the animation to be played from the beginning, so that the animation to be played better matches the calculation result of the target logical frame, improves the animation performance of each game character in the presentation layer, and further improves the game experience of users.

[0044] Figure 2 FIG. 1 is a flowchart of a method for processing game data according to an exemplary embodiment of the present disclosure. Figure 2 As shown, the method includes steps 201 to 203.

[0045] In step 201, a value of a target timer is obtained as a first time, wherein the target timer is used to record a rendering duration of each presentation frame in the presentation layer.

[0046] In step 202, the target logical frame in the current game state is calculated according to the first time and the acquired game data, and the target logical frame is at least one frame.

[0047] In step 203, a second time obtained by subtracting the total duration of the logical frames corresponding to the target logical frame from the first time is used as the value of the target timer to continue recording the rendering duration of each presentation frame in the client presentation layer.

[0048] After the target game reaches the preset game process, when the target logic frame is calculated for the first time in response to the target game reaching the preset game process, the value in the target timer may be zero; after the presentation layer starts to execute the target logic frame, the target timer also starts to record the rendering time of the presentation frame in the presentation layer accordingly, and calculates the target logic frame according to the following example: Figure 2 The method in steps 201 to 203 in triggers the calculation of the subsequent target logical frame.

[0049] Among them, the method for calculating the target logical frame in the current game state according to the first time and the acquired game data can be: dividing the first time by the duration of a single logical frame and then rounding down to obtain the number of frames of the logical frame to be updated; calculating the logical frame according to the number of frames of the logical frame to be updated to obtain the target logical frame, and the number of frames of the target logical frame is the number of frames of the logical frame to be updated. For example, if the duration of the rendering of a certain frame performance frame reaches 1 / 15 second, and before the rendering of the frame performance frame starts, the value in the target timer is 1 / 75 second, then after the rendering of the frame performance frame ends, the value in the target timer is 6 / 75 second. After determining this value as the first time, since it can be determined that the first time has passed the frame duration of two logical frames, but is less than the frame duration of three logical frames, it can be determined that the number of logical frames to be updated is 2, and then the two logical frames can be updated. After obtaining the updated two-frame target logical frame, the logical frame duration corresponding to the two-frame target logical frame, that is, 1 / 15, is subtracted from the target timer. After the subtraction, the remaining value 1 / 75 in the target timer is the second time in step 203.

[0050] Figure 3 FIG. 1 is a flowchart of a method for processing game data according to an exemplary embodiment of the present disclosure. Figure 3 As shown, the method further includes step 301.

[0051] In step 301, that is, when the target logical frame includes the animation to be played, and the number of frames of the target logical frame is greater than a preset threshold, the starting playback position of the animation to be played is determined according to the number of frames of the target logical frame. For example, the above-mentioned scheme can be used to delete the animation content of the animation to be played according to the number of frames of the target logical frame, so as to ensure that the character action animation in the presentation layer is more consistent with the calculation result of the most recent logical frame in the target logical frame. In the present disclosure, the preset threshold can be 1.

[0052] Specifically, in a possible implementation, the method for determining the starting playback position of the animation to be played by the frame number of the target logical frame can be: taking the Mth frame of the animation to be played as the starting playback position of the animation to be played, where M=N-1, and N is the frame number of the target logical frame.

[0053] Figure 4 FIG. 1 is a flowchart of a method for processing game data according to another exemplary embodiment of the present disclosure. Figure 4 As shown, the method further includes step 401 and step 402.

[0054] In step 401, when the target logical frame includes the animation to be played and the number of frames of the target logical frame is not greater than a preset threshold, the animation position reached by the animation to be played after the second time is taken as the starting playback position.

[0055] In step 402, when the target logical frame includes the animation to be played and the number of frames of the target logical frame is greater than a preset threshold, the starting playback frame of the animation to be played is determined according to the number of frames of the target logical frame, and the animation position reached by the animation to be played after the second time from the starting playback frame is used as the starting playback position.

[0056] That is, when the target logical frame includes the animation to be played, the method of determining the starting playback position of the animation to be played according to the target logical frame can be determined according to the second time in addition to the frame number of the target logical frame.

[0057] For example, when the number of frames of the target logical frame is not greater than a preset threshold, there is no need to modify the starting playback frame of the animation to be played according to the number of frames of the target logical frame. However, if the second time is not zero at this time, that is, the value in the target timer is not zero, the calculation result that actually represents the current target logical frame is not the character logic corresponding to the current time point, but the character logic corresponding to the time point before the second time. Therefore, the value in the target timer, that is, the second time, can be used as the rendering duration of the animation to be played, and the duration corresponding to the value in the target timer is subtracted from the overall duration of the animation to be played before starting to play, so that the character animation displayed in the presentation layer can be more fine-grained in line with the calculation results of the logic layer.

[0058] When the number of frames of the target logical frame is greater than a preset threshold, the starting playback position of the animation to be played can be adjusted at the frame level granularity according to the number of frames of the target logical frame to obtain the starting playback frame of the animation to be played, and then the adjusted animation to be played can be adjusted in a more fine-grained manner according to the second time, thereby achieving the purpose of making the character animation performance of the presentation layer more consistent with the calculation results of the logic layer.

[0059] Figure 5 FIG. 1 is a flowchart of a method for processing game data according to another exemplary embodiment of the present disclosure. Figure 5 As shown, the method further includes steps 501 to 503.

[0060] In step 501, each original animation is separated into first displacement information, key frames and an animation model excluding displacement information.

[0061] In step 502, based on the first displacement information and key frames of each original animation, action fusion calculation is performed on the combination of two or more original animations to obtain valid animation key frames, wherein the valid animation key frames include the second displacement information after the action fusion calculation.

[0062] In step 503, the logical frame is calculated according to the acquired game data, the valid animation key frame and the first time calculation to obtain the target logical frame.

[0063] Since the client logic layer cannot perform fusion optimization on the actions between multiple animations, the present disclosure will pre-separate the original animations corresponding to all the characters in the game as shown in step 501. The first displacement information is all the displacement information included in each frame of the original animation, and the key frame is the most critical frame or frames of each pre-set original animation. Then, as shown in step 502, the combination of two or more original animations is subjected to action fusion calculation based on the first displacement information and key frame obtained by separation. In the process of action fusion calculation, the first displacement information corresponding to each action in the different action combinations needs to be reconfirmed because the displacement information between the two actions needs to be connected or reasonably combined. After reconfirmation, the reconfirmed data information will be compared with the first displacement information and key frame corresponding to the original animation. If there is the same content, it will be filtered out as invalid information, and the first information and key frame corresponding to the original animation will be directly used as the valid animation key frame, so as to save storage space as much as possible.

[0064] After the pre-action fusion processing, during the running of the game application, the client's logic layer can calculate the results of each logic frame based on the game data and the effective animation key frames of each animation obtained by the pre-processing, so as to determine the actions and positions of each game character in the game. After the logic layer calculates the position and action of each character through the calculated logic frame, the presentation layer can present the target animation of the character at the position calculated by the logic layer according to the animation model that does not include displacement information.

[0065] Figure 6 FIG. 1 is a structural block diagram of a game data processing device according to an exemplary embodiment of the present disclosure. Figure 6 As shown, the device includes: a starting module 10, which is used to start a target timer in response to the target game proceeding to a preset game process; a logic frame determination module 20, which is used to determine the target logic frame in the current game state according to the acquired game data; a position determination module 30, which is used to determine the starting playback position of the animation to be played according to the target logic frame when the animation to be played is included in the target logic frame; and a rendering module 40, which is used to render the animation to be played in the client presentation layer starting from the starting playback position.

[0066] Through the above technical scheme, after the target game reaches the preset game process, the target logical frame in the current game state can be calculated according to all the acquired game data, and when the target logical frame includes the animation to be played, the starting playback position of the animation to be played is determined according to the target logical frame, so as to avoid the problem of inconsistency between the character action and the current logical state of the game caused by directly playing the animation to be played from the beginning, so that the animation to be played better matches the calculation result of the target logical frame, improves the animation performance of each game character in the presentation layer, and further improves the game experience of users.

[0067] Figure 7 FIG. 1 is a structural block diagram of a game data processing device according to an exemplary embodiment of the present disclosure. Figure 7 As shown, the logical frame determination module 20 is also used to: obtain the value of the target timer as the first time, wherein the target timer is used to record the rendering duration of each presentation frame in the presentation layer; calculate the target logical frame in the current game state according to the first time and the acquired game data, and the target logical frame is at least one frame; the device also includes: a recording module 50, which is used to take the second time after subtracting the total duration of the logical frame corresponding to the target logical frame from the first time as the value of the target timer, so as to continue to record the rendering duration of each presentation frame in the client presentation layer.

[0068] In a possible implementation manner, the position determination module 30 is further configured to: when the number of frames of the target logical frame is greater than a preset threshold, determine the starting playback position of the animation to be played according to the number of frames of the target logical frame.

[0069] In a possible implementation manner, the position determination module 30 is further configured to: use the Mth frame of the animation to be played as the starting position of the animation to be played, wherein M=N-1, and N is the number of frames of the target logical frame.

[0070] In a possible implementation manner, the position determination module 30 is further used to determine a starting playback position of the animation to be played according to the second time.

[0071] In a possible implementation, the position determination module 30 is also used for: when the number of frames of the target logical frame is not greater than a preset threshold, using the animation position reached by the animation to be played after the second time has passed as the starting playback position; when the number of frames of the target logical frame is greater than a preset threshold, determining the starting playback frame of the animation to be played according to the number of frames of the target logical frame, and using the animation position reached by the animation to be played after the second time has passed from the starting playback frame as the starting playback position.

[0072] In a possible implementation, the logical frame determination module 20 is further used to: divide the first time by the length of a single logical frame and round down to obtain the number of frames of the logical frame to be updated; calculate the logical frame according to the number of frames of the logical frame to be updated to obtain the target logical frame, and the number of frames of the target logical frame is the number of frames of the logical frame to be updated.

[0073] In a possible implementation, the device further includes: a separation module (not shown), used to separate each original animation into first displacement information, key frames and an animation model that does not include displacement information; an action fusion module (not shown), used to perform action fusion calculations on a combination of two or more original animations based on the first displacement information and key frames of each original animation to obtain valid animation key frames, wherein the valid animation key frames include second displacement information after the action fusion calculation; the logical frame determination module 20 is also used to calculate the logical frame based on the acquired game data, the valid animation key frames and the first time calculation to obtain the target logical frame.

[0074] Reference below Figure 8, which shows a schematic diagram of the structure of an electronic device 800 suitable for implementing the embodiment of the present disclosure. The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 8 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0075] like Figure 8 As shown, the electronic device 800 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage device 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the electronic device 800 are also stored. The processing device 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0076] Typically, the following devices may be connected to the I / O interface 805: input devices 806 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 807 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 808 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 809. The communication device 809 may allow the electronic device 800 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 8 The electronic device 800 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0077] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 809, or installed from a storage device 808, or installed from a ROM 802. When the computer program is executed by the processing device 801, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0078] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0079] In some embodiments, the client can communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0080] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0081] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: starts a target timer in response to the target game reaching a preset game process; determines a target logical frame in the current game state according to the acquired game data; when the target logical frame includes an animation to be played, determines the starting playback position of the animation to be played according to the target logical frame; and renders the animation to be played in the client presentation layer starting from the starting playback position.

[0082] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0083] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0084] The modules involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of the module does not limit the module itself in some cases. For example, the acquisition module may also be described as "a module that obtains the value of the target timer as the first time after rendering of each frame of the presentation layer".

[0085] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0086] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0087] According to one or more embodiments of the present disclosure, Example 1 provides a game data processing method, the method comprising: in response to the target game progressing to a preset game process, starting a target timer; determining a target logical frame in a current game state based on acquired game data; when the target logical frame includes an animation to be played, determining a starting playback position of the animation to be played based on the target logical frame; starting from the starting playback position, rendering the animation to be played in the client presentation layer.

[0088] According to one or more embodiments of the present disclosure, Example 2 provides the method of Example 1, wherein determining the target logical frame in the current game state based on the acquired game data includes: obtaining the value of the target timer as the first time, wherein the target timer is used to record the rendering duration of each presentation frame in the presentation layer; calculating the target logical frame in the current game state based on the first time and the acquired game data, wherein the target logical frame is at least one frame; the method further includes: taking the second time after subtracting the total duration of the logical frames corresponding to the target logical frame from the first time as the value of the target timer to continue recording the rendering duration of each presentation frame in the client presentation layer.

[0089] According to one or more embodiments of the present disclosure, Example 3 provides the method of Example 2, wherein when the target logical frame includes an animation to be played, determining the starting playback position of the animation to be played according to the target logical frame includes: when the number of frames of the target logical frame is greater than a preset threshold, determining the starting playback position of the animation to be played according to the number of frames of the target logical frame.

[0090] According to one or more embodiments of the present disclosure, Example 4 provides the method of Example 3, wherein when the target logical frame number is greater than a preset threshold, determining the starting playback position of the animation to be played according to the number of target logical frames includes: taking the Mth frame of the animation to be played as the starting playback position of the animation to be played, wherein M=N-1, and N is the number of the target logical frames.

[0091] According to one or more embodiments of the present disclosure, Example 5 provides the method of Example 3, wherein when the target logical frame includes an animation to be played, determining the starting playback position of the animation to be played according to the target logical frame also includes: determining the starting playback position of the animation to be played according to the second time.

[0092] According to one or more embodiments of the present disclosure, Example 6 provides the method of Example 5, wherein determining the starting playback position of the animation to be played based on the second time includes: when the number of frames of the target logical frame is not greater than a preset threshold, using the animation position reached by the animation to be played after the second time has passed as the starting playback position; when the number of frames of the target logical frame is greater than a preset threshold, determining the starting playback frame of the animation to be played based on the number of frames of the target logical frame, and using the animation position reached by the animation to be played after the second time has passed from the starting playback frame as the starting playback position.

[0093] According to one or more embodiments of the present disclosure, Example 7 provides the method of Example 2, and calculating the target logical frame in the current game state based on the first time and the acquired game data includes: dividing the first time by the length of a single logical frame and rounding down to obtain the number of frames of the logical frame to be updated; calculating the logical frame based on the number of frames of the logical frame to be updated to obtain the target logical frame, and the number of frames of the target logical frame is the number of frames of the logical frame to be updated.

[0094] According to one or more embodiments of the present disclosure, Example 8 provides the method of Example 2, which further includes: separating each original animation into first displacement information, key frames, and an animation model that does not include displacement information; performing action fusion calculations on a combination of two or more original animations based on the first displacement information and key frames of each original animation to obtain valid animation key frames, wherein the valid animation key frames include second displacement information after the action fusion calculation; calculating the target logical frame in the current game state based on the first time and the acquired game data includes: calculating the logical frame based on the acquired game data, the valid animation key frames and the first time to obtain the target logical frame.

[0095] According to one or more embodiments of the present disclosure, Example 9 provides a game data processing device, which includes: a starting module, used to start a target timer in response to the target game proceeding to a preset game process; a logical frame determination module, used to determine the target logical frame in the current game state according to the acquired game data; a position determination module, used to determine the starting playback position of the animation to be played according to the target logical frame when the animation to be played is included in the target logical frame; and a rendering module, used to render the animation to be played in the client presentation layer starting from the starting playback position.

[0096] According to one or more embodiments of the present disclosure, Example 10 provides a computer-readable medium having a computer program stored thereon, which implements the steps of any of the methods described in Examples 1-8 when executed by a processing device.

[0097] According to one or more embodiments of the present disclosure, Example 11 provides an electronic device, comprising: a storage device on which a computer program is stored; and a processing device for executing the computer program in the storage device to implement the steps of any one of the methods described in Examples 1-8.

[0098] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0099] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0100] Although the subject matter has been described in language specific to structural features and / or method logic actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims. Regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.

Claims

1. A method for processing game data, characterized in that: The method comprises: In response to the target game progressing to a preset game process, starting a target timer; Determine the target logic frame in the current game state according to the acquired game data; When the target logical frame includes the animation to be played, determining the starting playback position of the animation to be played according to the target logical frame; Starting from the starting playback position, rendering the animation to be played in the client presentation layer; Wherein, determining the target logical frame in the current game state according to the acquired game data includes: Obtaining a value of the target timer as a first time, wherein the target timer is used to record a rendering duration of each presentation frame in the presentation layer; Calculate the target logical frame in the current game state according to the first time and the acquired game data, wherein the target logical frame is at least one frame; The method further comprises: A second time obtained by subtracting the total duration of the logical frames corresponding to the target logical frame from the first time is used as the value of the target timer to continue recording the rendering duration of each presentation frame in the client presentation layer.

2. The method according to claim 1, characterized in that: When the target logical frame includes the animation to be played, determining the starting playback position of the animation to be played according to the target logical frame includes: When the number of the target logical frame is greater than a preset threshold, the starting playback position of the animation to be played is determined according to the number of the target logical frame.

3. The method according to claim 2, characterized in that When the target logical frame number is greater than a preset threshold, determining the starting playback position of the to-be-played animation according to the number of the target logical frames includes: The Mth frame of the animation to be played is used as the starting playback position of the animation to be played, wherein M=N-1, and N is the number of frames of the target logical frame.

4. The method according to claim 2, characterized in that: When the target logical frame includes the animation to be played, determining the starting playback position of the animation to be played according to the target logical frame further includes: The starting playback position of the animation to be played is determined according to the second time.

5. The method according to claim 4, characterized in that Determining the starting playback position of the animation to be played according to the second time includes: When the number of the target logical frame is not greater than the preset threshold, taking the animation position reached by the to-be-played animation after the second time as the starting playback position; When the number of frames of the target logical frame is greater than the preset threshold, the starting playback frame of the animation to be played is determined according to the number of frames of the target logical frame, and the animation position reached by the animation to be played after the second time from the starting playback frame is used as the starting playback position.

6. The method according to claim 1, characterized in that The calculating the target logical frame in the current game state according to the first time and the acquired game data comprises: Divide the first time by the duration of a single logical frame and round down to obtain the number of logical frames to be updated; The logical frame is calculated according to the frame number of the to-be-updated logical frame to obtain the target logical frame, and the frame number of the target logical frame is the frame number of the to-be-updated logical frame.

7. The method according to claim 1, characterized in that The method further comprises: Separate each original animation into first displacement information, key frames and an animation model excluding displacement information; According to the first displacement information and key frame of each original animation, respectively perform action fusion calculation on the combination of two or more original animations to obtain effective animation key frames, wherein the effective animation key frames include the second displacement information after the action fusion calculation; The calculating the target logical frame in the current game state according to the first time and the acquired game data comprises: The logical frame is calculated according to the acquired game data, the valid animation key frame and the first time calculation to obtain the target logical frame.

8. A game data processing device, characterized in that: The device comprises: A starting module, configured to start a target timer in response to the target game reaching a preset game process; A logic frame determination module, used to determine the target logic frame in the current game state according to the acquired game data; A position determination module, configured to determine a starting position of the animation to be played according to the target logical frame when the animation to be played is included in the target logical frame; A rendering module, used to render the animation to be played in the client presentation layer starting from the starting playback position; The logic frame determination module is further used to: obtain the value of the target timer as the first time, wherein the target timer is used to record the rendering duration of each presentation frame in the presentation layer; calculate the target logic frame in the current game state according to the first time and the acquired game data, wherein the target logic frame is at least one frame; The game data processing device also includes: a recording module, which is used to take the second time obtained by subtracting the total duration of the logical frames corresponding to the target logical frame from the first time as the value of the target timer, so as to continue recording the rendering duration of each presentation frame in the client presentation layer.

9. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processing device, the steps of the method described in any one of claims 1 to 7 are implemented.

10. An electronic device, characterized in that: include: a storage device having a computer program stored thereon; A processing device, configured to execute the computer program in the storage device to implement the steps of the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Key frame identification method and device

    CN107147947A

  • Smooth display method, terminal and computer storage medium

    CN111167116A

  • Video frame image testing method, device and equipment and computer storage medium

    CN112153374A

  • Game picture rendering method and device

    CN112206514A

  • System for example-based motion synthesis

    US9827496B1