WO2023197861A1 - 游戏数据处理方法、装置、介质及电子设备 - Google Patents

游戏数据处理方法、装置、介质及电子设备 Download PDF

Info

Publication number
WO2023197861A1
WO2023197861A1 PCT/CN2023/084544 CN2023084544W WO2023197861A1 WO 2023197861 A1 WO2023197861 A1 WO 2023197861A1 CN 2023084544 W CN2023084544 W CN 2023084544W WO 2023197861 A1 WO2023197861 A1 WO 2023197861A1
Authority
WO
WIPO (PCT)
Prior art keywords
animation
frame
target
played
logical frame
Prior art date
Application number
PCT/CN2023/084544
Other languages
English (en)
French (fr)
Inventor
郑甘泉
卢泰铼
Original Assignee
北京字跳网络技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京字跳网络技术有限公司 filed Critical 北京字跳网络技术有限公司
Publication of WO2023197861A1 publication Critical patent/WO2023197861A1/zh

Links

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/45Controlling the progress of the video game
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/45Controlling the progress of the video game
    • A63F13/48Starting a game, e.g. activating a game device or waiting for other players to join a multiplayer session
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/55Controlling game characters or game objects based on the game progress

Definitions

  • the present disclosure relates to the field of computer technology, and specifically, to a game data processing method, device, medium, electronic equipment, computer program product, and computer program.
  • the client logic layer needs to be used to calculate and determine the actions and position changes of each unit in the game in the presentation layer, that is, the actions and position changes in the scene that the user can see. Therefore, how to ensure that the rendering in the presentation layer It is important that unit actions and positions are consistent with the logic layer's calculations.
  • the present disclosure provides a game data processing method, which method includes: in response to the target game progressing to a preset game process, starting a target timer; and determining a target logical frame in the current game state based on the acquired game data. ;
  • the target logical frame includes the animation to be played, determine the starting playing position of the animation to be played according to the target logical frame; starting from the starting playing position, in the client presentation layer, the The animation to be played is rendered.
  • the present disclosure provides a game data processing device, which includes: a starting module configured to start a target timer in response to the target game progressing to a preset game process; and a logical frame determining module configured to obtain the The game data determines the target logical frame in the current game state; the position determination module is used to determine the starting play position of the animation to be played according to the target logical frame when the target logical frame includes the animation to be played; A rendering module, configured to render the animation to be played in the client presentation layer starting from the starting play position.
  • the present disclosure provides a computer-readable medium having a computer program stored thereon, which implements the steps of the method described in the above first aspect when executed by a processing device.
  • the present disclosure provides an electronic device, including: 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 above described in the first aspect. Method steps.
  • the present disclosure provides a computer program product, including a computer program that implements the steps of the method described in the above first aspect when executed by a processing device.
  • the present disclosure provides a computer program that, when executed by a processing device, implements the steps of the method described in the above first aspect.
  • Figure 1 is a flow chart of a game data processing method according to an exemplary embodiment of the present disclosure.
  • Figure 2 is a flowchart of a game data processing method according to yet another exemplary embodiment of the present disclosure.
  • FIG. 3 is a flowchart of a game data processing method according to yet another exemplary embodiment of the present disclosure.
  • Figure 4 is a flowchart of a game data processing method according to yet another exemplary embodiment of the present disclosure.
  • Figure 5 is a flowchart of a game data processing method according to yet another exemplary embodiment of the present disclosure.
  • Figure 6 is a structural block diagram of a game data processing device according to an exemplary embodiment of the present disclosure.
  • Figure 7 is a structural block diagram of a game data processing device according to yet another exemplary embodiment of the present disclosure.
  • FIG. 8 shows a schematic structural diagram of an electronic device suitable for implementing embodiments of the present disclosure.
  • the term “include” and its variations are open-ended, ie, “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”; and the term “some embodiments” means “at least some embodiments”. Relevant definitions of other terms will be given in the description below.
  • a prompt message is sent to the user to clearly remind the user that the operation requested will require the acquisition and use of the user's personal information. Therefore, users can autonomously choose whether to provide personal information to software or hardware such as electronic devices, applications, servers or storage media that perform the operations of the technical solution of the present disclosure based on the prompt information.
  • the method of sending prompt information to the user may be, for example, a pop-up window, and the prompt information may be presented in the form of text in the pop-up window.
  • the pop-up window can also contain a selection control for the user to choose "agree” or "disagree” to provide personal information to the electronic device.
  • Figure 1 is a flow chart of a game data processing method according to an exemplary embodiment of the present disclosure. As shown in Figure 1, the method includes steps 101 to 104.
  • a target timer is started.
  • the preset game process may be, for example, the game entering a specific combat mode, or any other game process that needs to ensure that the game interface animation is consistent with the user operation.
  • This target timer is used to record the rendering duration of each presentation frame in the presentation layer.
  • the target logical frame in the current game state is determined based on the acquired game data.
  • the game data may include, for example, game operations input by the user on the client, game operations input by other game players in the current game process with the user sent from the server to the client, game setting data related to the current game process, etc.
  • One or more of the game data, the specific content of the game data is not limited in this disclosure, as long as it is related to the animation rendering of the game screen, it can be used as the game data to determine the target logical frame.
  • the starting play 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 may be an animation corresponding to a character action triggered by a game operation input by a user on the client or another game player on another client.
  • the content of the animation to be played is not specifically limited in this disclosure.
  • the starting playback position may be any intermediate position during the playback of the animation to be played. For example, for an animation to be played with a duration of 1 second, the starting playback position may be the 0.9th second of the animation to be played.
  • step 104 starting from the starting play position, the animation to be played is rendered in the client presentation layer.
  • the presentation layer is a functional unit used to render the game screen for presentation to the user.
  • the presentation frame is the game screen that is rendered in the interface for presentation to the user.
  • Logical frames are data calculated by the logic layer and are used to represent the game.
  • the current state of the game that is, a combination of the game operations input by the user on his own client, the game operations input by other game players in the current game process with the user sent from the server to the client, and the game setting data related to the current game process.
  • the calculated states of each game character in the game should be in.
  • the presentation layer is driven by the logic layer and renders presentation frames based on the calculation results of the logic layer without affecting the logic.
  • the target logical frame of the target game in the current game state can be calculated according to the preset rules to ensure that the client can timely synchronize the user's game operations in the client and the server transmission Game actions input by other game players.
  • the presentation layer can also render presentation frames based on the logical frames calculated by the logic layer from the start of the target game to the preset game process, and present the game screen to the user in a timely manner.
  • each frame of the presentation layer will be refreshed according to the preset frame rate.
  • the user can also set the game refresh frame rate to 60Hz is equivalent to refreshing the rendering frame 60 times per second, that is, the rendering duration of each rendering frame is 1/60 second.
  • 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 logic layer will calculate the logical frame every 1/30 seconds.
  • the update of the logic layer depends on the actual rendering time of the presentation frame. Specifically, the logic layer can determine the update timing of the logic layer based on the actual rendering progress of the presentation layer, that is, the value in the target timer.
  • each frame At the end of the performance frame rendering, check whether the value in the target timer reaches the threshold for updating the logical frame. If it reaches the threshold, the logical frame will be updated.
  • the frame rate of a logical frame is 30Hz
  • the duration of a logical frame is 1/30 seconds, which means that a logical frame will not be updated until the value in the target timer reaches 1/30 seconds. Then, from The target timer starts timing the rendering duration when the first rendering frame starts rendering.
  • the target timer does not reaches 1/30 seconds, so continue to render the next performance frame, do not update the logical frame, and will not process the value in the target timer, but continue to time based on this value;
  • the rendering duration of a performance frame is 1/60, then after the rendering of the second performance frame ends, the value in the target timer reaches exactly 1/30, at which time the update to the next logical frame can be triggered, and after When an update of a logical frame is triggered, the frame duration corresponding to a logical frame will also be eliminated from the target timer. Therefore, the value in the target timer returns to 0, starting from the next performance frame, that is, the third The display frame starts to restart.
  • the time it takes for different devices to render the same performance frame will also vary, and each performance frame cannot be rendered according to the ideal frame rate.
  • the rendering duration of a presentation frame was originally expected to be 1/60 seconds, but due to device hardware reasons, it actually only took 1/65 seconds to complete the rendering and end the rendering, or, the rendering of a presentation frame Duration originally expected It is kept at 1/60 second, but due to device hardware reasons, it actually takes 1/5 second to complete the rendering of the performance frame. Therefore, in the actual game process, the same performance frame may require multiple logical frames. Rendering performance.
  • the presentation layer when the presentation layer renders the logical frames calculated based on the logic layer under ideal conditions, it is assumed that after character A in the game performs attack action 1, an interval of 30 logical frames (the animation duration of attack action 1) is required. 1 second), it is calculated that character B should be damaged in response to character A's attack action.
  • the rendering time of the previous performance frame reached 2 seconds, and the value in the target timer at this time is accumulated to 2 seconds, when the logical frame rate is 1/30, it will be determined that the accumulated 60 logical frames need to be updated in the next performance frame. As a result, there will be situations where the same presentation frame needs to render multiple logical frames.
  • the problems that this situation may cause that may affect the user experience may be, for example, if one of the 60 logical frames requires character A in the game data to perform the animation of attack action 1, and there will be an interval of 30 seconds thereafter.
  • Another logical frame of one logical frame requires character B in the game data to be damaged in response to character A's attack action 1. Both frames are included in the 60-frame logical frame, so the presentation layer may be in the current state at the same time.
  • the animation of character A performing the attack action 1 starts to be played, and at the same time, the damage caused by character B from the attack action 1 of character A is displayed. That is, in the same performance frame, the character When A just starts to perform the attack action, character B is already shown to have been damaged. Therefore, there will be a problem that the character's attack action has not yet started, but the damage caused by the attack has already occurred.
  • the starting play position of the animation to be played can be determined according to the target logical frame, and then Start rendering the animation to be played from the starting play position to avoid playing the animation to be played directly from the beginning. For example, if it is determined that the target logical frame obtained includes an animation to be played, such as the animation of attack action 1 that character A needs to perform, the starting play position of the animation to be played can be redetermined based on the target logical frame.
  • the animation will not be played from the beginning directly through the presentation layer, so that the starting point of the animation can be determined taking into account the specific status of the target logical frame, so that the character actions in the presentation layer are more consistent with the logical frame.
  • Calculation results For example, when the target logical frame number is more than one frame, the content of the animation to be played can be deleted according to the number of logical frames to ensure that the character action animation in the presentation layer is more consistent with the target logic.
  • the calculation result of the latest logical frame in the 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 this disclosure, as long as the character animation of the presentation layer can be made as close as possible
  • the calculation result of the latest logical frame in the target logical frame is sufficient.
  • the target logical frame in the current game state can be calculated based on all the acquired game data, and when the target logical frame includes animation to be played, Determine the starting position of the animation to be played based on the target logical frame, avoiding 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, making the animation to be played more consistent with the target
  • the calculation results of logical frames improve the animation performance of each game character in the presentation layer, thereby further improving the user's gaming experience.
  • FIG. 2 is a flowchart of a game data processing method according to an exemplary embodiment of the present disclosure. As shown in Figure 2, the method includes steps 201 to 203.
  • step 201 the value of a target timer is obtained as the first time, wherein the target timer is used to record the rendering duration of each presentation frame in the presentation layer.
  • 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.
  • step 203 the second time after subtracting the total duration of the logical frame corresponding to the target logical frame from the first time is used as the value of the target timer to continue recording each performance in the client presentation layer.
  • the rendering duration of the frame is used as the value of the target timer to continue recording each performance in the client presentation layer.
  • the value in the target timer may be zero; when the presentation layer After starting to execute the target logical frame, the target timer also starts to record the rendering time of the presentation frame in the presentation layer, and triggers the calculation of subsequent target logical frames according to the method in steps 201 to 203 in Figure 2 .
  • the method of calculating the target logical frame in the current game state according to the first time and the obtained game data may be: dividing the first time by the duration of a single logical frame and then taking the downward step. Integrate to obtain the frame number of the logical frame to be updated; calculate the logical frame according to the frame number of the logical frame to be updated to obtain the target logical frame, the frame number of the target logical frame is the frame number to be updated The frame number of logical frames. For example, if the rendering duration of a certain frame reaches 1/15 seconds, and the value in the target timer is 1/75 seconds before the rendering of the frame begins, then after the rendering of the rendering frame ends, , the value in the target timer is 6/75 seconds.
  • the first time After determining this value as the first time, 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, so the number of logical frames that need to be updated can be determined. is 2, then two logical frames can be updated. After obtaining the updated two target logical frames, subtract the logical frame duration corresponding to the two target logical frames, that is, 1/15, from the target timer, and then subtract the remaining value in the target timer. 1/75 is the second time in step 203.
  • Figure 3 is a flow chart of a game data processing method according to an exemplary embodiment of the present disclosure. As shown in Figure 3, the method further includes step 301.
  • step 301 that is, the target logical frame includes the animation to be played, and when the number of frames of the target logical frame is greater than a preset threshold, the animation to be played is determined according to the number of frames of the target logical frame.
  • the starting position of the animation For example, the animation content of the animation to be played can be deleted according to the frame number of the target logical frame through the above solution, so as to ensure that the character action animation in the presentation layer is more consistent with the latest one in the target logical frame.
  • the preset threshold may be 1.
  • FIG 4 is a flowchart of a game data processing method according to yet another exemplary embodiment of the present disclosure. As shown in Figure 4, the method also includes step 401 and step 402.
  • step 401 when the target logical frame includes an animation to be played, and the number of frames of the target logical frame is not greater than a preset threshold, the animation to be played after the second time is position as the starting playback position.
  • step 402 when the target logical frame includes an animation to be played, and the number of frames of the target logical frame is greater than a preset threshold, the start of the animation to be played is determined based on the number of frames of the target logical frame. Play the frame, and use the animation position reached after the second time from the start play frame of the animation to be played as the starting play position.
  • the method of determining the starting playback position of the animation to be played based on the target logical frame is determined only based on the number of frames of the target logical frame. It can also be determined based on the second time.
  • the number of frames of the target logical frame is not greater than the preset threshold, there is no need to modify the starting play frame of the animation to be played according to the number of frames of the target logical frame.
  • the second time is not Zero, that is, the value in the target timer is not zero.
  • the calculation result that actually represents the current target logical frame is not actually the character logic corresponding to the current time point, but the time point corresponding to the second time.
  • Character logic 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 overall duration of the animation to be played is subtracted from the target timer
  • the playback starts after the duration corresponding to the value, so that the character animation displayed in the presentation layer can be more fine-grained and consistent with the calculation results of the logic layer.
  • the starting play 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 animation to be played.
  • the starting playback frame is then adjusted in a more fine-grained manner to the adjusted animation to be played according to the second time, so that the purpose of making the character animation performance of the presentation layer more consistent with the calculation results of the logic layer can be achieved.
  • Figure 5 is a flowchart of a game data processing method according to yet another exemplary embodiment of the present disclosure. As shown in Figure 5, the method also includes steps 501 to 503.
  • each original animation is separated into first displacement information, key frames, and an animation model that does not include displacement information.
  • step 502 according to 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 effective animation key frames.
  • the effective animation key frames includes the second displacement information after the motion fusion calculation.
  • a logical frame is calculated based on the acquired game data, the effective animation key frame and the first time calculation to obtain the target logical frame.
  • the original animations corresponding to all characters in the game will be separated in advance 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 in each preset original animation.
  • motion fusion calculation is performed on a combination of two or more original animations based on the first displacement information and key frames obtained through separation.
  • the displacement information between the two motions needs to be coherently spliced or reasonably combined, the first displacement information corresponding to each motion in the different motion combinations needs to be re-confirmed.
  • the reconfirmed data information will be compared with the first displacement information and key frames corresponding to the original animation. If there is the same content, it will be filtered out as invalid information and the original animation correspondence will be used directly.
  • the first displacement information and key frame are used as the effective animation key frame, so as to save storage space as much as possible.
  • the client's logic layer can calculate the results of each logical frame based on the game data and the effective animation key frames of each animation obtained by the pre-processing, thereby determining each game in the game.
  • the character's actions and location After the logic layer calculates the position and action of each character through the calculated logical frame, the presentation layer can display the target animation of the character at the position calculated by the logic layer based on the above animation model that does not include displacement information.
  • Figure 6 is a structural block diagram of a game data processing device according to an exemplary embodiment of the present disclosure.
  • the device includes: a starting module 10, used to start the target timer in response to the target game progressing to the preset game process; a logical frame determination module 20, used to determine the current game according to the acquired game data The target logical frame in the state; the position determination module 30 is used to determine the starting play position of the animation to be played according to the target logical frame when the target logical frame includes the animation to be played; the rendering module 40 is used to Starting from the starting play position, the animation to be played is rendered in the client presentation layer.
  • the target logical frame in the current game state can be calculated based on all the acquired game data, and when the target logical frame includes animation to be played, Determine the starting position of the animation to be played based on the target logical frame, avoiding 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, making the animation to be played more consistent with the target
  • the calculation results of logical frames improve the animation performance of each game character in the presentation layer, thereby further improving the user's gaming experience.
  • Figure 7 is a structural block diagram of a game data processing device according to an exemplary embodiment of the present disclosure.
  • the logical frame determination module 20 is also configured 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. time; 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, Used to use 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 to continue recording the rendering of each presentation frame in the client presentation layer. duration.
  • the position determination module 30 is further configured to: when the frame number of the target logical frame is greater than a preset threshold, determine the to-be-played position according to the frame number of the target logical frame. The starting position of the animation.
  • the position determination module 30 is further configured to determine the starting play position of the animation to be played according to the second time.
  • the position determination module 30 is further configured to: when the number of frames of the target logical frame is not greater than a preset threshold, determine the position of the animation to be played after the second time.
  • the animation position is used as the starting playback position; when the frame number 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 frame number of the target logical frame, and based on the The animation position that the to-be-played animation reaches after the second time elapses from the starting playing frame is used as the starting playing position.
  • the logical frame determination module 20 is further configured to: divide the first time by the duration of a single logical frame and then round down to obtain the frame number of the logical frame to be updated; according to the The frame number of the logical frame to be updated is calculated on the logical frame to obtain the target logical frame, and the frame number of the target logical frame is the frame number of the logical frame to be updated.
  • the device further includes: a separation module (not shown), configured to separate each original animation into first displacement information, key frames, and an animation model that does not include displacement information; actions A fusion module (not shown), configured to perform motion fusion calculations on a combination of two or more original animations according to the first displacement information and key frames of each original animation to obtain effective animation key frames, so The effective animation key frame includes the second displacement information after the action fusion calculation; the logical frame determination module 20 is also used to: according to the obtained game The logical frame is calculated using the play data, the effective animation key frame and the first time calculation to obtain the target logical frame.
  • Terminal devices in the embodiments of the present disclosure may include, but are not limited to, mobile phones, notebook computers, digital broadcast receivers, PDA (Personal Digital Assistant, personal digital assistant), PAD (tablet computer), PMP (Portable Media Player, portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc.
  • PDA Personal Digital Assistant
  • PAD tablet computer
  • PMP Portable Media Player, portable multimedia players
  • vehicle-mounted terminals such as vehicle-mounted navigation terminals
  • fixed terminals such as digital TVs, desktop computers, etc.
  • the electronic device shown in FIG. 8 is only an example and should not impose any limitations on the functions and scope of use of the embodiments of the present disclosure.
  • the electronic device 800 may include a processing device (such as a central processing unit, a graphics processor, etc.) 801, which may process data according to a program stored in a read-only memory (Read Only Memory, ROM) 802 or from a storage device 808
  • the program loaded into the random access memory (Random Access Memory, RAM) 803 performs various appropriate actions and processes.
  • RAM 803 various programs and data required for the operation of the electronic device 800 are also stored.
  • the processing device 801, ROM 802 and RAM 803 are connected to each other via a bus 804.
  • An input/output (I/O) interface 805 is also connected to bus 804.
  • the following devices can be connected to the I/O interface 805: input devices 806 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, a Liquid Crystal Display (LCD) , an output device 807 such as a speaker, a vibrator, etc.; a storage device 808 including a magnetic tape, a hard disk, etc.; and a communication device 809.
  • the communication device 809 may allow the electronic device 800 to communicate wirelessly or wiredly with other devices to exchange data.
  • FIG. 8 illustrates an electronic device 800 having various means, it should be understood that implementation or availability of all illustrated means is not required. More or fewer means may alternatively be implemented or provided.
  • embodiments of the present disclosure include a computer program product including a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the method illustrated in the flowchart.
  • the computer program may be downloaded and installed from the network via communication device 809, or from storage device 808, or from ROM 802.
  • the processing device 801 the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.
  • the computer-readable medium mentioned above in the present disclosure 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 is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any combination thereof. More specific examples of computer readable storage media may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard drive, random access memory (RAM), read only memory (ROM), removable Programmd read-only memory (EPROM or flash memory), fiber optics, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code therein. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above.
  • a computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that may be sent, propagated, or transmitted for use by or in connection with an instruction execution system, apparatus, or device. Programs used in conjunction with it. Program code embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to: wire, optical cable, RF (radio frequency), etc., or any suitable combination of the above.
  • the client can communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol), and can communicate with digital data in any form or medium (for example, communication network) interconnection.
  • HTTP HyperText Transfer Protocol
  • Examples of communication networks include Local Area Networks (LANs), Wide Area Networks (WANs), the Internet (e.g., the Internet), and end-to-end networks (e.g., ad hoc end-to-end networks), as well as any current network for knowledge or future research and development.
  • the above-mentioned computer-readable medium may be included in the above-mentioned electronic device; it may also exist independently without being assembled into the electronic device.
  • the above-mentioned computer-readable medium carries one or more programs.
  • the electronic device responds to the target game progressing to the preset game process, starts the target timer; according to the acquisition
  • the obtained game data determines the target logical frame in the current game state; when the target logical frame includes the animation to be played, the starting play position of the animation to be played is determined according to the target logical frame; from the start Starting from the playback position, the animation to be played is rendered in the client presentation layer.
  • Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, including but not limited to object-oriented programming languages—such as Java, Smalltalk, C++, and Includes conventional procedural programming languages - such as "C" or similar programming languages.
  • the program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server.
  • the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (such as an Internet service provider). connected via the Internet).
  • LAN local area network
  • WAN wide area network
  • Internet service provider such as an Internet service provider
  • each block in the flowchart or block diagram may represent a module, segment, or portion of code that contains one or more logic functions that implement the specified executable instructions.
  • the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown one after another may actually execute substantially in parallel, or they may sometimes execute in the reverse order, depending on the functionality involved.
  • each block of the block diagram and/or flowchart illustration, and combinations of blocks in the block diagram and/or flowchart illustration can be implemented by special purpose hardware-based systems that perform the specified functions or operations. , or can be implemented using a combination of specialized hardware and computer instructions.
  • the modules involved in the embodiments of the present disclosure can be implemented in software or hardware.
  • the name of the module does not constitute a limitation on the module itself under certain circumstances.
  • the acquisition module can also be described as "after each frame of the presentation layer is rendered, obtain the value of the target timer as module for the first time”.
  • exemplary types of hardware logic components include: field programmable gate array (Field Programmable Gate Array, FPGA), application specific integrated circuit (Application Specific Integrated Circuit, ASIC), application specific standard product (Application Specific Standard Product (ASSP), system on chip (System on Chip (SOC), Complex Programmable Logic Device (CPLD), etc.
  • a machine-readable medium may be a tangible medium that may contain or store a program for use by or in connection with an instruction execution system, apparatus, or device.
  • the machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium.
  • Machine-readable media may include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any suitable combination of the foregoing.
  • machine-readable storage media would include one or more wire-based electrical connections, laptop disks, hard drives, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • RAM random access memory
  • ROM read only memory
  • EPROM or flash memory erasable programmable read only memory
  • CD-ROM portable compact disk read-only memory
  • magnetic storage device or any suitable combination of the above.
  • Example 1 provides a game data processing method.
  • the method includes: in response to the target game progressing to a preset game process, starting a target timer; and determining according to the acquired game data.
  • Example 2 provides the method of Example 1. Determining the target logical frame in the current game state according to 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 performance frame in the presentation layer; calculate the target logic in the current game state according to the first time and the obtained game data frame, the target logical frame is at least one frame; the method further includes: subtracting the second time from the first time by the total duration of the logical frame corresponding to the target logical frame as the value of the target timer , to continue recording the rendering duration of each presentation frame in the client presentation layer.
  • Example 3 when the target logical frame includes the animation to be played, determining the starting play position of the animation to be played according to the target logical frame includes: When the frame number of the target logical frame is greater than the preset threshold, the starting play position of the animation to be played is determined according to the frame number of the target logical frame.
  • Example 4 when the number of target logical frames is greater than a preset threshold, the start of the animation to be played is determined according to the number of target logical frames.
  • Example 5 when the target logical frame includes the animation to be played, determining the starting play position of the animation to be played according to the target logical frame further includes: The starting play position of the animation to be played is determined according to the second time.
  • determining the starting play position of the animation to be played according to the second time includes: when the number of frames in the target logical frame is not greater than a predetermined When a threshold is set, the animation position reached by the animation to be played after the second time is used as the starting play position; when the number of frames of the target logical frame is greater than the preset threshold, the animation position is determined according to the target logical frame.
  • the frame number of the frame determines the starting playback frame of the animation to be played, and the animation position reached after the second time passes from the starting playback frame to the animation position is used as the starting playback Location.
  • calculating the target logical frame in the current game state based on the first time and the acquired game data includes: converting the first time Divide by the duration of a single logical frame and then round down to obtain the frame number of the logical frame to be updated; calculate the logical frame according to the frame number of the logical frame to be updated to obtain the target logical frame.
  • the frame number of the logical frame is the frame number of the logical frame to be updated.
  • Example 8 the method further includes: separating each original animation into first displacement information, key frames, and an animation model that does not include displacement information; according to each original animation
  • the first displacement information and key frames are used to perform motion fusion calculation on the combination of two or more original animations to obtain effective animation key frames.
  • the effective animation key frames include the motion fusion calculation.
  • second displacement information; calculating the target logical frame in the current game state based on the first time and the obtained game data includes: based on the obtained game data, the effective animation key frame and The first time calculation calculates the logical frame to obtain the target logical frame.
  • Example 9 provides a game data processing device, the device includes: a starting module, configured to start a target timer in response to the target game progressing to a preset game process; a logical frame The determination module is used to determine the target logical frame in the current game state according to the acquired game data; the position determination module is used to determine the target logical frame to be played according to the target logical frame when the animation to be played is included in the target logical frame. The starting playback position of the played animation; the rendering module is used to render the animation to be played in the client presentation layer starting from the starting playback position.
  • Example 10 provides a computer-readable medium having a computer program stored thereon, and when the computer program is executed by a processing device, the method of any one of Examples 1-8 is implemented. step.
  • Example 11 provides an electronic device, including: a storage device having a computer program stored thereon; and a processing device configured to execute the computer program in the storage device, to Implement the steps of the method described in any of Examples 1-8.
  • Example 12 provides a computer program product, including a computer program that implements the steps of the method in any one of Examples 1-8 when executed by a processing device.
  • Example 13 provides a computer program that, when executed by a processing device, implements the steps of the method in any one of Examples 1-8.
  • the target logical frame in the current game state can be calculated based on all the acquired game data, and when the target logical frame includes animation to be played, Determine the starting position of the animation to be played based on the target logical frame, avoiding 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, making the animation to be played more consistent with the target
  • the calculation results of logical frames improve the animation performance of each game character in the presentation layer, thereby further improving the user's gaming experience.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Human Computer Interaction (AREA)
  • Processing Or Creating Images (AREA)

Abstract

本公开涉及一种游戏数据处理方法、装置、介质、电子设备、计算机程序产品以及计算机程序,包括:响应于目标游戏进行至预设游戏进程,启动目标计时器;根据获取到的游戏数据确定当前游戏状态下的目标逻辑帧;在目标逻辑帧中包括待播放动画时,根据目标逻辑帧确定待播放动画的起始播放位置;从起始播放位置开始,在客户端表现层中对待播放动画进行渲染。这样,能够根据表现帧中需要渲染的目标逻辑帧对待播放的动画进行起始播放位置的调整,避免直接对该待播放动画从头开始播放而导致的角色动作与游戏的当前逻辑状态不一致的问题,使得该待播放动画更匹配该目标逻辑帧的计算结果,提高表现层中各游戏角色的动画表现。

Description

游戏数据处理方法、装置、介质及电子设备
相关申请的交叉引用
本申请要求于2022年04月15日提交的申请号为202210399239.5、名称为“游戏数据处理方法、装置、介质及电子设备”的中国专利申请的优先权,此申请的内容通过引用并入本文。
技术领域
本公开涉及计算机技术领域,具体地,涉及一种游戏数据处理方法、装置、介质、电子设备、计算机程序产品及计算机程序。
背景技术
目前在多人游戏中,多个客户端之间的游戏同步是需要达到的必要目标,而实现多个客户端之间的游戏同步主要有两个技术方向,包括状态同步和帧同步。状态同步的方式常用于回合制游戏,其需要同步的数据量会根据需要同步的单位数量的增加而增加,因此在需要同步单位数量很多的游戏中并不实用,例如RTS(Real-Time Strategy,即时战略)游戏。帧同步是RTS(即时战略)游戏经常采用的一种同步技术,帧同步技术不同步状态,只同步操作。例如游戏中同步玩家的操作指令,操作指令包含当前的帧索引。
而采用帧同步技术的游戏中,需要通过客户端逻辑层来计算决定游戏中的各个单位在表现层,也即用户能够看到的场景中的动作和位置变化,因此如何保证表现层中渲染的单位动作和位置与逻辑层的计算结果保持一致十分重要。
发明内容
提供该发明内容部分以便以简要的形式介绍构思,这些构思将在后面的具体实施方式部分被详细描述。该发明内容部分并不旨在标识要求保护的技术方案的关键特征或必要特征,也不旨在用于限制所要求的保护的技术方案的范围。
第一方面,本公开提供一种游戏数据处理方法,所述方法包括:响应于目标游戏进行至预设游戏进程,启动目标计时器;根据获取到的游戏数据确定当前游戏状态下的目标逻辑帧;在所述目标逻辑帧中包括待播放动画时,根据所述目标逻辑帧确定所述待播放动画的起始播放位置;从所述起始播放位置开始,在客户端表现层中对所述待播放动画进行渲染。
第二方面,本公开提供一种游戏数据处理装置,所述装置包括:启动模块,用于响应于目标游戏进行至预设游戏进程,启动目标计时器;逻辑帧确定模块,用于根据获取到的游戏数据确定当前游戏状态下的目标逻辑帧;位置确定模块,用于在所述目标逻辑帧中包括待播放动画时,根据所述目标逻辑帧确定所述待播放动画的起始播放位置;渲染模块,用于从所述起始播放位置开始,在客户端表现层中对所述待播放动画进行渲染。
第三方面,本公开提供一种计算机可读介质,其上存储有计算机程序,该计算机程序被处理装置执行时实现以上第一方面中所述方法的步骤。
第四方面,本公开提供一种电子设备,包括:存储装置,其上存储有计算机程序;处理装置,用于执行所述存储装置中的所述计算机程序,以实现以上第一方面中所述方法的步骤。
第五方面,本公开提供一种计算机程序产品,包括计算机程序,计算机程序被处理装置执行时实现以上第一方面中所述方法的步骤。
第六方面,本公开提供一种计算机程序,计算机程序被处理装置执行时实现以上第一方面中所述方法的步骤。
本公开的其他特征和优点将在随后的具体实施方式部分予以详细说明。
附图说明
结合附图并参考以下具体实施方式,本公开各实施例的上述和其他特征、优点及方面将变得更加明显。贯穿附图中,相同或相似的附图标记表示相同或相似的元素。应当理解附图是示意性的,原件和元素不一定按照比例绘制。在附图中:
图1是根据本公开一示例性实施例示出的一种游戏数据处理方法的流程图。
图2是根据本公开又一示例性实施例示出的一种游戏数据处理方法的流程图。
图3是根据本公开又一示例性实施例示出的一种游戏数据处理方法的流程图。
图4是根据本公开又一示例性实施例示出的一种游戏数据处理方法的流程图。
图5是根据本公开又一示例性实施例示出的一种游戏数据处理方法的流程图。
图6是根据本公开一示例性实施例示出的一种游戏数据处理装置的结构框图。
图7是根据本公开又一示例性实施例示出的一种游戏数据处理装置的结构框图。
图8示出了适于用来实现本公开实施例的电子设备的结构示意图。
具体实施方式
下面将参照附图更详细地描述本公开的实施例。虽然附图中显示了本公开的某些实施例,然而应当理解的是,本公开可以通过各种形式来实现,而且不应该被解释为限于这里阐述的实施例,相反提供这些实施例是为了更加透彻和完整地理解本公开。应当理解的是,本公开的附图及实施例仅用于示例性作用,并非用于限制本公开的保护范围。
应当理解,本公开的方法实施方式中记载的各个步骤可以按照不同的顺序执行,和/或并行执行。此外,方法实施方式可以包括附加的步骤和/或省略执行示出的步骤。本公开的范围在此方面不受限制。
本文使用的术语“包括”及其变形是开放性包括,即“包括但不限于”。术语“基于”是“至少部分地基于”。术语“一个实施例”表示“至少一个实施例”;术语“另一实施例”表示“至少一个另外的实施例”;术语“一些实施例”表示“至少一些实施例”。其他术语的相关定义将在下文描述中给出。
需要注意,本公开中提及的“第一”、“第二”等概念仅用于对不同的装置、模块或单元进行区分,并非用于限定这些装置、模块或单元所执行的功能的顺序或者相互依存关系。
需要注意,本公开中提及的“一个”、“多个”的修饰是示意性而非限制性的,本领域技术人员应当理解,除非在上下文另有明确指出,否则应该理解为“一个或多个”。
本公开实施方式中的多个装置之间所交互的消息或者信息的名称仅用于说明性的目的,而并不是用于对这些消息或信息的范围进行限制。
可以理解的是,在使用本公开各实施例公开的技术方案之前,均应当依据相关法律法规通过恰当的方式对本公开所涉及个人信息的类型、使用范围、使用场景等告知用户并获得用户的授权。
例如,在响应于接收到用户的主动请求时,向用户发送提示信息,以明确地提示用户,其请求执行的操作将需要获取和使用到用户的个人信息。从而,使得用户可以根据提示信息来自主地选择是否向执行本公开技术方案的操作的电子设备、应用程序、服务器或存储介质等软件或硬件提供个人信息。
作为一种可选的但非限定性的实现方式,响应于接收到用户的主动请求,向用户发送提示信息的方式例如可以是弹窗的方式,弹窗中可以以文字的方式呈现提示信息。此外,弹窗中还可以承载供用户选择“同意”或者“不同意”向电子设备提供个人信息的选择控件。
可以理解的是,上述通知和获取用户授权过程仅是示意性的,不对本公开的实现方式构成限定,其它满足相关法律法规的方式也可应用于本公开的实现方式中。
同时,可以理解的是,本技术方案所涉及的数据(包括但不限于数据本身、数据的获取或使用)应当遵循相应法律法规及相关规定的要求。
图1是根据本公开一示例性实施例示出的一种游戏数据处理方法的流程图。如图1所示,所述方法包括步骤101至步骤104。
在步骤101中,响应于目标游戏进行至预设游戏进程,启动目标计时器。该预设游戏进程可以是例如游戏进入特定战斗模式,或者任意其他需要保证游戏界面动画和用户操作一致的游戏进程。该目标计时器用于记录表现层中各表现帧的渲染持续时间。
在步骤102中,根据获取到的游戏数据确定当前游戏状态下的目标逻辑帧。该游戏数据可以包括例如用户在客户端输入的游戏操作、由服务器发送至客户端的与用户同在当前游戏进程中的其他游戏玩家输入的游戏操作、与当前游戏进程相关的游戏设定数据等中的一者或多者,在本公开中对该游戏数据的具体内容不进行限定,只要是与游戏画面的动画渲染有关的游戏数据都可以作为确定该目标逻辑帧的游戏数据。
在步骤103中,所述目标逻辑帧中包括待播放动画时,根据所述目标逻辑帧确定所述待播放动画的起始播放位置。该待播放动画时长可以是例如1秒或2秒等任意预设时长。该待播放动画可以是针对用户在客户端或其他游戏玩家在其他客户端输入的游戏操作所触发的角色动作对应的动画,本公开中对该待播放动画的内容不进行具体限定。该起始播放位置可以是该待播放动画的播放过程中中任意一个中间位置,例如,一个时长为1秒的待播放动画,该起始播放位置可以是该待播放动画的第0.9秒。
在步骤104中,从所述起始播放位置开始,在客户端表现层中对所述待播放动画进行渲染。
在本公开中,表现层为用于渲染游戏画面以展示给用户的功能部,该表现帧即会被渲染在界面中以展示给用户的游戏画面。逻辑帧是逻辑层计算得到的数据,用于表征游 戏当前状态,也即综合用户在自身客户端输入的游戏操作、由服务器发送至客户端的与用户同在当前游戏进程中的其他游戏玩家输入的游戏操作、与当前游戏进程相关的游戏设定数据等计算出来的游戏中各游戏角色等分别应当所处的状态。表现层受逻辑层驱动,在不影响逻辑的前提下,根据逻辑层的计算结果来渲染表现帧。
从该目标游戏进行至该预设游戏进程开始,便可以按照预设规则计算该目标游戏在当前游戏状态下的目标逻辑帧,以保证客户端能够及时同步客户端中用户的游戏操作和服务器发送的其他游戏玩家输入的游戏操作。相应的,表现层也可以在从该目标游戏进行至该预设游戏进程开始,根据逻辑层计算得到的逻辑帧来进行表现帧的渲染,及时将游戏画面呈现给用户。
在常规的帧同步方案中,仅能保证逻辑层在逻辑上的准确,由于表现帧渲染时间受硬件因素影响,并不能保证每一帧的渲染时长,因此并没有很好的方法能够保证表现层能够将逻辑层计算得到的所有逻辑帧完美地渲染在界面中,并保证用户的游戏体验。例如,可能出现需要在某一个表现帧中执行计算得到的多个逻辑帧的情况,或者也可能出现某一个表现帧不执行任何逻辑帧的情况,所以即使是在网络环境良好的情况下,也容易出现非常明显的界面中正显示的角色动作画面与逻辑层计算得到的逻辑帧无法匹配的问题,例如角色攻击动作还没开始在界面上播放,但是该角色攻击动作对应的伤害就已经在其他的显示界面中表示出来了。
下面会对出现上述问题的过程进行详细的示例说明。
在理想状态下,该表现层的每一帧表现帧会按照预设的帧率进行刷新,例如,在常规的游戏设备能满足60Hz帧率的情况下,用户可以将游戏刷新帧率也设置为60Hz,相当于每秒刷新60次表现帧,也即每一帧表现帧的渲染持续时长为1/60秒。逻辑帧也会按照预设的帧率来进行计算,例如,逻辑帧的帧率为30Hz,则逻辑层每1/30秒会进行一次逻辑帧的计算。但逻辑层的更新依赖于表现帧的实际渲染时长,具体的,逻辑层可以根据表现层的实际渲染进度,也即该目标计时器中的值,来决定逻辑层的更新时机,在每一帧表现帧渲染结束时检查该目标计时器中的值是否达到更新逻辑帧的阈值,在达到的情况下便进行逻辑帧的更新。例如,逻辑帧的帧率为30Hz,逻辑帧时长即为1/30秒,相当于在该目标计时器中的值达到1/30秒之后,才会进行一帧逻辑帧的更新,则,从第一个表现帧开始渲染时该目标计时器便开始对渲染持续时长进行计时,若第一个表现帧渲染持续时长为1/60,在第一个表现帧渲染结束之后,目标计时器并未达到1/30秒,因此继续对下一帧表现帧进行渲染,不进行逻辑帧的更新,也不会对目标计时器中的值进行处理,而是在该值的基础上继续计时;第二个表现帧渲染持续时长若为1/60,则在第二个表现帧渲染结束之后,目标计时器中的值正好达到1/30,此时便可触发对下一个逻辑帧的更新,而在触发了一帧逻辑帧的更新时,目标计时器中也会相应消除一帧逻辑帧对应的帧时长,从而,目标计时器中的值又回到0,从下一个表现帧,也即第三个表现帧开始重新计时。
但是,由于不同设备硬件能力不同的原因,不同设备对同一帧表现帧进行渲染时所需耗费的时长也会出现差异,并不能按照理想状态中的帧率来对每一帧表现帧进行渲染。例如,对一帧表现帧的渲染持续时长原本预计为1/60秒,但由于设备硬件原因实际仅花费了1/65秒便完成了渲染并结束了渲染,或者,对一帧表现帧的渲染持续时长原本预计 保持在1/60秒,但由于设备硬件原因实际花费了1/5秒才完成对该表现帧的渲染,因此,在实际的游戏进程中,可能出现同一个表现帧需要对多个逻辑帧进行渲染表现的情况。例如,表现层在理想状态下对根据逻辑层计算得到的逻辑帧进行渲染时,假设在计算到游戏中的角色A做出攻击动作1之后,需要间隔30个逻辑帧(攻击动作1的动画时长1秒)后计算得到角色B应该响应于该角色A的攻击动作而受到伤害,而此时,由于前一表现帧渲染时长达到了2秒,且此时该目标计时器中的值为累积到了2秒,则在逻辑帧帧率为1/30的情况下会判定需要在下一帧表现帧中更新累计60帧逻辑帧。由此,便会出现同一个表现帧需要对多个逻辑帧进行渲染表现的情况。进一步的,此情况所可能带来的影响用户体验的问题可能为例如,若该60帧逻辑帧中,其中一帧要求游戏数据中的角色A执行该攻击动作1的动画,在其后间隔30帧逻辑帧的另一帧逻辑帧要求游戏数据中的角色B响应于角色A的攻击动作1而受到伤害,这两帧都包括在了该60帧逻辑帧中,则表现层便可能同时在当前的表现帧中开始播放角色A执行该攻击动作1的动画,并同时将角色B受到来自该角色A的攻击动作1所带来的伤害所表现出来,也即,在同一帧表现帧中,角色A刚开始执行该攻击动作时角色B便已经显示受到伤害,从而,便会产生角色攻击动作还没开始,但攻击带来的伤害就已经出现的问题。
而在本实施例中,能够在确定得到该目标逻辑帧中,且确定该目标阿逻辑帧中包括待播放动画时,根据所述目标逻辑帧确定所述待播放动画的起始播放位置,然后从该起始播放位置开始对该待播放动画进行渲染,避免直接对该待播放动画从头开始播放。例如,若判定确定得到的目标逻辑帧中包括待播放动画,例如上述角色A需要执行的攻击动作1的动画时,可以根据该目标逻辑帧来对该待播放动画进行起始播放位置的重新确定,不会直接通过表现层将该动画从头开始播放,从而就能够在考虑到该目标逻辑帧的具体状态的情况下来决定该动画的播放起点,以使得表现层中的角色动作更加符合逻辑帧的计算结果。例如,在该目标逻辑帧帧数不止一帧的情况下,可以根据该逻辑帧的帧数来删减该待播放动画的内容,以尽可能保证表现层中的角色动作动画更符合该目标逻辑帧中的最近一帧逻辑帧的计算结果等,在本公开中不限定根据该目标逻辑帧确定该待播放动画的播放起止位置的具体方式,只要能够尽可能令该表现层的角色动画更贴近该目标逻辑帧中最近一帧逻辑帧的计算结果即可。
通过上述技术方案,能够在目标游戏进行至预设游戏进程之后,能够根据获取到的所有游戏数据来计算当前游戏状态下的目标逻辑帧,并且在目标逻辑帧中包括待播放动画的情况下,根据该目标逻辑帧来确定待播放动画的起始播放位置,避免直接对该待播放动画从头开始播放而导致的角色动作与游戏的当前逻辑状态不一致的问题,使得该待播放动画更匹配该目标逻辑帧的计算结果,提高表现层中各游戏角色的动画表现,从而进一步提高了有用户的游戏体验。
图2是根据本公开一示例性实施例示出的一种游戏数据处理方法的流程图。如图2所示,所述方法包括步骤201至步骤203。
在步骤201中,获取目标计时器的值作为第一时间,其中,所述目标计时器用于记录所述表现层中各表现帧的渲染持续时间。
在步骤202中,根据所述第一时间和所述获取到的游戏数据计算所述当前游戏状态下的所述目标逻辑帧,所述目标逻辑帧为至少一帧。
在步骤203中,将所述第一时间减去所述目标逻辑帧对应的逻辑帧总时长之后的第二时间作为所述目标计时器的值,以继续记录所述客户端表现层中各表现帧的渲染持续时间。
在目标游戏进行至该预设游戏进程之后,响应于目标游戏进行至该预设游戏进程而第一次进行该目标逻辑帧的计算时,该目标计时器中的值可以是零;当表现层开始执行该目标逻辑帧之后,该目标计时器也相应开始记录表现层中表现帧的渲染时长,并根据如图2中的步骤201至步骤203中的方法来触发后续目标逻辑帧的计算。
其中,根据所述第一时间和所述获取到的游戏数据计算所述当前游戏状态下的所述目标逻辑帧的方法可以为:将所述第一时间除以单个逻辑帧时长后向下取整以得到待更新逻辑帧的帧数;根据所述待更新逻辑帧的帧数对所述逻辑帧进行计算,以得到所述目标逻辑帧,所述目标逻辑帧的帧数为所述待更新逻辑帧的帧数。例如,若由于某一帧表现帧渲染持续时长达到1/15秒,并且在该帧表现帧开始渲染之前,该目标计时器中的值为1/75秒,则在该帧表现帧渲染结束之后,目标计时器中的值为6/75秒。将该值确定为第一时间后,由于可以判定该第一时间已经经过了两帧逻辑帧的帧时长,但又不到三帧逻辑帧的帧时长,因此可以确定需要更新的逻辑帧帧数为2,继而便可以对两帧逻辑帧进行更新。在得到更新后的两帧目标逻辑帧之后,将两帧目标逻辑帧对应的逻辑帧时长,也即1/15,从该目标计时器中减去,减去之后该目标计时器中剩余的值1/75即为步骤203中的第二时间。
图3是根据本公开一示例性实施例示出的一种游戏数据处理方法的流程图。如图3所示,所述方法还包括步骤301。
在步骤301中,也即在所述目标逻辑帧中包括待播放动画,且在所述目标逻辑帧的帧数大于预设阈值时,根据所述目标逻辑帧的帧数来确定所述的待播放动画的起始播放位置。例如,可以通过如上所述的方案,根据该目标逻辑帧的帧数来删减该待播放动画的动画内容,以尽可能保证表现层中的角色动作动画更符合该目标逻辑帧中的最近一帧逻辑帧的计算结果。在本公开中,该预设阈值可以为1。
具体的,在一种可能的实施方式中,通过该目标逻辑帧的帧数来确定所述待播放动画的起始播放位置的方式可以为:将所述待播放动画的第M帧作为所述待播放动画的起始播放位置,其中,M=N-1,N为所述目标逻辑帧的帧数。
图4是根据本公开又一示例性实施例示出的一种游戏数据处理方法的流程图。如图4所示,所述方法还包括步骤401和步骤402。
在步骤401中,在所述目标逻辑帧中包括待播放动画,且所述目标逻辑帧的帧数不大于预设阈值时,将所述待播放动画经过所述第二时间之后所到达的动画位置作为所述起始播放位置。
在步骤402中,在所述目标逻辑帧中包括待播放动画,且所述目标逻辑帧的帧数大于预设阈值时,根据所述目标逻辑帧的帧数确定所述待播放动画的起始播放帧,并根据将所述待播放动画从所述起始播放帧开始经过所述第二时间之后所到达的动画位置作为所述起始播放位置。
也即,在所述目标逻辑帧中包括待播放动画时,根据所述目标逻辑帧确定所述待播放动画的起始播放位置的方法除了仅根据该目标逻辑帧的帧数来确定之外,还可以根据所述第二时间来确定。
例如,在该目标逻辑帧的帧数不大于预设阈值的情况下,无需根据该目标逻辑帧的帧数来修改该待播放动画的起始播放帧,但若此时该第二时间不为零,也即该目标计时器中的值不为零,实际表征当前目标逻辑帧的计算结果实际并不是当前时间点所对应的角色逻辑,而是在该第二时间之前的时间点所对应的角色逻辑,因此,便可以将该目标计时器中的值也即该第二时间作为该待播放动画已经走过的渲染持续时间,将该待播放动画的整体时长中减去该目标计时器中的值对应的时长后开始播放,从而便可以使得表现层中表现出来的角色动画更细粒度地符合逻辑层的计算结果。
而在目标逻辑帧的帧数大于预设阈值的情况下,可以先根据该目标逻辑帧的帧数来对该待播放动画进行帧级别粒度的起始播放位置的调整,以得到该待播放动画的起始播放帧,进而在根据该第二时间对调整后的待播放动画进行更细粒度的调整,从而也能够实现使得该表现层的角色动画表现更符合逻辑层计算结果的目的。
图5是根据本公开又一示例性实施例示出的一种游戏数据处理方法的流程图。如图5所示,所述方法还包括步骤501至步骤503。
在步骤501中,将每个原始动画分别分离为第一位移信息、关键帧与不包括位移信息的动画模型。
在步骤502中,根据每个原始动画的所述第一位移信息和关键帧,分别对两个或多个原始动画的组合进行动作融合计算,以得到有效动画关键帧,所述有效动画关键帧中包括经过所述动作融合计算后的第二位移信息。
在步骤503中,根据获取到的游戏数据、所述有效动画关键帧和所述第一时间计算对逻辑帧进行计算,以得到所述目标逻辑帧。
由于客户端逻辑层无法对多个动画之间的动作进行融合优化,因此本公开中会预先将游戏中所有的角色所对应的原始动画都进行如步骤501中所示的分离操作。其中的第一位移信息为该原始动画中在每一帧中所包括的所有位移信息,关键帧为预先设定好的各个原始动画中最为关键的一帧或多帧。进而会如步骤502中所示,根据分离得到该第一位移信息和关键帧来对两个或多个原始动画的组合进行动作融合计算。其中,在动作融合计算的过程中,会因为需要将两个动作之间的位移信息连贯拼接或合理组合,需要对不同该动作组合中的各个动作分别对应的该第一位移信息进行重新确认。在进行重新确认之后,会将重新确认得到的数据信息与该原始动画对应的第一位移信息和关键帧进行比较,若有相同内容则会将其作为无效信息而滤除,直接使用原始动画对应的该第一位移信息和关键帧来作为该有效动画关键帧,以此来尽可能节省存储空间。
经过预先的动作融合处理,在游戏应用运行过程中,客户端的逻辑层则可以根据游戏数据和该预先处理得到的各个动画的有效动画关键帧来计算各个逻辑帧的结果,从而确定游戏中各游戏角色的动作以及所处位置。逻辑层通过计算得到的逻辑帧将各角色位置和动作计算得到之后,表现层则可以根据上述不包括位移信息的动画模型将角色在逻辑层计算得到的位置上将目标动画表现出来。
图6是根据本公开一示例性实施例示出的一种游戏数据处理装置的结构框图。如图6所示,所述装置包括:启动模块10,用于响应于目标游戏进行至预设游戏进程,启动目标计时器;逻辑帧确定模块20,用于根据获取到的游戏数据确定当前游戏状态下的目标逻辑帧;位置确定模块30,用于在所述目标逻辑帧中包括待播放动画时,根据所述目标逻辑帧确定所述待播放动画的起始播放位置;渲染模块40,用于从所述起始播放位置开始,在客户端表现层中对所述待播放动画进行渲染。
通过上述技术方案,能够在目标游戏进行至预设游戏进程之后,能够根据获取到的所有游戏数据来计算当前游戏状态下的目标逻辑帧,并且在目标逻辑帧中包括待播放动画的情况下,根据该目标逻辑帧来确定待播放动画的起始播放位置,避免直接对该待播放动画从头开始播放而导致的角色动作与游戏的当前逻辑状态不一致的问题,使得该待播放动画更匹配该目标逻辑帧的计算结果,提高表现层中各游戏角色的动画表现,从而进一步提高了有用户的游戏体验。
图7是根据本公开一示例性实施例示出的一种游戏数据处理装置的结构框图。如图7所示,所述逻辑帧确定模块20还用于:获取所述目标计时器的值作为第一时间,其中,所述目标计时器用于记录所述表现层中各表现帧的渲染持续时间;根据所述第一时间和所述获取到的游戏数据计算所述当前游戏状态下的所述目标逻辑帧,所述目标逻辑帧为至少一帧;所述装置还包括:记录模块50,用于将所述第一时间减去所述目标逻辑帧对应的逻辑帧总时长之后的第二时间作为所述目标计时器的值,以继续记录所述客户端表现层中各表现帧的渲染持续时间。
在一种可能的实施方式中,所述位置确定模块30还用于:在所述目标逻辑帧的帧数大于预设阈值时,根据所述目标逻辑帧的帧数来确定所述的待播放动画的起始播放位置。
在一种可能的实施方式中,所述位置确定模块30还用于:将所述待播放动画的第M帧作为所述待播放动画的起始播放位置,其中,M=N-1,N为所述目标逻辑帧的帧数。
在一种可能的实施方式中,所述位置确定模块30还用于:根据所述第二时间来确定所述的待播放动画的起始播放位置。
在一种可能的实施方式中,所述位置确定模块30还用于:在所述目标逻辑帧的帧数不大于预设阈值时,将所述待播放动画经过所述第二时间之后所到达的动画位置作为所述起始播放位置;在所述目标逻辑帧的帧数大于预设阈值时,根据所述目标逻辑帧的帧数确定所述待播放动画的起始播放帧,并根据将所述待播放动画从所述起始播放帧开始经过所述第二时间之后所到达的动画位置作为所述起始播放位置。
在一种可能的实施方式中,所述逻辑帧确定模块20还用于:将所述第一时间除以单个逻辑帧时长后向下取整以得到待更新逻辑帧的帧数;根据所述待更新逻辑帧的帧数对所述逻辑帧进行计算,以得到所述目标逻辑帧,所述目标逻辑帧的帧数为所述待更新逻辑帧的帧数。
在一种可能的实施方式中,所述装置还包括:分离模块(未示出),用于将每个原始动画分别分离为第一位移信息、关键帧与不包括位移信息的动画模型;动作融合模块(未示出),用于根据每个原始动画的所述第一位移信息和关键帧,分别对两个或多个原始动画的组合进行动作融合计算,以得到有效动画关键帧,所述有效动画关键帧中包括经过所述动作融合计算后的第二位移信息;所述逻辑帧确定模块20还用于:根据获取到的游 戏数据、所述有效动画关键帧和所述第一时间计算对逻辑帧进行计算,以得到所述目标逻辑帧。
下面参考图8,其示出了适于用来实现本公开实施例的电子设备800的结构示意图。本公开实施例中的终端设备可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、PDA(Personal Digital Assistant,个人数字助理)、PAD(平板电脑)、PMP(Portable Media Player,便携式多媒体播放器)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。图8示出的电子设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。
如图8所示,电子设备800可以包括处理装置(例如中央处理器、图形处理器等)801,其可以根据存储在只读存储器(Read Only Memory,ROM)802中的程序或者从存储装置808加载到随机访问存储器(Random Access Memory,RAM)803中的程序而执行各种适当的动作和处理。在RAM 803中,还存储有电子设备800操作所需的各种程序和数据。处理装置801、ROM 802以及RAM 803通过总线804彼此相连。输入/输出(I/O)接口805也连接至总线804。
通常,以下装置可以连接至I/O接口805:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置806;包括例如液晶显示器(Liquid Crystal Display,LCD)、扬声器、振动器等的输出装置807;包括例如磁带、硬盘等的存储装置808;以及通信装置809。通信装置809可以允许电子设备800与其他设备进行无线或有线通信以交换数据。虽然图8示出了具有各种装置的电子设备800,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在非暂态计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置809从网络上被下载和安装,或者从存储装置808被安装,或者从ROM 802被安装。在该计算机程序被处理装置801执行时,执行本公开实施例的方法中限定的上述功能。
需要说明的是,本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与 其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。
在一些实施方式中,客户端可以利用诸如HTTP(HyperText Transfer Protocol,超文本传输协议)之类的任何当前已知或未来研发的网络协议进行通信,并且可以与任意形式或介质的数字数据通信(例如,通信网络)互连。通信网络的示例包括局域网(Local Area Network,LAN),广域网(Wide Area Network,WAN),网际网(例如,互联网)以及端对端网络(例如,ad hoc端对端网络),以及任何当前已知或未来研发的网络。
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备:响应于目标游戏进行至预设游戏进程,启动目标计时器;根据获取到的游戏数据确定当前游戏状态下的目标逻辑帧;在所述目标逻辑帧中包括待播放动画时,根据所述目标逻辑帧确定所述待播放动画的起始播放位置;从所述起始播放位置开始,在客户端表现层中对所述待播放动画进行渲染。
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括但不限于面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言——诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)——连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
描述于本公开实施例中所涉及到的模块可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,模块的名称在某种情况下并不构成对该模块本身的限定,例如,获取模块还可以被描述为“在表现层的每一帧表现帧渲染结束后,获取目标计时器的值作为第一时间的模块”。
本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(Field Programmable Gate Array,FPGA)、专用集成电路(Application Specific Integrated Circuit,ASIC)、专用标准产品(Application Specific Standard Product,ASSP)、片上系统(System  on Chip,SOC)、复杂可编程逻辑设备(Complex Programmable Logic Device,CPLD)等等。
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。
根据本公开的一个或多个实施例,示例1提供了一种游戏数据处理方法,所述方法包括:响应于目标游戏进行至预设游戏进程,启动目标计时器;根据获取到的游戏数据确定当前游戏状态下的目标逻辑帧;在所述目标逻辑帧中包括待播放动画时,根据所述目标逻辑帧确定所述待播放动画的起始播放位置;从所述起始播放位置开始,在客户端表现层中对所述待播放动画进行渲染。
根据本公开的一个或多个实施例,示例2提供了示例1的方法,所述根据获取到的游戏数据确定当前游戏状态下的目标逻辑帧包括:获取所述目标计时器的值作为第一时间,其中,所述目标计时器用于记录所述表现层中各表现帧的渲染持续时间;根据所述第一时间和所述获取到的游戏数据计算所述当前游戏状态下的所述目标逻辑帧,所述目标逻辑帧为至少一帧;所述方法还包括:将所述第一时间减去所述目标逻辑帧对应的逻辑帧总时长之后的第二时间作为所述目标计时器的值,以继续记录所述客户端表现层中各表现帧的渲染持续时间。
根据本公开的一个或多个实施例,示例3中,所述在所述目标逻辑帧中包括待播放动画时,根据所述目标逻辑帧确定所述待播放动画的起始播放位置包括:在所述目标逻辑帧的帧数大于预设阈值时,根据所述目标逻辑帧的帧数来确定所述的待播放动画的起始播放位置。
根据本公开的一个或多个实施例,示例4中,所述在所述目标逻辑帧帧数大于预设阈值时,根据所述目标逻辑帧的数量来确定所述的待播放动画的起始播放位置包括:将所述待播放动画的第M帧作为所述待播放动画的起始播放位置,其中,M=N-1,N为所述目标逻辑帧的帧数。
根据本公开的一个或多个实施例,示例5中,所述在所述目标逻辑帧中包括待播放动画时,根据所述目标逻辑帧确定所述待播放动画的起始播放位置还包括:根据所述第二时间来确定所述的待播放动画的起始播放位置。
根据本公开的一个或多个实施例,示例6中,所述根据所述第二时间来确定所述的待播放动画的起始播放位置包括:在所述目标逻辑帧的帧数不大于预设阈值时,将所述待播放动画经过所述第二时间之后所到达的动画位置作为所述起始播放位置;在所述目标逻辑帧的帧数大于预设阈值时,根据所述目标逻辑帧的帧数确定所述待播放动画的起始播放帧,并根据将所述待播放动画从所述起始播放帧开始经过所述第二时间之后所到达的动画位置作为所述起始播放位置。
根据本公开的一个或多个实施例,示例7中,根据所述第一时间和所述获取到的游戏数据计算所述当前游戏状态下的所述目标逻辑帧包括:将所述第一时间除以单个逻辑帧时长后向下取整以得到待更新逻辑帧的帧数;根据所述待更新逻辑帧的帧数对所述逻辑帧进行计算,以得到所述目标逻辑帧,所述目标逻辑帧的帧数为所述待更新逻辑帧的帧数。
根据本公开的一个或多个实施例,示例8中,所述方法还包括:将每个原始动画分别分离为第一位移信息、关键帧与不包括位移信息的动画模型;根据每个原始动画的所述第一位移信息和关键帧,分别对两个或多个原始动画的组合进行动作融合计算,以得到有效动画关键帧,所述有效动画关键帧中包括经过所述动作融合计算后的第二位移信息;所述根据所述第一时间和所述获取到的游戏数据计算所述当前游戏状态下的所述目标逻辑帧包括:根据获取到的游戏数据、所述有效动画关键帧和所述第一时间计算对逻辑帧进行计算,以得到所述目标逻辑帧。
根据本公开的一个或多个实施例,示例9提供了一种游戏数据处理装置,所述装置包括:启动模块,用于响应于目标游戏进行至预设游戏进程,启动目标计时器;逻辑帧确定模块,用于根据获取到的游戏数据确定当前游戏状态下的目标逻辑帧;位置确定模块,用于在所述目标逻辑帧中包括待播放动画时,根据所述目标逻辑帧确定所述待播放动画的起始播放位置;渲染模块,用于从所述起始播放位置开始,在客户端表现层中对所述待播放动画进行渲染。
根据本公开的一个或多个实施例,示例10提供了一种计算机可读介质,其上存储有计算机程序,该计算机程序被处理装置执行时实现示例1-8中任一项所述方法的步骤。
根据本公开的一个或多个实施例,示例11提供了一种电子设备,包括:存储装置,其上存储有计算机程序;处理装置,用于执行所述存储装置中的所述计算机程序,以实现示例1-8中任一项所述方法的步骤。
根据本公开的一个或多个实施例,示例12提供了一种计算机程序产品,包括计算机程序,计算机程序被处理装置执行时实现示例1-8中任一项所述方法的步骤。
根据本公开的一个或多个实施例,示例13提供了一种计算机程序,计算机程序被处理装置执行时实现示例1-8中任一项所述方法的步骤。
通过上述技术方案,能够在目标游戏进行至预设游戏进程之后,能够根据获取到的所有游戏数据来计算当前游戏状态下的目标逻辑帧,并且在目标逻辑帧中包括待播放动画的情况下,根据该目标逻辑帧来确定待播放动画的起始播放位置,避免直接对该待播放动画从头开始播放而导致的角色动作与游戏的当前逻辑状态不一致的问题,使得该待播放动画更匹配该目标逻辑帧的计算结果,提高表现层中各游戏角色的动画表现,从而进一步提高了有用户的游戏体验。
以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开中所涉及的公开范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述公开构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。
此外,虽然采用特定次序描绘了各操作,但是这不应当理解为要求这些操作以所示出的特定次序或以顺序次序执行来执行。在一定环境下,多任务和并行处理可能是有利的。同样地,虽然在上面论述中包含了若干具体实现细节,但是这些不应当被解释为对本公开的范围的限制。在单独的实施例的上下文中描述的某些特征还可以组合地实现在单个实施例中。相反地,在单个实施例的上下文中描述的各种特征也可以单独地或以任何合适的子组合的方式实现在多个实施例中。
尽管已经采用特定于结构特征和/或方法逻辑动作的语言描述了本主题,但是应当理解所附权利要求书中所限定的主题未必局限于上面描述的特定特征或动作。相反,上面所描述的特定特征和动作仅仅是实现权利要求书的示例形式。关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。

Claims (13)

  1. 一种游戏数据处理方法,所述方法包括:
    响应于目标游戏进行至预设游戏进程,启动目标计时器;
    根据获取到的游戏数据确定当前游戏状态下的目标逻辑帧;
    在所述目标逻辑帧中包括待播放动画时,根据所述目标逻辑帧确定所述待播放动画的起始播放位置;
    从所述起始播放位置开始,在客户端表现层中对所述待播放动画进行渲染。
  2. 根据权利要求1所述的方法,其中,所述根据获取到的游戏数据确定当前游戏状态下的目标逻辑帧包括:
    获取所述目标计时器的值作为第一时间,其中,所述目标计时器用于记录所述表现层中各表现帧的渲染持续时间;
    根据所述第一时间和所述获取到的游戏数据计算所述当前游戏状态下的所述目标逻辑帧,所述目标逻辑帧为至少一帧;
    所述方法还包括:
    将所述第一时间减去所述目标逻辑帧对应的逻辑帧总时长之后的第二时间作为所述目标计时器的值,以继续记录所述客户端表现层中各表现帧的渲染持续时间。
  3. 根据权利要求1或2所述的方法,其中,所述在所述目标逻辑帧中包括待播放动画时,根据所述目标逻辑帧确定所述待播放动画的起始播放位置包括:
    在所述目标逻辑帧的帧数大于预设阈值时,根据所述目标逻辑帧的帧数来确定所述的待播放动画的起始播放位置。
  4. 根据权利要求3所述的方法,其中,所述在所述目标逻辑帧帧数大于预设阈值时,根据所述目标逻辑帧的数量来确定所述的待播放动画的起始播放位置包括:
    将所述待播放动画的第M帧作为所述待播放动画的起始播放位置,其中,M=N-1,N为所述目标逻辑帧的帧数。
  5. 根据权利要求2所述的方法,其中,所述在所述目标逻辑帧中包括待播放动画时,根据所述目标逻辑帧确定所述待播放动画的起始播放位置还包括:
    根据所述第二时间来确定所述的待播放动画的起始播放位置。
  6. 根据权利要求5所述的方法,其中,所述根据所述第二时间来确定所述的待播放动画的起始播放位置包括:
    在所述目标逻辑帧的帧数不大于预设阈值时,将所述待播放动画经过所述第二时间之后所到达的动画位置作为所述起始播放位置;
    在所述目标逻辑帧的帧数大于预设阈值时,根据所述目标逻辑帧的帧数确定所述待播放动画的起始播放帧,并根据将所述待播放动画从所述起始播放帧开始经过所述第二时间之后所到达的动画位置作为所述起始播放位置。
  7. 根据权利要求2-6中任一项所述的方法,其中,所述根据所述第一时间和所述获取到的游戏数据计算所述当前游戏状态下的所述目标逻辑帧包括:
    将所述第一时间除以单个逻辑帧时长后向下取整以得到待更新逻辑帧的帧数;
    根据所述待更新逻辑帧的帧数对所述逻辑帧进行计算,以得到所述目标逻辑帧,所述目标逻辑帧的帧数为所述待更新逻辑帧的帧数。
  8. 根据权利要求2-6中任一项所述的方法,其中,所述方法还包括:
    将每个原始动画分别分离为第一位移信息、关键帧与不包括位移信息的动画模型;
    根据每个原始动画的所述第一位移信息和关键帧,分别对两个或多个原始动画的组合进行动作融合计算,以得到有效动画关键帧,所述有效动画关键帧中包括经过所述动作融合计算后的第二位移信息;
    所述根据所述第一时间和所述获取到的游戏数据计算所述当前游戏状态下的所述目标逻辑帧包括:
    根据获取到的游戏数据、所述有效动画关键帧和所述第一时间计算对逻辑帧进行计算,以得到所述目标逻辑帧。
  9. 一种游戏数据处理装置,所述装置包括:
    启动模块,用于响应于目标游戏进行至预设游戏进程,启动目标计时器;
    逻辑帧确定模块,用于根据获取到的游戏数据确定当前游戏状态下的目标逻辑帧;
    位置确定模块,用于在所述目标逻辑帧中包括待播放动画时,根据所述目标逻辑帧确定所述待播放动画的起始播放位置;
    渲染模块,用于从所述起始播放位置开始,在客户端表现层中对所述待播放动画进行渲染。
  10. 一种计算机可读介质,其上存储有计算机程序,所述计算机程序被处理装置执行时实现权利要求1-8中任一项所述方法的步骤。
  11. 一种电子设备,包括:
    存储装置,其上存储有计算机程序;
    处理装置,用于执行所述存储装置中的所述计算机程序,以实现权利要求1-8中任一项所述方法的步骤。
  12. 一种计算机程序产品,包括计算机程序,所述计算机程序被处理装置执行时实现权利要求1-8中任一项所述方法的步骤。
  13. 一种计算机程序,所述计算机程序被处理装置执行时实现权利要求1-8中任一项所述方法的步骤。
PCT/CN2023/084544 2022-04-15 2023-03-28 游戏数据处理方法、装置、介质及电子设备 WO2023197861A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210399239.5A CN114699767A (zh) 2022-04-15 2022-04-15 游戏数据处理方法、装置、介质及电子设备
CN202210399239.5 2022-04-15

Publications (1)

Publication Number Publication Date
WO2023197861A1 true WO2023197861A1 (zh) 2023-10-19

Family

ID=82174263

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/084544 WO2023197861A1 (zh) 2022-04-15 2023-03-28 游戏数据处理方法、装置、介质及电子设备

Country Status (2)

Country Link
CN (1) CN114699767A (zh)
WO (1) WO2023197861A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117557698A (zh) * 2024-01-11 2024-02-13 广州趣丸网络科技有限公司 数字人肢体动画生成方法、装置、存储介质及计算机设备

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114699767A (zh) * 2022-04-15 2022-07-05 北京字跳网络技术有限公司 游戏数据处理方法、装置、介质及电子设备
CN115379296B (zh) * 2022-08-17 2024-03-19 在线途游(北京)科技有限公司 一种基于帧同步的数据校验方法和装置
CN115797513B (zh) * 2023-02-01 2023-05-09 腾讯科技(深圳)有限公司 一种动画处理方法、装置、设备、存储介质及程序产品

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090153567A1 (en) * 2007-02-13 2009-06-18 Jaewoo Jung Systems and methods for generating personalized computer animation using game play data
US20120021828A1 (en) * 2010-02-24 2012-01-26 Valve Corporation Graphical user interface for modification of animation data using preset animation samples
US20160027243A1 (en) * 2014-07-23 2016-01-28 Atlas Gaming Technologies Pty Ltd. Computerised method of presenting a game selection screen in a multi game environment
CN110860086A (zh) * 2019-11-08 2020-03-06 武汉微派网络科技有限公司 数据处理方法、可读存储介质和电子设备
CN112206514A (zh) * 2020-10-19 2021-01-12 珠海金山网络游戏科技有限公司 一种游戏画面渲染方法及装置
CN112516598A (zh) * 2020-11-20 2021-03-19 网易(杭州)网络有限公司 游戏服务故障的处理方法、装置、服务器及介质
CN114699767A (zh) * 2022-04-15 2022-07-05 北京字跳网络技术有限公司 游戏数据处理方法、装置、介质及电子设备

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9827496B1 (en) * 2015-03-27 2017-11-28 Electronics Arts, Inc. System for example-based motion synthesis
CN107147947B (zh) * 2017-05-11 2018-07-13 腾讯科技(深圳)有限公司 关键帧识别方法及装置
CN111167116B (zh) * 2019-09-29 2022-01-18 腾讯科技(深圳)有限公司 一种平滑显示的方法、终端和计算机存储介质
WO2022056239A1 (en) * 2020-09-11 2022-03-17 The Board Of Regents Of The Nevada System Of Higher Education On Behalf Of The University Of Nevada, Las Vegas Supply of video segments based on gameplay of a videogame
CN112153374B (zh) * 2020-09-25 2022-06-07 腾讯科技(深圳)有限公司 视频帧图像的测试方法、装置、设备、计算机存储介质

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090153567A1 (en) * 2007-02-13 2009-06-18 Jaewoo Jung Systems and methods for generating personalized computer animation using game play data
US20120021828A1 (en) * 2010-02-24 2012-01-26 Valve Corporation Graphical user interface for modification of animation data using preset animation samples
US20160027243A1 (en) * 2014-07-23 2016-01-28 Atlas Gaming Technologies Pty Ltd. Computerised method of presenting a game selection screen in a multi game environment
CN110860086A (zh) * 2019-11-08 2020-03-06 武汉微派网络科技有限公司 数据处理方法、可读存储介质和电子设备
CN112206514A (zh) * 2020-10-19 2021-01-12 珠海金山网络游戏科技有限公司 一种游戏画面渲染方法及装置
CN112516598A (zh) * 2020-11-20 2021-03-19 网易(杭州)网络有限公司 游戏服务故障的处理方法、装置、服务器及介质
CN114699767A (zh) * 2022-04-15 2022-07-05 北京字跳网络技术有限公司 游戏数据处理方法、装置、介质及电子设备

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117557698A (zh) * 2024-01-11 2024-02-13 广州趣丸网络科技有限公司 数字人肢体动画生成方法、装置、存储介质及计算机设备
CN117557698B (zh) * 2024-01-11 2024-04-26 广州趣丸网络科技有限公司 数字人肢体动画生成方法、装置、存储介质及计算机设备

Also Published As

Publication number Publication date
CN114699767A (zh) 2022-07-05

Similar Documents

Publication Publication Date Title
WO2023197861A1 (zh) 游戏数据处理方法、装置、介质及电子设备
US11831566B2 (en) Method and apparatus for transmitting scene image of virtual scene, computer device, and computer-readable storage medium
WO2022161335A1 (zh) 互动方法、装置、电子设备和存储介质
US20240040199A1 (en) Video-based interaction method and apparatus, storage medium and electronic device
EP4333440A1 (en) Video interaction method and apparatus, electronic device, and storage medium
CN109314802B (zh) 基于游戏内位置的游戏进行伴随应用
EP4344224A1 (en) Live-streaming interaction method and apparatus, and readable medium and electronic device
CN113710336B (zh) 服务器负载预测和高级性能度量
US20170323428A1 (en) Method and terminal for implementing turning of virtual character
WO2023226814A1 (zh) 视频处理方法、装置、电子设备及存储介质
KR102706760B1 (ko) 멀티 플레이어 프로그램에서 높은 입력 레이턴시를 유도하는 기법
JP7439331B2 (ja) 一様なデータプラットフォームのためのデータモデル
CN109582274B (zh) 音量调节方法、装置、电子设备及计算机可读存储介质
WO2024016924A1 (zh) 视频处理方法、装置、电子设备及存储介质
CN110975277B (zh) 增强现实游戏中信息处理的方法及装置、介质及电子设备
CN110267088B (zh) 视频播放的控制方法、装置、电子设备、及存储介质
CN113260428B (zh) 跨平台消费游戏内的对象
CN113810773B (zh) 视频下载方法及装置、电子设备和存储介质
CN114100145B (zh) 云游戏互动方法、装置、设备及介质
WO2024152925A1 (zh) 特效处理方法、装置、电子设备和存储介质
WO2024146394A1 (zh) 视频互动方法、装置、存储介质及电子设备
JP7417733B2 (ja) ビデオ再生ページ表示方法、装置、電子機器及び媒体
WO2023197811A1 (zh) 视频下载、传输方法、装置、终端设备、服务器及介质
CN114416263B (zh) 一种处理方法、装置、电子设备及介质
CN114979799B (zh) 一种全景视频处理方法、装置、设备和存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23787507

Country of ref document: EP

Kind code of ref document: A1