WO2019076309A1 - 动画的同步播放方法和装置、存储介质及电子装置 - Google Patents

动画的同步播放方法和装置、存储介质及电子装置 Download PDF

Info

Publication number
WO2019076309A1
WO2019076309A1 PCT/CN2018/110566 CN2018110566W WO2019076309A1 WO 2019076309 A1 WO2019076309 A1 WO 2019076309A1 CN 2018110566 W CN2018110566 W CN 2018110566W WO 2019076309 A1 WO2019076309 A1 WO 2019076309A1
Authority
WO
WIPO (PCT)
Prior art keywords
client
indication information
time
moment
server
Prior art date
Application number
PCT/CN2018/110566
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 WO2019076309A1 publication Critical patent/WO2019076309A1/zh
Priority to US16/583,179 priority Critical patent/US11229842B2/en

Links

Images

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/30Interconnection arrangements between game servers and game devices; Interconnection arrangements between game devices; Interconnection arrangements between game servers
    • A63F13/35Details of game servers
    • A63F13/358Adapting the game course according to the network or server load, e.g. for reducing latency due to different connection speeds between clients
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/4302Content synchronisation processes, e.g. decoder synchronisation
    • 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/50Controlling the output signals based on the game progress
    • A63F13/52Controlling the output signals based on the game progress involving aspects of the displayed game scene
    • 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/30Interconnection arrangements between game servers and game devices; Interconnection arrangements between game devices; Interconnection arrangements between game servers
    • A63F13/33Interconnection arrangements between game servers and game devices; Interconnection arrangements between game devices; Interconnection arrangements between game servers using wide area network [WAN] connections
    • A63F13/335Interconnection arrangements between game servers and game devices; Interconnection arrangements between game devices; Interconnection arrangements between game servers using wide area network [WAN] connections using Internet
    • 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/30Interconnection arrangements between game servers and game devices; Interconnection arrangements between game devices; Interconnection arrangements between game servers
    • A63F13/35Details of game servers
    • 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/40Processing input control signals of video game devices, e.g. signals generated by the player or derived from the environment
    • A63F13/44Processing input control signals of video game devices, e.g. signals generated by the player or derived from the environment involving timing of operations, e.g. performing an action within a time slot
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/242Synchronization processes, e.g. processing of PCR [Program Clock References]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/4302Content synchronisation processes, e.g. decoder synchronisation
    • H04N21/4307Synchronising the rendering of multiple content streams or additional data on devices, e.g. synchronisation of audio on a mobile phone with the video output on the TV screen
    • H04N21/43076Synchronising the rendering of multiple content streams or additional data on devices, e.g. synchronisation of audio on a mobile phone with the video output on the TV screen of the same content streams on multiple devices, e.g. when family members are watching the same movie on different devices
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/478Supplemental services, e.g. displaying phone caller identification, shopping application
    • H04N21/4781Games
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/85Assembly of content; Generation of multimedia applications
    • H04N21/854Content authoring
    • H04N21/8547Content authoring involving timestamps for synchronizing content
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/50Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by details of game servers
    • A63F2300/55Details of game data or player data management
    • A63F2300/5526Game data structure
    • A63F2300/5533Game data structure using program state or machine event data, e.g. server keeps track of the state of multiple players on in a multiple player game

Definitions

  • the embodiments of the present application relate to the field of the Internet, and in particular, to an animation playing method and apparatus, a storage medium, and an electronic device.
  • the cut-off is the logic used to connect the game story during the game, expressed in an animated form, used to highlight key events and special plots.
  • the client itself determines whether the condition for playing the cutscenes is reached, and if so, the action of playing the cutscenes on the local client is triggered immediately.
  • the above-mentioned trigger condition processing scheme is reasonable, but for a game in which a plurality of players cooperate, if each client itself judges whether the condition of playing the cut-off animation is reached and autonomously triggers the local client.
  • the action of playing the cutscenes may cause the cutscenes of the local players to be out of sync, which may cause the timing of entering the game after the cutscenes to be out of sync, thus affecting the progress of the game and the game experience, such as when The strategy of triggering the NPC character in the game, how to display the information of the teammate player who has not played the cutscenes, whether it is necessary to wait for all the players to finish playing and then enter the game and the game progress is inconsistent.
  • the embodiment of the present application provides an animation playing method and device, a storage medium, and an electronic device to at least solve the technical problem that the game progress is inconsistent due to playing the cutscenes.
  • a method for synchronously playing an animation comprising: acquiring first indication information on a first client, wherein the first indication information is used to indicate that the game participates in a game a client and the second client synchronously playing a cut-off animation of a game; determining a first moment based on the first indication information, wherein the first moment is a moment when the cut-off animation starts to be played on the first client; When the time on the end reaches the first moment, the transition animation is started to be synchronized with the second client.
  • a method for synchronously playing an animation comprising: acquiring first indication information, wherein the first indication information is used to indicate a first client and a second participating in a game
  • the client synchronously plays the cutscenes of the game; and sends the first indication information to the first client and the second client to indicate that the first client starts and the second time when the time on the first client reaches the first moment
  • the client synchronously plays the cut-and-shoot animation, wherein the first moment is a moment that the first client starts to play the cut-off animation synchronously with the second client on the first client determined based on the first indication information.
  • an animated synchronized playback apparatus comprising one or more processors, and one or more memories storing program units, wherein the program units are executed by the processor
  • the program unit includes: a first obtaining unit, configured to acquire first indication information on the first client, where the first indication information is used to indicate that the first client and the second client participating in the game are synchronized Playing a cut-off animation of a game; the determining unit is configured to determine a first time based on the first indication information, wherein the first time is a time at which the cut-off animation starts to be played on the first client; the first synchronization unit is set The cut-off animation is started to be synchronized with the second client when the time on the first client reaches the first moment.
  • an animated synchronized playback apparatus comprising one or more processors, and one or more memories storing program units, wherein the program units are executed by the processor
  • the program unit includes: a second obtaining unit configured to acquire the first indication information, wherein the first indication information is used to indicate that the first client and the second client participating in the game play the game in a synchronous manner An animation; the second synchronization unit is configured to send the first indication information to the first client and the second client, to indicate that the first client starts to contact the second client when the time on the first client reaches the first moment The end game is played synchronously, wherein the first time is a time when the first client starts to play the cut-off animation synchronously with the second client on the first client determined based on the first indication information.
  • a storage medium including a stored program that executes the above-described method while the program is running.
  • an electronic device comprising a memory, a processor, and a computer program stored on the memory and operable on the processor, the processor executing the method described above by a computer program.
  • the first indication information is obtained on the first client, where the first indication information is used to indicate that the first client and the second client participating in the game play the game of the game in a synchronous game. Determining a first moment based on the first indication information, wherein the first moment is a moment when the cut-off animation starts to be played on the first client; and the time on the first client arrives at the first moment to start synchronizing with the second client Playing the cutscenes, the cutscenes of the first client and the second client of the game are played synchronously, which can make the progress of the game consistent, and can solve the technical problem of inconsistent game progress caused by playing the cutscenes, thereby achieving the consistency of the game progress.
  • Technical effects are provided on the first client, where the first indication information is used to indicate that the first client and the second client participating in the game play the game of the game in a synchronous game.
  • FIG. 1 is a schematic diagram of a hardware environment of a method for synchronously playing an animation according to an embodiment of the present application
  • FIG. 2 is a flow chart of an optional synchronized animation playing method according to an embodiment of the present application.
  • FIG. 3 is a schematic diagram of an alternative cinematic animation in accordance with an embodiment of the present application.
  • FIG. 4 is a schematic diagram of an optional information transmission according to an embodiment of the present application.
  • FIG. 5 is a schematic diagram of still another optional information transmission according to an embodiment of the present application.
  • FIG. 6 is a flow chart of still another optional synchronized play method of an animation according to an embodiment of the present application.
  • FIG. 7 is a schematic diagram of still another alternative cut-off animation in accordance with an embodiment of the present application.
  • FIG. 8 is a schematic diagram of yet another alternative cut-out animation in accordance with an embodiment of the present application.
  • FIG. 9 is a schematic diagram of yet another alternative cut-out animation in accordance with an embodiment of the present application.
  • FIG. 10 is a schematic diagram of still another alternative animation playing device according to an embodiment of the present application.
  • FIG. 11 is a structural block diagram of an electronic device according to an embodiment of the present application.
  • FPS mobile game FPS's English full name is First-person shooting game, FPS mobile game is the first person shooting game running on mobile phone.
  • NPC English full name is Non Player Character, non-player controlled objects, such as terrain collision objects in the game.
  • PVE English full name Player VS Environment, the player plays against the AI according to the designed story, such as multiple players in the same scene to work together to open a story with a plot.
  • Task system According to the fixed scenario, one key task point is completed by the server and synchronized to each client to perform corresponding performance.
  • Unity3D is a multi-platform integrated game development tool that allows players to easily create interactive content such as 3D video games, architectural visualizations, real-time 3D animations, etc. It is a fully integrated professional game engine.
  • PhysX The same as Physics, it is a set of physics engine; it is also one of the world's three major physics engines, the other two are Havok and Bullet. Another meaning of the PhysX physics engine demonstration program is the physical acceleration card that specifically calculates the PhysX engine.
  • a method embodiment of an animated synchronous playback method is provided.
  • the synchronous play method of the above animation may be applied to a hardware environment composed of the server 102 and the terminal 104 as shown in FIG. 1.
  • the server 102 is connected to the terminal 104 through a network.
  • the network includes but is not limited to a wide area network, a metropolitan area network, or a local area network.
  • the terminal 104 is not limited to a PC, a mobile phone, a tablet, or the like.
  • the synchronized play method of the animation of the embodiment of the present application may be executed by the server 102, may be executed by the terminal 104, or may be performed by the server 102 and the terminal 104 in common.
  • the synchronous play method of the animation performed by the terminal 104 in the embodiment of the present application may also be performed by a client installed thereon.
  • the server sends the indication information to the client of the terminal.
  • the client executes the program code corresponding to the method of the embodiment of the present application. .
  • the program code corresponding to the method of the embodiment of the present application may be directly executed on the server or the terminal.
  • step S11 the server obtains the first indication information, where the first indication information is used to indicate that the first client and the second client participating in the game play the game of the game in a synchronous manner, and the first indication information is carried according to the server itself.
  • the playback start time ie, the second time
  • the end of the play determined by the clock system.
  • Step S12 The server sends the first indication information to the first client and the second client, to indicate that the first client starts to play the cut-off animation synchronously with the second client when the time on the first client reaches the first moment.
  • the first moment is a moment when the first client starts to play the cut-off animation synchronously with the second client on the first client determined based on the first indication information.
  • the playback start time and the playback end time indicated by the first indication information are directly played. Yes; if the clock system used by the first client and the second client is different from the clock system of the server, the first client and the second client need to convert the indicated play start time and play end time into their own clocks. Time on the system.
  • the server periodically sends the second indication information to the first client and the second client, where the second indication information is used to indicate the playing progress of the cutscenes, and the playing progress of the cutscenes in the first client and/or the second client is If the playback progress indicated by the second indication information is different, the cut-off animation is played in the first client and/or the second client according to the playback progress indicated by the second indication information.
  • the second indication information indicates that the progress of playing at a specified time (according to the time determined by the clock system of the server) is a specified progress, and the first client and the second client can determine that the client is at the specified time. Whether the playback progress on the screen is the specified progress. If not, the playback starts from the specified progress when the specified time comes.
  • timing indicating the progress of synchronous playback are as follows: 1) If the time difference calculated by the client according to the first indication information is inaccurate, the playback between the clients may be asynchronous, and the playback between the clients may be adjusted to a progress by specifying the progress. Synchronous playback; 2) After the client is disconnected from the middle, it can start playing from the specified progress in order to keep synchronization with the rest of the client.
  • the server sends third indication information to the first client and the second client, where the third indication information is used to indicate that the target content is synchronously displayed in the first client and the second client, and the target content is used to represent the game in the game.
  • the third indication information indicates that the target content is synchronously played at a certain time (according to the clock system determination time of the server), and the target content is a process in which the non-player control object changes, including but not limited to the environment change process, AI role change process, scene change process.
  • FIG. 2 is a flowchart of an optional animation synchronization playing method according to an embodiment of the present application. As shown in FIG. 2, the method may include the following steps:
  • Step S202 Acquire first indication information on the first client, where the first indication information is used to indicate that the first client and the second client participating in the game play the cut-off animation of the game in synchronization.
  • the method of the embodiment of the present application is performed on the first client and the second client.
  • the foregoing method in the embodiment of the present application is described by using a terminal where the first client is located as a method execution entity, and the foregoing client (
  • the first client and the second client are game clients of a game, and the clients can be installed on the terminal, and the terminal includes but is not limited to a PC, a mobile phone, a tablet, and the second client generally refers to In the game of the other clients except the first client, the number of the second client may be one or more.
  • the transmission form of the first indication information includes, but is not limited to, sending according to the agreed protocol, and transmitting according to the agreed command or instruction.
  • the first indication information herein refers to the information sent by the server to the first client and the second client to indicate the start time (and possibly the end time) of the cinematic animation, and the server may simultaneously send the first indication information to The first client and the second client may also be sent to the first client and the second client at different times.
  • Step S204 determining a first moment based on the first indication information, where the first moment is a moment when the cut-off animation is started to be played on the first client.
  • the first client determines the first moment based on the first indication information
  • the clock system used by the first client is the same as the clock system of the server (the standard time is consistent)
  • the first client directly plays according to the first moment indicated by the first indication information.
  • the clock system used by the first client is different from the clock system of the server, the first client can convert the indicated playback start time to the time (first time) on the clock system.
  • the second client when the foregoing steps are performed on the second client, the second client also receives the first indication information, and determines a starting time for playing according to its own clock system by using the similar method described above.
  • Step S206 starting to play the cut-off animation synchronously with the second client when the time on the first client reaches the first moment.
  • the first client starts playing the cutscenes from the first moment
  • the second client starts playing the cutscenes from a certain moment
  • the moment may be the first moment Different, but all are determined according to the playback start time indicated by the first indication information, so it can be ensured that both the first client and the second client start playing according to the playback start time indicated by the server.
  • each client plays the cut-off animation on the local client according to the specified playback start time of the server, so that the cut-off animations played by multiple players are synchronized, and then the playback is completed.
  • the timing of entering the game after the cutscenes is synchronized, which makes the progress of the game unified and improves the game experience.
  • the first indication information is obtained on the first client by using the foregoing step S202 to the step S206, wherein the first indication information is used to indicate that the first client and the second client participating in the game play the game in a synchronous manner.
  • An animation determining a first moment based on the first indication information, wherein the first moment is a moment when the cut-off animation starts to be played on the first client; and the second client starts when the time on the first client reaches the first moment Simultaneously playing the cutscenes, the cutscenes of the first client and the second client of the game are played synchronously, which can make the progress of the game consistent, and can solve the technical problem of inconsistent game progress caused by playing the cutscenes, thereby achieving the consistency of the game progress.
  • Technical effect can be used to indicate that the first client and the second client participating in the game play the game in a synchronous manner.
  • the server triggers the transition task to the client through the task system, and the client executes the transition task and after the specified time, the server again notifies the client to perform state transition of the scene NPC object to change the scene collision information. .
  • the server changes the physical collision information of the scenario loaded by the server according to the information configured for the NPC, so that the physical information of the scenario between the server and the client is consistent.
  • the NPCs preset in the task system and the scenario are configured by the client and directed to the server.
  • the server reads the configuration and triggers the corresponding tasks according to the task conditions and synchronizes to the client for performance.
  • the first indication information is acquired on the first client, where the first indication information is used to indicate that the first client and the second client participating in the game play a game in synchronization Cutscenes.
  • Obtaining the first indication information on the first client includes two aspects: one is acquiring the first indication information sent by the server on the first client; and the second is acquiring the first identifier obtained by the terminal processor from the first client. Obtaining, in an indication information, a timestamp carried by the first indication information and a second time indicated by the first indication information.
  • the timestamp is the time when the server's clock system is sent when the server sends the first indication information to the first client
  • the second time is the time when the server's clock system starts playing the cutscenes
  • the timestamp and the second time are used to obtain In the first client, the playing time of the cutscenes, the timestamp and the second moment are also used to obtain the playing moment of the cutscenes in the second client, so that the cutscenes are synchronized on the first client and the second client. Play.
  • the first moment is determined based on the first indication information, where the first moment is a moment on the first client to start playing the cinematic animation according to the clock system of the first client.
  • determining the first moment based on the first indication information may be implemented by:
  • Step S21 Determine a time difference DeltaTime between the clock system of the first client and the clock system of the server according to the timestamp carried by the first indication information, where the timestamp is the clock system of the server when the server sends the first indication information to the first client.
  • the above time difference includes two components, one is the network delay time and the other is the time stamp difference.
  • the sum of the network delay time PingDeltaTime and the time stamp difference LogicalDeltaTime is set to the time difference DeltaTime between the clock system of the first client and the clock system of the server.
  • step S22 the sum of the second time ServerStartTime indicated by the first indication information and the time difference DeltaTime is taken as the first time, and the second time is the time when the cut-off animation is started according to the clock system of the server.
  • step S206 the cut-off animation is started to be synchronized with the second client when the time on the first client reaches the first time.
  • the first indication information may be sent in advance (before the second time arrives), so that the first client and the second client complete the time conversion, and the time conversion is completed on the first client and the second client. Thereafter, synchronous playback is performed when the playback start time determined by the respective time systems is reached at respective times.
  • the server may periodically send the second indication information to the first client and the second client to indicate at a certain moment.
  • the progress of the cutscenes should be in progress.
  • Step S31 The server periodically sends the second indication information to the first client and the second client.
  • the length of the cutscenes is 60 seconds, then you can split into a progress every 10 seconds, that is, the playing time is 10 seconds, 20 seconds, 30 seconds. 40 seconds, 50 seconds, 60 seconds respectively indicate a progress.
  • the second indication information may be indicated in advance for each progress. If the server indicates that the cut-off animation is started at 18:15 according to the time of the server, the client may be indicated by the second indication before 18:15:10, and should be played at 18:15:10. The progress is 10 seconds for this progress.
  • Step S32 Acquire second indication information on the first client, where the second indication information is used to indicate the playing progress of the cutscenes, and the second indication information indicates that the progress to be played at 18:15:10 is 10 Second progress.
  • step S32 in a case where the playing progress of the cut-off animation and the playing progress indicated by the second indication information are different, the first client plays the cut-off animation according to the playing progress indicated by the second indication information.
  • the client can choose to make adjustments, including but not limited to the following two ways:
  • the first is to adjust in advance: in order to meet the progress when the time reaches 18:15:10, the progress is 10 seconds, you can adjust the progress before the time reaches 18:15:10, such as at 18:15:5 After receiving the second indication message, at 18:15:6, the progress of the playback is directly adjusted from 3 seconds to 6 seconds.
  • the second is to adjust according to the instructions: in order to meet the progress of 10 seconds when the time reaches 18:15:10, you can adjust the progress when the time reaches 18:15:10, and arrive at 18:15. In 10 seconds, it starts playing directly from the 10th second.
  • the clock system of the server is used as a standard. If the clock system of the client is different from that of the server, in the foregoing embodiment, the client needs to perform the foregoing clock conversion manner. Conversion, which converts the time indicated by the server to the time local to the client.
  • the client when it is required to change the terrain of the current scene during or after playing the cutscenes, it is also processed by the client, and the client automatically displays the preset terrain objects that need to be hidden or displayed or Hidden processing, in the transition story, due to the destruction of BOSS (that is, the powerful NPC character in the game) or the influence of organs and other factors, the current scene terrain changes, used to improve the player's game immersion and game experience.
  • BOSS that is, the powerful NPC character in the game
  • the current scene terrain changes used to improve the player's game immersion and game experience.
  • the cutscenes for connecting the upper and lower plots are usually controlled and played by the client itself.
  • the client After the end of the game, the client also changes the terrain of the current scene. Similarly, this also affects the consistency of the game progress to a certain extent. For example, one of the clients has not completed the terrain change, and the other clients have completed. At this time, the completed client needs to wait for the unfinished client.
  • a solution is provided.
  • the server starts to play the cinematic animation synchronously with the second client, and the server may send the first client and the second client.
  • the client sends the third indication information to indicate that the target content is synchronously displayed in the first client and the second client, and the target content is used to indicate a process in which the non-player control object in the game is changed.
  • Step S41 Acquire third indication information sent by the server on the first client.
  • the target content indicated by the third indication information includes, but is not limited to, an environment change process, an AI character change process, and a scene change process (such as the terrain collision event described above).
  • Step S42 in response to the third indication information, displaying the target content in synchronization with the second client in the first client.
  • the third indication information described above indicates a time when the client starts to play the target content (according to the determined time of the clock system of the server), and may also include a time to end the playback of the target content.
  • the client can perform the conversion according to the aforementioned clock conversion method. Specifically, the first client acquires a time difference between the clock system of the first client and the clock system of the server, and acquires a third moment indicated by the third indication information, where the third moment is a moment of displaying the target content according to the clock system of the server. Obtaining a sum of the third moment and the time difference is a fourth moment (ie, a moment when the first client starts to display the target content in the local clock system). The target content is displayed in synchronization with the second client when the clock system on the first client reaches the fourth moment.
  • the calculation acquisition can also be performed as described above.
  • starting to display the target content in synchronization with the second client includes the following two implementation manners:
  • the server may indicate an event in which the non-player control object that has occurred in the cutscenes changes, and in the case where the fourth time is not later than the fifth time, the target content is displayed in the cutscenes, and the fifth time is the first customer. End the moment when the cutscenes are played.
  • the server may indicate an event in which the non-player control object changes after the completion of the cutscenes play, and in the case where the fourth time is later than the fifth time, the target content is displayed in the game screen of the one game.
  • the embodiment of the present application logically aligns the server and the client time, and ensures that each client can change the terrain at the same time after passing the same time after the logical driving of the server.
  • the server also has the physical information that changes the scene accordingly, in order to keep consistent with the client, to ensure that each client can not traverse or not step when the terrain is unchanged.
  • DS Dedicated-Server
  • the server implements the transmission of the reliable packet (the packet loss retransmission mechanism) by using the UDP protocol, and the UDP reliable packet is used to send the indication information of the embodiment of the present application.
  • the reliable packet the packet loss retransmission mechanism
  • the server control triggers the cut-and-off animation playing process, and the server controls the scene terrain NPC to change, and the client receives the server information only for performance.
  • the technical solution can be implemented based on a Dedicated-Server (Dedicated Server DS) network synchronization framework, under which:
  • the server has complete game logic, and the main logic of the entire game process is driven by the server.
  • the client performs performance processing, in which the collision between the player and the scene is handled by the client, and the server makes corrections.
  • the client will forcibly pull back to the server location, Guaranteed synchronization.
  • the server also processes the collision information between the scene and the player, and delivers the processing result (via the third indication information) to the client for performance.
  • the technical solution of the embodiment of the present application can be applied to a mobile game developed based on the Unity engine, which allows the server to run a set of PhysX physical components and a Recast Navigation component (the Unity engine) in the same version as the Unity engine. Component), to ensure that the same data processing results are consistent on both sides.
  • the server constructs the physical world of the scenario of the server by parsing the static physical information of the scenario exported by the client, and the dynamic NPC information exported by the client is used to dynamically change the physical information of the scenario.
  • the multi-player PVE game player and the server can each maintain a set of time systems and are inconsistent with each other.
  • the server periodically sends the current time of the server to the client, so that each client calculates each other.
  • the time system is different from the timestamp of the server's time system.
  • the specific time is used to convert the server time to the local time and process it so that each client and the server's time trigger point are synchronized.
  • the time axis 1 represents the clock system of the client
  • the time axis 2 represents the clock system of the server.
  • the server sends a timing packet (such as indication information) to the client at time T0, and the client receives the time at T1.
  • the server has already arrived at T2.
  • the service When the synchronization is over, the service will be sent to the client to broadcast the server time that the game is expected to end.
  • the client calculates the time of the client's end-of-field playback based on the calculated time difference between the client and the server (converts the server time to the client). time).
  • Each NPC has a one-to-one corresponding object on the client and the server, and has the same physical collision information, and has a unique ID to identify.
  • the client 1 can predict the end of the game time (ie, LogicalEndTime), and stop playing the cutscenes when the time arrives.
  • the server broadcasts the NPC to update the physical information to the client.
  • the client 1 is based on the server.
  • the notification changes accordingly to achieve the effect of dynamic scene update.
  • the customizable status attribute in the NPC will synchronize the latest status to the client 2 when the player joins or disconnects in the middle, ensuring the consistency between the client 2 and the server.
  • the specific implementation process is shown in Figure 6:
  • Step S601 the server sends the first indication information to the client 1 (the first client) to trigger the play of the cutscenes.
  • step S602 the client 1 calculates the start time and the end time, and plays the cutscenes.
  • Step S603 the server notifies the update of the NPC physical information by sending the third indication information to the first client.
  • step S604 the client 1 and the server simultaneously update the NPC physical information.
  • the energy tower changes from being unconnected to being in a connected state by transmitting energy to stopping the emission of energy.
  • step S605 the client 2 (second client) joins the game midway (if it is dropped after joining).
  • step S606 the client and the server synchronize the latest state of the NPC.
  • multiplayer PVE has added a venue-shaped transformation system to the game-driven game story, which enriches the content of the game.
  • the method provided by the embodiment of the present application can be used to uniformly implement the terrain transformation function and the cut-off animation playback function during the transition process.
  • Each game scene object can be configured with the same time stamp to change the corresponding properties, such as playing animation, playing particle effects, playing music, changing the position and size of objects, etc. .
  • Each scene axis in the tool can process a scene object.
  • an animation frame that should be displayed at a certain time (such as the 5th second) on the time axis is shown.
  • Game planning According to the needs of the plot, through the task system configuration tool, configure the corresponding cutscenes to trigger the task points, and at the same time arrange the NPC objects that need to be displayed or hidden in the scene, and associate with the task system.
  • the server drives the game's task process based on the configuration information and synchronizes to the client for performance.
  • the ID of the task to be triggered is 104, and this task should be triggered at a specific time (such as 0 minutes and 11 seconds) of the UI task (ID is 6).
  • the synchronization of the cutscenes and the NPC logic control function are realized, so that all the players in the same scene can change the terrain in time during the transition, and the content of the game is greatly enriched.
  • the server When multiple players are in the same PVE story, when a certain key task is triggered, the server notifies all clients to play the cutscenes with the plot, and after a certain period of time, simultaneously changes the current scene terrain, enhancing the player's immersion. With the gaming experience.
  • the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware, but in many cases, the former is A better implementation.
  • the technical solution of the embodiments of the present application may be embodied in the form of a software product in essence or in the form of a software product stored in a storage medium (such as ROM/RAM, disk).
  • the optical disc includes a plurality of instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method described in the various embodiments of the present application.
  • FIG. 10 is a schematic diagram of an optional animated synchronous playback device according to an embodiment of the present application.
  • the device may include a Or a plurality of processors, and one or more memories storing program units, wherein the program units are executed by a processor, the program units comprising: a first obtaining unit 1001, a determining unit 1003, and a first synchronizing unit 1005.
  • the first obtaining unit 1001 is configured to acquire first indication information on the first client, where the first indication information is used to indicate that the first client and the second client participating in the game play a game in synchronization Cutscenes.
  • the method of the embodiment of the present application is performed on the first client and the second client.
  • the foregoing method in the embodiment of the present application is described by using a terminal where the first client is located as a method execution entity, and the foregoing client (
  • the first client and the second client are game clients of a game, and the clients can be installed on the terminal, and the terminal includes but is not limited to a PC, a mobile phone, a tablet, and the second client generally refers to In the game of the other clients except the first client, the number of the second client may be one or more.
  • the transmission form of the first indication information includes, but is not limited to, sending according to the agreed protocol, and transmitting according to the agreed command or instruction.
  • the first indication information herein refers to the information sent by the server to the first client and the second client to indicate the start time (and possibly the end time) of the cinematic animation, and the server may simultaneously send the first indication information to The first client and the second client may also be sent to the first client and the second client at different times.
  • the determining unit 1003 is configured to determine the first moment based on the first indication information, wherein the first moment is a moment when the cut-off animation is started to be played on the first client.
  • the first client determines the first moment based on the first indication information
  • the clock system used by the first client is the same as the clock system of the server (the standard time is consistent)
  • the first client directly plays according to the first moment indicated by the first indication information.
  • the clock system used by the first client is different from the clock system of the server, the first client can convert the indicated playback start time to the time (first time) on the clock system.
  • the second client when the foregoing step is performed on the second client, the second client also receives the first indication information described above, and determines a starting moment for playing according to its own clock system by using the similar method described above.
  • the first synchronization unit 1005 is configured to start playing the cinematic animation in synchronization with the second client when the time on the first client reaches the first moment.
  • the first client starts playing the cutscenes from the first moment
  • the second client starts playing the cutscenes from a certain moment
  • the moment may be the first moment Different, but all are determined according to the playback start time indicated by the first indication information, so it can be ensured that both the first client and the second client start playing according to the playback start time indicated by the server.
  • each client plays the cut-off animation on the local client according to the specified playback start time of the server, so that the cut-off animations played by multiple players are synchronized, and then the playback is completed.
  • the timing of entering the game after the cutscenes is synchronized, which makes the progress of the game unified and improves the game experience.
  • the first obtaining unit 1001 in this embodiment may be configured to perform step S202 in the embodiment of the present application.
  • the determining unit 1003 in this embodiment may be configured to perform step S204 in the embodiment of the present application.
  • the first synchronization unit 1005 in this embodiment may be configured to perform step S206 in the embodiment of the present application.
  • the foregoing modules are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the contents disclosed in the foregoing embodiments. It should be noted that the foregoing module may be implemented in a hardware environment as shown in FIG. 1 as part of the device, and may be implemented by software or by hardware.
  • the first indication information on the first client by using the foregoing module, where the first indication information is used to indicate that the first client and the second client participating in the game play the cut-off animation of the game in synchronization; Determining, by the indication information, a first moment, wherein the first moment is a moment when the cut-off animation starts to be played on the first client; when the time on the first client reaches the first moment, starting to play the cut-off animation synchronously with the second client
  • the cut-off animation of the first client and the second client of the game is synchronously played, which can make the progress of the game consistent, and can solve the technical problem of inconsistent game progress caused by playing the cut-off animation, thereby achieving the technical effect of keeping the game progress consistent.
  • the server triggers the transition task to the client through the task system, and the client executes the transition task and after the specified time, the server again notifies the client to perform state transition of the scene NPC object to change the scene collision information. .
  • the server changes the physical collision information of the scenario loaded by the server according to the information configured for the NPC, so that the physical information of the scenario between the server and the client is consistent.
  • the NPCs preset in the task system and the scenario are configured by the client and directed to the server.
  • the server reads the configuration and triggers the corresponding tasks according to the task conditions and synchronizes to the client for performance.
  • the first obtaining unit is further configured to: acquire a timestamp carried by the first indication information and a second time indicated by the first indication information, where the timestamp is that the server sends the first indication information to the first client.
  • the determining unit may include: a determining module, configured to determine a time difference between the clock system of the first client and the clock system of the server according to the timestamp carried by the first indication information, where the timestamp is the server first The time when the clock system of the server is sent when the first instruction information is sent by the client; the calculation module is configured to use the sum of the second time indicated by the first indication information and the time difference as the first time, wherein the second time is according to the server The clock system starts playing the moment of the cutscenes.
  • the determining module is further configured to: obtain a network delay time for transmitting the first indication information by the server and the first client, where the network delay time is where the clock system of the server is when the first client receives the first indication information.
  • the difference between the time instant and the timestamp carried by the first indication information setting the sum of the network delay time and the time stamp difference as the time difference between the clock system of the first client and the clock system of the server.
  • the apparatus of the embodiment of the present application may further include: a fifth synchronization unit, configured to: acquire second indication information on the first client, where the second indication information is used to indicate a play progress of the cut-off animation; When the playing progress of the cut-off animation by the first client is different from the playing progress indicated by the second indication information, the cut-off animation is played in the first client according to the playing progress indicated by the second indication information.
  • a fifth synchronization unit configured to: acquire second indication information on the first client, where the second indication information is used to indicate a play progress of the cut-off animation;
  • the cut-off animation is played in the first client according to the playing progress indicated by the second indication information.
  • the apparatus of the embodiment of the present application may further include: a sixth synchronization unit, configured to acquire third indication information on the first client, where the third indication information is used to indicate the first client and the first
  • the target content is synchronously displayed in the second client, and the target content is used to indicate a process in which the non-player control object in the game is changed; and the target content is displayed in synchronization with the second client in the first client in response to the third indication information.
  • the sixth synchronization unit is further configured to acquire a time difference between the clock system of the first client and the clock system of the server, and acquire a third moment indicated by the third indication information, where the third moment is according to a clock system of the server.
  • the time at which the target content is displayed; the sum of the third time and the time difference is obtained as the fourth time; and the clock system on the first client reaches the fourth time to start displaying the target content in synchronization with the second client.
  • the sixth synchronization unit is further configured to display the target content in the cut-off animation if the fourth time is not later than the fifth time, wherein the fifth time is the first client ends the playing of the cut-off animation. Time; in the case where the fourth time is later than the fifth time, the target content is displayed in the game screen of one game.
  • the synchronization of the cutscenes and the NPC logic control function are realized, so that all the players in the same scene can change the terrain in time during the transition, and the content of the game is greatly enriched.
  • the server When multiple players are in the same PVE story, when a certain key task is triggered, the server notifies all clients to play the cutscenes with the plot, and after a certain period of time, simultaneously changes the current scene terrain, enhancing the player's immersion. With the gaming experience.
  • an animated synchronous playback apparatus for implementing the above-described synchronized playback method of an animation, the apparatus being applicable to a server, the apparatus comprising one or more processors, and one or more A memory of a program unit is stored, wherein the program unit is executed by a processor, the program unit comprising: a second acquisition unit 11 and a second synchronization unit 13.
  • the second obtaining unit 11 is configured to acquire first indication information, where the first indication information is used to indicate that the first client and the second client participating in the game play the cutscenes of the game in synchronization.
  • the second synchronization unit 13 is configured to send first indication information to the first client and the second client, to indicate that the first client starts to communicate with the second client when the time on the first client reaches the first moment.
  • the cut-off animation is played synchronously, wherein the first moment is a moment when the first client starts to play the cut-off animation synchronously with the second client on the first client determined based on the first indication information.
  • the apparatus may further include: a third synchronization unit, configured to send the second indication to the first client and the second client after sending the first indication information to the first client and the second client Information, wherein the second indication information is used to indicate the playing progress of the cutscenes, in a case where the playing progress of the cutscenes by the first client and/or the second client is different from the playing progress indicated by the second indication information, The cutscenes are played in the first client and/or the second client in accordance with the playback progress indicated by the second indication information.
  • a third synchronization unit configured to send the second indication to the first client and the second client after sending the first indication information to the first client and the second client Information, wherein the second indication information is used to indicate the playing progress of the cutscenes, in a case where the playing progress of the cutscenes by the first client and/or the second client is different from the playing progress indicated by the second indication information, The cutscenes are played in the first client and/or the second client in accordance with the playback progress indicated by the second indication information
  • the apparatus may further include: a fourth synchronization unit, configured to send the third indication to the first client and the second client after sending the first indication information to the first client and the second client
  • the third indication information is used to indicate that the target content is synchronously displayed in the first client and the second client, and the target content is used to indicate a process in which the non-player control object in the game is changed.
  • the foregoing modules are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the contents disclosed in the foregoing embodiments. It should be noted that the foregoing module may be implemented in a hardware environment as shown in FIG. 1 as part of the device, and may be implemented by software or by hardware, where the hardware environment includes a network environment.
  • an electronic device for implementing the synchronous play method of the above animation which may be a server or a terminal.
  • FIG. 11 is a structural block diagram of an electronic device according to an embodiment of the present application.
  • the electronic device may be a server or a terminal.
  • the electronic device is a terminal as an example.
  • the terminal may include: one or A plurality of (only one is shown in FIG. 11) processor 1101, memory 1103, and transmission device 1105 (such as the transmission device in the above embodiment), as shown in FIG. 11, the terminal may further include an input-output device 1107.
  • the memory 1103 can be configured to store software programs and modules, such as the synchronized play method of the animation in the embodiment of the present application and the program instructions/modules corresponding to the device.
  • the processor 1101 runs the software program and the module stored in the memory 1103. , thereby performing various functional applications and data processing, that is, implementing the above-described synchronized playback method of the animation.
  • Memory 1103 can include high speed random access memory, and can also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid state memory.
  • memory 1103 can further include memory remotely located relative to processor 1101, which can be connected to the terminal over a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
  • the transmission device 1105 described above is arranged to receive or transmit data via a network, and may also be configured as a data transmission between the processor and the memory. Specific examples of the above network may include a wired network and a wireless network.
  • the transmission device 1105 includes a Network Interface Controller (NIC) that can be connected to other network devices and routers via a network cable to communicate with the Internet or a local area network.
  • the transmission device 1105 is a Radio Frequency (RF) module that is configured to communicate with the Internet wirelessly.
  • NIC Network Interface Controller
  • RF Radio Frequency
  • the memory 1103 is set to store an application.
  • the processor 1101 can call the application stored in the memory 1103 through the transmission device 1105 to perform the following steps:
  • the first indication information is used to indicate that the first client and the second client participating in the game play the cut-off animation of the game in synchronization;
  • the cut-off animation is started to be synchronized with the second client when the time on the first client reaches the first moment.
  • the processor 1101 is also configured to perform the following steps:
  • the first indication information is used to indicate that the first client and the second client participating in the game play the cut-off animation of the game in synchronization;
  • the first indication information is obtained on the first client, where the first indication information is used to indicate that the first client and the second client participating in the game play the cut-off animation of the game in synchronization; Determining, according to the first indication information, a first moment, where the first moment is a moment when the cut-off animation starts to be played on the first client; when the time on the first client reaches the first moment, starting to play synchronously with the second client Cut-off animation, the cut-off animation of the first client and the second client of the game is synchronized, which can make the progress of the game consistent, can solve the technical problem of inconsistent game progress caused by playing the cut-off animation, and then achieve the technology to keep the game progress consistent. effect.
  • FIG. 11 is only schematic, and the terminal can be a smart phone (such as an Android mobile phone, an iOS mobile phone, etc.), a tablet computer, a palm computer, and a mobile Internet device (MID). Terminal equipment such as PAD.
  • FIG. 11 does not limit the structure of the above electronic device.
  • the terminal may also include more or less components (such as a network interface, display device, etc.) than shown in FIG. 11, or have a different configuration than that shown in FIG.
  • Embodiments of the present application also provide a storage medium.
  • the above storage medium may be set as a program code for executing a synchronized play method of animation.
  • the foregoing storage medium may be located on at least one of the plurality of network devices in the network shown in the foregoing embodiment.
  • the storage medium is arranged to store program code set to perform the following steps:
  • the first indication information is obtained on the first client, where the first indication information is used to indicate that the first client and the second client participating in the game play the cut-off animation of the game in synchronization;
  • the storage medium is further arranged to store program code for performing the following steps:
  • the first indication information is obtained, where the first indication information is used to indicate that the first client and the second client participating in the game play the cut-off animation of the game in synchronization;
  • the first indication information is sent to the first client and the second client, to indicate that the first client starts to play the cut-off animation synchronously with the second client when the time on the first client reaches the first moment, where The first moment is a moment when the first client starts to play the cut-off animation synchronously with the second client on the first client determined based on the first indication information.
  • the foregoing storage medium may include, but not limited to, a USB flash drive, a Read-Only Memory (ROM), a Random Access Memory (RAM), a mobile hard disk, and a magnetic memory.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • a mobile hard disk e.g., a hard disk
  • magnetic memory e.g., a hard disk
  • the integrated unit in the above embodiment if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in the above-described computer readable storage medium.
  • the technical solution of the embodiments of the present application may be embodied in the form of a software product in the form of a software product in essence or in a part contributing to the related art, and the computer software product is stored in a storage medium.
  • a number of instructions are included to cause one or more computer devices (which may be a personal computer, server or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present application.
  • the disclosed client may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • multiple units or components may be combined or may be Integrate into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, unit or module, and may be electrical or otherwise.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the cut-off animations of the first client and the second client of the game are synchronously played, which can make the progress of the game consistent, and can solve the technical problem that the game progress is inconsistent due to playing the cut-off animation, thereby achieving the game. A consistent technical effect.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Information Transfer Between Computers (AREA)
  • Processing Or Creating Images (AREA)

Abstract

本申请实施例公开了一种动画的同步播放方法和装置、存储介质及电子装置。其中,该方法包括:在第一客户端上获取第一指示信息,其中,第一指示信息用于指示参与一局游戏的第一客户端和第二客户端同步播放一局游戏的过场动画;基于第一指示信息确定第一时刻,其中,第一时刻为在第一客户端上开始播放过场动画的时刻;在第一客户端上的时间到达第一时刻时开始与第二客户端同步播放过场动画。本申请实施例解决了由于播放过场动画造成的游戏进度不一致的技术问题。

Description

动画的同步播放方法和装置、存储介质及电子装置
本申请要求于2017年10月17日提交中国专利局、申请号为201710967202.7、发明名称“动画的同步播放方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及互联网领域,具体而言,涉及一种动画的同步播放方法和装置、存储介质及电子装置。
背景技术
过场是游戏过程中用于连接游戏剧情的逻辑,以动画形式表现,用于突出关键事件与特殊情节。
当玩家当前的游戏状态满足一定条件,如进入一个区域或完成某个任务后就达到播放过场动画的条件,进而自动在游戏客户端播放过场动画。
在相关技术中,是客户端自己判断是否达到播放过场动画的条件,若达到则立即触发在本地客户端播放过场动画这一动作。
对于单个玩家的游戏而言,上述触发条件的处理方案是合理的,但是对于多个玩家合作完成的游戏而言,若还是各个客户端自己判断是否达到播放过场动画的条件并自主触发在本地客户端播放过场动画这一动作,就有可能造成多个玩家本地播放的过场动画不同步,进而造成播放完过场动画后进入游戏的时机不同步,从而影响游戏的进程和游戏体验,如在何时触发游戏中的NPC角色的策略、如何显示未播放完过场动画的队友玩家的信息、是否需要等待所有玩家均播放完毕再进入游戏等游戏进度不一致的问题。
针对由于播放过场动画造成的游戏进度不一致的技术问题,目前尚未 提出有效的解决方案。
发明内容
本申请实施例提供了一种动画的同步播放方法和装置、存储介质及电子装置,以至少解决由于播放过场动画造成的游戏进度不一致的技术问题。
根据本申请实施例的一个方面,提供了一种动画的同步播放方法,该方法包括:在第一客户端上获取第一指示信息,其中,第一指示信息用于指示参与一局游戏的第一客户端和第二客户端同步播放一局游戏的过场动画;基于第一指示信息确定第一时刻,其中,第一时刻为在第一客户端上开始播放过场动画的时刻;在第一客户端上的时间到达第一时刻时开始与第二客户端同步播放过场动画。
根据本申请实施例的一个方面,提供了一种动画的同步播放方法,该方法包括:获取第一指示信息,其中,第一指示信息用于指示参与一局游戏的第一客户端和第二客户端同步播放一局游戏的过场动画;向第一客户端和第二客户端发送第一指示信息,以指示第一客户端在第一客户端上的时间到达第一时刻时开始与第二客户端同步播放过场动画,其中,第一时刻是第一客户端基于第一指示信息确定的在第一客户端上开始与第二客户端同步播放过场动画的时刻。
根据本申请实施例的另一方面,还提供了一种动画的同步播放装置,该装置包括一个或多个处理器,以及一个或多个存储程序单元的存储器,其中,程序单元由处理器执行,该程序单元包括:第一获取单元,被设置为在第一客户端上获取第一指示信息,其中,第一指示信息用于指示参与一局游戏的第一客户端和第二客户端同步播放一局游戏的过场动画;确定单元,被设置为基于第一指示信息确定第一时刻,其中,第一时刻为在第一客户端上开始播放过场动画的时刻;第一同步单元,被设置为在第一客户端上的时间到达第一时刻时开始与第二客户端同步播放过场动画。
根据本申请实施例的另一方面,还提供了一种动画的同步播放装置, 该装置包括一个或多个处理器,以及一个或多个存储程序单元的存储器,其中,程序单元由处理器执行,该程序单元包括:第二获取单元,被设置为获取第一指示信息,其中,第一指示信息用于指示参与一局游戏的第一客户端和第二客户端同步播放一局游戏的过场动画;第二同步单元,被设置为向第一客户端和第二客户端发送第一指示信息,以指示第一客户端在第一客户端上的时间到达第一时刻时开始与第二客户端同步播放过场动画,其中,第一时刻是第一客户端基于第一指示信息确定的在第一客户端上开始与第二客户端同步播放过场动画的时刻。
根据本申请实施例的另一方面,还提供了一种存储介质,该存储介质包括存储的程序,程序运行时执行上述的方法。
根据本申请实施例的另一方面,还提供了一种电子装置,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,处理器通过计算机程序执行上述的方法。
在本申请实施例中,在第一客户端上获取第一指示信息,其中,第一指示信息用于指示参与一局游戏的第一客户端和第二客户端同步播放一局游戏的过场动画;基于第一指示信息确定第一时刻,其中,第一时刻为在第一客户端上开始播放过场动画的时刻;在第一客户端上的时间到达第一时刻时开始与第二客户端同步播放过场动画,游戏第一客户端和第二客户端的过场动画是同步播放的,可以使得游戏进度保持一致,可以解决由于播放过场动画造成的游戏进度不一致的技术问题,进而达到保持游戏进度一致的技术效果。
附图说明
此处所说明的附图用来提供对本申请实施例的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:
图1是根据本申请实施例的动画的同步播放方法的硬件环境的示意图;
图2是根据本申请实施例的一种可选的动画的同步播放方法的流程图;
图3是根据本申请实施例的一种可选的过场动画的示意图;
图4是根据本申请实施例的一种可选的信息发送的示意图;
图5是根据本申请实施例的又一种可选的信息发送的示意图;
图6是根据本申请实施例的又一种可选的动画的同步播放方法的流程图;
图7是根据本申请实施例的又一种可选的过场动画的示意图;
图8是根据本申请实施例的又一种可选的过场动画的示意图;
图9是根据本申请实施例的又一种可选的过场动画的示意图;
图10是根据本申请实施例的又一种可选的动画的同步播放装置的示意图;以及
图11是根据本申请实施例的一种电子装置的结构框图。
具体实施方式
为了使本技术领域的人员更好地理解本申请实施例方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分的实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本申请保护的范围。
需要说明的是,本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或 设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
首先,在对本申请实施例进行描述的过程中出现的部分名词或者术语适用于如下解释:
FPS手游:FPS的英文全称是First-person shooting game,FPS手游即手机运行的第一人称射击游戏。
NPC:英文全称是Non Player Character,非玩家控制的对像,如游戏中的地形碰撞物件。
PVE:英文全称Player VS Environment,玩家根据所设计的剧情与AI进行对战,如多个玩家在同一个场景里相互配合打通一个个带剧情的关卡。
任务系统:根据固定剧情所需完成的一个个关键任务点,由服务器触发并同步到各个客户端做相应的表现。
Unity3D:是一个让玩家轻松创建诸如三维视频游戏、建筑可视化、实时三维动画等类型互动内容的多平台的综合型游戏开发工具,是一个全面整合的专业游戏引擎。
PhysX:读音与Physics相同,是一套物理运算引擎;也是世界三大物理运算引擎之一,另外两种是Havok和Bullet。PhysX物理引擎的演示程序的另外一种含义是指专门计算PhysX引擎的物理加速卡。
根据本申请实施例,提供了一种动画的同步播放方法的方法实施例。
可选地,在本实施例中,上述动画的同步播放方法可以应用于如图1所示的由服务器102和终端104所构成的硬件环境中。如图1所示,服务器102通过网络与终端104进行连接,上述网络包括但不限于:广域网、城域网或局域网,终端104并不限定于PC、手机、平板电脑等。本申请实施例的动画的同步播放方法可以由服务器102来执行,也可以由终端 104来执行,还可以是由服务器102和终端104共同执行。其中,终端104执行本申请实施例的动画的同步播放方法也可以是由安装在其上的客户端来执行。
当本申请实施例的动画的同步播放方法由服务器和终端共同来执行时,由服务器发送指示信息至终端的客户端,此时,由客户端来执行与本申请实施例的方法对应的程序代码。
当本申请实施例的动画的同步播放方法由服务器或终端来单独执行时,直接在服务器或终端上来执行与本申请实施例的方法对应的程序代码即可。
例如,当本申请实施例的方法在服务器上来执行时,可以实现如下功能:
(一)指示同步播放的起始和/或结束时刻
步骤S11,服务器获取第一指示信息,第一指示信息用于指示参与一局游戏的第一客户端和第二客户端同步播放一局游戏的过场动画,第一指示信息携带有按照服务器自己的时钟系统确定的过场动画的播放起始时刻(即第二时刻)和/或播放结束时刻。
步骤S12,服务器向第一客户端和第二客户端发送第一指示信息,以指示第一客户端在第一客户端上的时间到达第一时刻时开始与第二客户端同步播放过场动画,第一时刻是第一客户端基于第一指示信息确定的在第一客户端上开始与第二客户端同步播放过场动画的时刻。
需要说明的是,若第一客户端和第二客户端采用的时钟系统与服务器的时钟系统相同(标准时间一致),则直接按照第一指示信息指示的播放起始时刻和播放结束时刻进行播放即可;若第一客户端和第二客户端采用的时钟系统与服务器的时钟系统不相同,则第一客户端和第二客户需要将指示的播放起始时刻和播放结束时刻转换为自己时钟系统上的时间。
(二)定时指示同步播放的进度
服务器定时向第一客户端和第二客户端发送第二指示信息,第二指示信息用于指示过场动画的播放进度,在第一客户端和/或第二客户端对过场动画的播放进度与第二指示信息指示的播放进度不相同的情况下,在第一客户端和/或第二客户端中按照第二指示信息指示的播放进度对过场动画进行播放。
上述的第二指示信息中指示有在指定时刻(按照服务器的时钟系统确定的时刻)播放的进度为指定进度,而第一客户端和第二客户端可以判断在指定时刻到来时,自己客户端上的播放进度是否为指定进度,若不是,则在指定时刻到来时,从指定进度开始播放。
定时指示同步播放的进度的好处有:1)若客户端根据第一指示信息计算的时间差不准确,可造成客户端之间的播放不同步,通过指定进度可以将客户端之间的播放调整为同步播放;2)客户端中途掉线回来后,可以从指定进度开始播放,以便保持与其余客户端的同步。
(三)指示播放特定的内容
服务器向第一客户端和第二客户端发送第三指示信息,第三指示信息用于指示在第一客户端和第二客户端中同步显示目标内容,目标内容用于表示一局游戏中的非玩家控制对象发生变化的过程。
上述的第三指示信息指示有在某个时刻(按照服务器的时钟系统确定时刻)开始同步播放上述的目标内容,目标内容为非玩家控制对象发生变化的过程,包括但不局限于环境变化过程、AI角色变化过程、场景变化过程。
下面以在服务器或终端上来执行与本申请实施例的方法对应的程序代码为例详述本申请实施例的实施例,
相应地,当本申请实施例的方法在终端上来执行时,可以按照服务器的指示来完成相应的同步功能,图2是根据本申请实施例的一种可选的动画的同步播放方法的流程图,如图2所示,该方法可以包括以下步骤:
步骤S202,在第一客户端上获取第一指示信息,第一指示信息用于指示参与一局游戏的第一客户端和第二客户端同步播放一局游戏的过场动画。
第一客户端和第二客户端上均运行有本申请实施例的方法,本申请实施例的上述方法是以第一客户端所在的终端为方法执行主体来进行描述的,上述的客户端(包括第一客户端和第二客户端)为一局游戏的游戏客户端,这些客户端可以安装在上述的终端上,终端包括但不限定于PC、手机、平板电脑,第二客户端泛指一局游戏中除第一客户端外的其余客户端,第二客户端的数量可以为一个或多个。
第一指示信息的发送形式包括但不局限于:按照约定协议进行发送、按照约定的命令或指令进行发送。此处的第一指示信息是指服务器发送给第一客户端和第二客户端的用来指示过场动画的起始时刻(可能还包括结束时刻)的信息,服务器可以同时将第一指示信息发送给第一客户端和第二客户端,也可以分别在不同的时刻发送给第一客户端和第二客户端。
步骤S204,基于第一指示信息确定第一时刻,第一时刻为在第一客户端上开始播放过场动画的时刻。
第一客户端基于第一指示信息确定第一时刻时,若第一客户端采用的时钟系统与服务器的时钟系统相同(标准时间一致),则直接按照第一指示信息指示的第一时刻进行播放即可;若第一客户端采用的时钟系统与服务器的时钟系统不相同,则第一客户端可将指示的播放起始时刻转换为自己时钟系统上的时间(第一时刻)。
相应地,在第二客户端上执行上述的步骤时,第二客户端也会接收到 上述的第一指示信息,并采用上述类似方法确定按照自己的时钟系统来进行播放的起始时刻。
步骤S206,在第一客户端上的时间到达第一时刻时开始与第二客户端同步播放过场动画。
在第一客户端上,第一客户端从第一时刻开始播放过场动画,而在第二客户端上,第二客户端是从某个时刻开始播放过场动画,某个时刻可能与第一时刻不同,但是都是根据第一指示信息指示的播放起始时刻确定的,所以可以保证第一客户端和第二客户端均是按照服务器指示的播放起始时刻开始播放的。
对于多个玩家合作完成的游戏而言,各个客户端是按照服务器统一指定的播放起始时刻在本地客户端播放过场动画这一动作,使得多个玩家本地播放的过场动画同步进行,进而播放完过场动画后进入游戏的时机是同步的,从而使得游戏的进度得到了统一,提高了游戏体验。
通过上述步骤S202至步骤S206,在第一客户端上获取第一指示信息,其中,第一指示信息用于指示参与一局游戏的第一客户端和第二客户端同步播放一局游戏的过场动画;基于第一指示信息确定第一时刻,其中,第一时刻为在第一客户端上开始播放过场动画的时刻;在第一客户端上的时间到达第一时刻时开始与第二客户端同步播放过场动画,游戏第一客户端和第二客户端的过场动画是同步播放的,可以使得游戏进度保持一致,可以解决由于播放过场动画造成的游戏进度不一致的技术问题,进而达到保持游戏进度一致的技术效果。
在本申请实施例的技术方案中,服务器通过任务系统触发过场任务至客户端,客户端执行过场任务并在规定的时间后,服务器再次通知客户端做场景NPC物件的状态转换来改变场景碰撞信息。同时服务器会根据为NPC所配置的信息来改变服务器所加载场景的物理碰撞信息,使得服务器 与客户端的场景物理信息保持一致。其中任务系统和场景中预设的NPC由客户端配置并导给服务器,服务器读取配置并根据任务条件一一触发相应的任务并同步至客户端进行表现。下面结合图2所示的步骤从三个方面详述本申请的实施例:
(一)确定同步播放的起始时刻和/或结束时刻
在步骤S202提供的技术方案中,在第一客户端上获取第一指示信息,其中,第一指示信息用于指示参与一局游戏的第一客户端和第二客户端同步播放一局游戏的过场动画。
在第一客户端上获取第一指示信息包括两方面的内容:其一是在第一客户端上获取服务器发送的第一指示信息;其二是终端处理器从第一客户端获取到的第一指示信息中获取第一指示信息携带的时间戳和第一指示信息所指示的第二时刻。
上述的时间戳为服务器向第一客户端发送第一指示信息时服务器的时钟系统所在的时刻,第二时刻是按照服务器的时钟系统开始播放过场动画的时刻,时间戳和第二时刻用于获取在第一客户端中过场动画的播放时刻,时间戳和第二时刻还用于获取在第二客户端中过场动画的播放时刻,以使得过场动画在第一客户端和第二客户端上同步播放。
在步骤S204提供的技术方案中,基于第一指示信息确定第一时刻,第一时刻为在第一客户端上按照第一客户端的时钟系统开始播放过场动画的时刻。
可选地,基于第一指示信息确定第一时刻可以通过如下方式实现:
步骤S21,根据第一指示信息携带的时间戳确定第一客户端的时钟系统与服务器的时钟系统之间的时间差DeltaTime,时间戳为服务器向第一客户端发送第一指示信息时服务器的时钟系统所在的时刻。
上述的时间差包括两个组成部分,其一是网络延迟时间,另一个是时间戳差。
(1)确定网络延迟时间PingDeltaTime
获取在服务器与第一客户端传输第一指示信息的网络延迟时间PingDeltaTime,其中,网络延迟时间为第一客户端接收到第一指示信息时服务器的时钟系统所在的时刻T2与第一指示信息携带的时间戳T0之间的差值。
(2)确定时间戳差LogicalDeltaTime
获取服务器与第一客户端的时间戳差LogicalDeltaTime,其中,时间戳差为第一客户端接收到第一指示信息时第一客户端的时钟系统所在的时刻T1与第一指示信息携带的时间戳T0之间的差值。
将网络延迟时间PingDeltaTime与时间戳差LogicalDeltaTime之和设置为第一客户端的时钟系统与服务器的时钟系统之间的时间差DeltaTime。
(3)计算客户端的播放起始时刻LogicalStartTime和/或播放结束时刻LogicalEndTime
步骤S22,将第一指示信息所指示的第二时刻ServerStartTime与时间差DeltaTime之和作为第一时刻,第二时刻是按照服务器的时钟系统开始播放过场动画的时刻。
对于客户端的播放起始时刻(即第一时刻):
LogicalStartTime=ServerStartTime+DeltaTime;
对于客户端的播放结束时刻(即第五时刻):
LogicalEndTime=ServerEndTime+DeltaTime。
在步骤S206提供的技术方案中,在第一客户端上的时间到达第一时 刻时开始与第二客户端同步播放过场动画。
对于服务器而言,可以提前(时间到达第二时刻之前)发送第一指示信息,以便于第一客户端和第二客户端完成时间的转换,在第一客户端和第二客户端完成时间转换之后,在各自的时间到达按照各自的时间系统确定的播放起始时刻时,进行同步播放。
(二)确定同步播放的进度
在第一客户端上的时间到达第一时刻时开始与第二客户端同步播放过场动画之后,服务器可定时向第一客户端和第二客户端发送第二指示信息,以指示在某个时刻过场动画应该所处的播放进度。
步骤S31,服务器定时向第一客户端和第二客户端发送第二指示信息。
可选地,对于过场动画,可以按照播放时长拆分为多个进度,如过场动画时长为60秒,那么可以每10秒拆分为一个进度,即播放时刻为10秒、20秒、30秒、40秒、50秒、60秒分别表示一个进度。
对于每个进度可以提前使用第二指示信息进行指示。如服务器指示按照服务器的时间是在18点15分整开始播放该过场动画,那么可以在18点15分10秒到来前通过第二指示信息指示客户端,在18点15分10秒应该播放至的进度为10秒这个进度。
步骤S32,在第一客户端上获取第二指示信息,第二指示信息用于指示过场动画的播放进度,如的第二指示信息指示,在18点15分10秒应该播放至的进度为10秒这个进度。
步骤S32,在第一客户端对过场动画的播放进度与第二指示信息指示的播放进度不相同的情况下,在第一客户端中按照第二指示信息指示的播放进度对过场动画进行播放。
客户端在18点15分5秒收到时,客户端的播放进度为3秒这个进度, 那么当时间到达18点15分10秒时,播放进度为8秒这个进度,显然是与其余客户端不同步的,此时,客户端可以选择进行调整,其调整的方式包括但不局限于如下两种:
其一是提前调整:为了满足当时间到达18点15分10秒时,进度为10秒这个进度,可以在时间到达18点15分10秒之前,进行进度调整,如在18点15分5秒收到第二指示信息之后,在18点15分6秒,将播放进度从3秒直接调整为6秒这个进度。
其二是按照指示进行调整:为了满足当时间到达18点15分10秒时,进度为10秒这个进度,可以在时间到达18点15分10秒时,进行进度调整,在时间到达18点15分10秒时,直接从第10秒这个进度开始播放。
需要说明的是,上述实施例中均是以服务器的时钟系统为标准来进行描述的,若客户端的时钟系统与服务器的不相同,在上述实施例中客户端还需要按照前述的时钟转换方式进行转换,将服务器指示的时间转换为客户端本地的时间。
(三)播放NPC内容
相关技术中,如图3所示,当需要在播放过场动画期间或之后改变当前场景的地形时,也是由客户端自行处理,客户端自动把预设的需要隐藏或显示的地形物件进行显示或隐藏处理,衔接过场剧情中由于BOSS(即游戏中能力强大的NPC角色)破坏或机关等因素的影响使得当前的场景地形发生变化,用于提高玩家的游戏沉浸感与游戏体验。如在“战争机器”等闯关类游戏中,对于衔接上下情节的过场动画,通常是由客户端自已控制并播放的,在过场结束后也是由客户端自行改变当前场景的地形。同样地,这也在一定程度上影响了游戏进度的一致性,如其中一个客户端未完成地形变化,而其余客户端已经完成,这时候完成的客户端就需要等待,未完成的客户端。
而在本申请实施例中,提供了一种解决方案,在第一客户端上的时间到达第一时刻时开始与第二客户端同步播放过场动画之后,服务器可向第一客户端和第二客户端发送第三指示信息,以指示在第一客户端和第二客户端中同步显示目标内容,目标内容用于表示一局游戏中的非玩家控制对象发生变化的过程。
步骤S41,在第一客户端上获取服务器发送的第三指示信息。
可选地,上述的第三指示信息指示的目标内容包括但不局限于环境变化过程、AI角色变化过程、场景变化过程(如上述地形碰撞事件)。
步骤S42,响应于第三指示信息,在第一客户端中与第二客户端同步显示目标内容。
上述的第三指示信息中指示有客户端开始播放上述的目标内容的时刻(按照服务器的时钟系统的确定的时间),可能还包括结束播放上述的目标内容的时刻。
若客户端的时钟系统与服务器的不相同,则客户端可按照前述的时钟转换方法进行转换。具体如下:第一客户端获取第一客户端的时钟系统与服务器的时钟系统之间的时间差,并获取第三指示信息指示的第三时刻,第三时刻是按照服务器的时钟系统显示目标内容的时刻;获取第三时刻与时间差之和为第四时刻(即第一客户端在本地的时钟系统中开始显示目标内容的时刻)。在第一客户端上的时钟系统到达第四时刻时开始与第二客户端同步显示目标内容。
同理,若第三指示信息还指示有显示结束时刻,也可按照上述方式进行计算获取。
可选地,第一客户端上的时钟系统到达第四时刻时开始与第二客户端同步显示目标内容包括以下两种实现方式:
(1)服务器可以指示在过场动画中发生的非玩家控制对象发生变化的事件,在第四时刻不晚于第五时刻的情况下,在过场动画中显示目标内 容,第五时刻是第一客户端结束播放过场动画的时刻。
(2)服务器可以指示在过场动画播放完成之后发生的非玩家控制对象发生变化的事件,在第四时刻晚于第五时刻的情况下,在一局游戏的游戏画面中显示目标内容。
相关技术中由于场景的变化是由客户端自行处理,服务器上没有相关的碰撞信息,因此无法保证每个玩家的场景是在同一时刻发生变化,造成表现上的不同步,如在当前客户端上看到其它玩家穿过障碍物模型,或玩家悬空的表现,从而影响了游戏体验。本申请实施例通过逻辑对齐服务器与客户端时间,保证每个客户端在服务器的逻辑驱动下经过相同时间的过场后,能同时改变地形等。同时,服务器也有会相应改变场景的物理信息,以与客户端保持一致,保证各个客户端在地形未改变的时候无法穿越或不出现踏空。
作为一种可选的实施例,下面从技术侧进行详述。
(一)专用服务器(Dedicated-Server,DS)网络同步方案
如图4所示,服务器通过UDP协议来实现可靠包(丢包重发机制)的发送,UDP可靠包用于发送本申请实施例的指示信息。
通过本申请实施例的过场地形同步方案,由服务器控制触发过场动画播放流程,服务器控制场景地形NPC发生改变,客户端接收服务器信息只做表现。该技术方案可基于Dedicated-Server(专用服务器DS)网络同步框架实现,该框架下:
(1)服务器拥有完整的游戏逻辑,整个游戏过程主要逻辑都由服务器驱动。
(2)客户端做表现处理,其中玩家与场景的碰撞由客户端处理,由服务器做校正,当服务器下发的位置信息与客户端相差太大,客户端会强 行回扯至服务器位置,以保证同步。
(3)服务器同时也处理场景与玩家间的碰撞信息,并将处理结果(通过第三指示信息)下发给客户端进行表现。
本申请实施例的技术方案可应用于基于Unity引擎为基础开发的移动游戏,该DS同步方案,通过让服务器运行一套与Unity引擎相同版本的PhysX物理组件和Recast Navigation导航组件(Unity引擎中的组件),保证两边对相同数据处理结果一致。服务器通过解析客户端导出的场景的静态物理信息来构建服务器的场景物理世界,同时通过客户端导出的动态NPC信息用于动态改变场景的物理信息。
(二)逻辑时间对齐
多人PVE游戏玩家与服务器可各自维护一套时间系统,且相互间不一致,而在本申请实施例的技术方案中,通过服务器定时下发服务器当前时间至客户端,使各客户端间计算各自的时间系统与服务器的时间系统的时间戳差,通过具体算法,把服务器时间转化为本地时间,进行处理,使得各客户端与服务器的时间触发点保持同步。
如图5所示,时间轴1表示客户端的时钟系统,时间轴2表示服务器的时钟系统,服务器在T0时刻给客户端下发了对时包(如指示信息),客户端在T1时刻收到该包。而服务器这时已经来到T2时刻。
因此网络延迟传输时间差PingDeltaTime=T2-T0。在T0包里服务器带了服务器当前的时间戳,因此可算法客户端与服务器的时间戳差LogicalDeltaTime=T1-T0。因此计算可得服务器与客户端的真实时间戳差为DeltaTime=LogicalDeltaTime+PingDeltaTime。
当同步过场时,服务会下发给客户端播过场预计结束的服务器时间,客户端根据计算的与服务器的时间戳差,进而计算出客户端过场播放结束的时间(把服务器时间转化为客户端时间)。
LogicalEndTime=ServerEndTime+DeltaTime。
(三)NPC状态同步方案
每个NPC在客户端,服务器同时存在一一对应的对象,并有相同的物理碰撞信息,有唯一的ID来标识。当触发过场时客户端1通过逻辑对时已经可以预计过场结束时间(即LogicalEndTime),在时间到达时停止播放过场动画,此时服务器会广播NPC更新物理信息给客户端,客户端1根据服务器的通知进行相应的变化来达到场景动态更新的效果。NPC中可定制的状态属性会在玩家中途加入或断线重连时服务器会同步最新的状态给客户端2,保证客户端2与服务器的一致性。具体实现过程如图6所示:
步骤S601,服务器向客户端1(第一客户端)发送第一指示信息,触发过场动画的播放。
步骤S602,客户端1计算开始时间和结束时间,并播放过场动画。
步骤S603,服务器通过向第一客户端发送第三指示信息,通知更新NPC物理信息。
步骤S604,客户端1和服务器同时更新NPC物理信息。如图7所示,关于能量塔和桥的变化同步,能量塔由发射能量到停止发射能量,桥由未处于连接状态转变为处于连接状态。
步骤S605,客户端2(第二客户端)中途加入游戏(如掉线后加入)。
步骤S606,客户端和服务器同步NPC的最新状态。
(四)关于以本申请实施例的方法实现的游戏(游戏产品)的产品形态
多人PVE作为游戏(如射击游戏、角色扮演游戏等)的一种典型玩法,在过场所推动的游戏剧情中加入过场地形变换系统,丰富了游戏的内容。为了达到在不同客户端上能同时播放过场动画、同时改变场景地形碰撞信息的目的,可以使用本申请实施例提供的方法来统一实现过场过程中地形的变换功能、过场动画的播放功能。
游戏美术师根据过场编辑工具做好过场动画,每个游戏场景物件可通过该工具配置在同一时间戳进行相应的属性变化,如播放动画,播放粒子特效,播放音乐,改变物件位置、大小等属性。工具中每个时间轴可处理一个场景对像。
如图8所示,示出了时间轴上的某个时刻(如第5秒)应该显示的动画帧。
游戏策划根据剧情需要,通过任务系统配置工具,配置好好相应的过场动画触发任务点,并同时在场景中布置所需显示或隐藏的NPC物件,并关联到任务系统。服务器根据配置信息驱动游戏的任务进程并同步到客户端进行表现。如图9所示,待触发的任务的ID为104,这个任务应该在UI任务(ID为6)的特定时刻(如0分第11秒)触发。
通过本申请的上述实施例,实现了过场动画的同步,及NPC逻辑控制功能,能让同一场景的所有玩家在过场期间的地形改变及时、同步,大大丰富了游戏的内容。多个玩家在同一个PVE剧情关中时,当触发某个关键任务后由服务器通知所有客户端播放带剧情的过场动画,并在经过一定时间后,同时改变当前场景地形,增强了玩家的沉浸感与游戏体验。
需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请实施例并不受所描述的动作顺序的限制,因为依据本申请实施例,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本申请实施例所必须的。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请实施例的技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。
本申请实施例的动画的同步播放装置还可以应用在终端上,图10是根据本申请实施例的一种可选的动画的同步播放装置的示意图,如图10所示,该装置可以包括一个或多个处理器,以及一个或多个存储程序单元的存储器,其中,程序单元由处理器执行,该程序单元包括:第一获取单元1001、确定单元1003以及第一同步单元1005。
第一获取单元1001,被设置为在第一客户端上获取第一指示信息,其中,第一指示信息用于指示参与一局游戏的第一客户端和第二客户端同步播放一局游戏的过场动画。
第一客户端和第二客户端上均运行有本申请实施例的方法,本申请实施例的上述方法是以第一客户端所在的终端为方法执行主体来进行描述的,上述的客户端(包括第一客户端和第二客户端)为一局游戏的游戏客户端,这些客户端可以安装在上述的终端上,终端包括但不限定于PC、手机、平板电脑,第二客户端泛指一局游戏中除第一客户端外的其余客户端,第二客户端的数量可以为一个或多个。
第一指示信息的发送形式包括但不局限于:按照约定协议进行发送、按照约定的命令或指令进行发送。此处的第一指示信息是指服务器发送给第一客户端和第二客户端的用来指示过场动画的起始时刻(可能还包括结束时刻)的信息,服务器可以同时将第一指示信息发送给第一客户端和第 二客户端,也可以分别在不同的时刻发送给第一客户端和第二客户端。
确定单元1003,被设置为基于第一指示信息确定第一时刻,其中,第一时刻为在第一客户端上开始播放过场动画的时刻。
第一客户端基于第一指示信息确定第一时刻时,若第一客户端采用的时钟系统与服务器的时钟系统相同(标准时间一致),则直接按照第一指示信息指示的第一时刻进行播放即可;若第一客户端采用的时钟系统与服务器的时钟系统不相同,则第一客户端可将指示的播放起始时刻转换为自己时钟系统上的时间(第一时刻)。
相应地,在第二客户端上执行上述的步骤时,第二客户端也会接收到上述的第一指示信息,并采用上述类似方法确定按照自己的时钟系统来进行播放的起始时刻。
第一同步单元1005,被设置为在第一客户端上的时间到达第一时刻时开始与第二客户端同步播放过场动画。
在第一客户端上,第一客户端从第一时刻开始播放过场动画,而在第二客户端上,第二客户端是从某个时刻开始播放过场动画,某个时刻可能与第一时刻不同,但是都是根据第一指示信息指示的播放起始时刻确定的,所以可以保证第一客户端和第二客户端均是按照服务器指示的播放起始时刻开始播放的。
对于多个玩家合作完成的游戏而言,各个客户端是按照服务器统一指定的播放起始时刻在本地客户端播放过场动画这一动作,使得多个玩家本地播放的过场动画同步进行,进而播放完过场动画后进入游戏的时机是同步的,从而使得游戏的进度得到了统一,提高了游戏体验。
需要说明的是,该实施例中的第一获取单元1001可以被设置为执行本申请实施例中的步骤S202,该实施例中的确定单元1003可以被设置为执行本申请实施例中的步骤S204,该实施例中的第一同步单元1005可以被设置为执行本申请实施例中的步骤S206。
此处需要说明的是,上述模块与对应的步骤所实现的示例和应用场景相同,但不限于上述实施例所公开的内容。需要说明的是,上述模块作为装置的一部分可以运行在如图1所示的硬件环境中,可以通过软件实现,也可以通过硬件实现。
通过上述模块,在第一客户端上获取第一指示信息,其中,第一指示信息用于指示参与一局游戏的第一客户端和第二客户端同步播放一局游戏的过场动画;基于第一指示信息确定第一时刻,其中,第一时刻为在第一客户端上开始播放过场动画的时刻;在第一客户端上的时间到达第一时刻时开始与第二客户端同步播放过场动画,游戏第一客户端和第二客户端的过场动画是同步播放的,可以使得游戏进度保持一致,可以解决由于播放过场动画造成的游戏进度不一致的技术问题,进而达到保持游戏进度一致的技术效果。
在本申请实施例的技术方案中,服务器通过任务系统触发过场任务至客户端,客户端执行过场任务并在规定的时间后,服务器再次通知客户端做场景NPC物件的状态转换来改变场景碰撞信息。同时服务器会根据为NPC所配置的信息来改变服务器所加载场景的物理碰撞信息,使得服务器与客户端的场景物理信息保持一致。其中任务系统和场景中预设的NPC由客户端配置并导给服务器,服务器读取配置并根据任务条件一一触发相应的任务并同步至客户端进行表现。
可选地,第一获取单元还被设置为:获取第一指示信息携带的时间戳和第一指示信息所指示的第二时刻,其中,时间戳为服务器向第一客户端发送第一指示信息时服务器的时钟系统所在的时刻,第二时刻是按照服务器的时钟系统开始播放过场动画的时刻,时间戳和第二时刻用于获取在第一客户端中过场动画的播放时刻,时间戳和第二时刻还用于获取在第二客户端中过场动画的播放时刻,以使得过场动画在第一客户端和第二客户端上同步播放。
可选地,确定单元可包括:确定模块,被设置为根据第一指示信息携 带的时间戳确定第一客户端的时钟系统与服务器的时钟系统之间的时间差,其中,时间戳为服务器向第一客户端发送第一指示信息时服务器的时钟系统所在的时刻;计算模块,被设置为将第一指示信息所指示的第二时刻与时间差之和作为第一时刻,其中,第二时刻是按照服务器的时钟系统开始播放过场动画的时刻。
上述的确定模块还被设置为:获取在服务器与第一客户端传输第一指示信息的网络延迟时间,其中,网络延迟时间为第一客户端接收到第一指示信息时服务器的时钟系统所在的时刻与第一指示信息携带的时间戳之间的差值;获取服务器与第一客户端的时间戳差,其中,时间戳差为第一客户端接收到第一指示信息时第一客户端的时钟系统所在的时刻与第一指示信息携带的时间戳之间的差值;将网络延迟时间与时间戳差之和设置为第一客户端的时钟系统与服务器的时钟系统之间的时间差。
可选地,本申请实施例的装置还可以包括第五同步单元,被设置为:在第一客户端上获取第二指示信息,其中,第二指示信息用于指示过场动画的播放进度;在第一客户端对过场动画的播放进度与第二指示信息指示的播放进度不相同的情况下,在第一客户端中按照第二指示信息指示的播放进度对过场动画进行播放。
可选地,本申请实施例的装置还可以包括第六同步单元,被设置为,在第一客户端上获取第三指示信息,其中,第三指示信息用于指示在第一客户端和第二客户端中同步显示目标内容,目标内容用于表示一局游戏中的非玩家控制对象发生变化的过程;响应于第三指示信息,在第一客户端中与第二客户端同步显示目标内容。
上述的第六同步单元还被设置为获取第一客户端的时钟系统与服务器的时钟系统之间的时间差,并获取第三指示信息指示的第三时刻,其中,第三时刻是按照服务器的时钟系统显示目标内容的时刻;获取第三时刻与时间差之和为第四时刻;在第一客户端上的时钟系统到达第四时刻时开始与第二客户端同步显示目标内容。
可选地,上述第六同步单元还被设置为在第四时刻不晚于第五时刻的情况下,在过场动画中显示目标内容,其中,第五时刻是第一客户端结束播放过场动画的时刻;在第四时刻晚于第五时刻的情况下,在一局游戏的游戏画面中显示目标内容。
通过本申请的上述实施例,实现了过场动画的同步,及NPC逻辑控制功能,能让同一场景的所有玩家在过场期间的地形改变及时、同步,大大丰富了游戏的内容。多个玩家在同一个PVE剧情关中时,当触发某个关键任务后由服务器通知所有客户端播放带剧情的过场动画,并在经过一定时间后,同时改变当前场景地形,增强了玩家的沉浸感与游戏体验。
根据本申请实施例,还提供了一种用于实施上述动画的同步播放方法的动画的同步播放装置,该装置可以应用在服务器上,该装置包括一个或多个处理器,以及一个或多个存储程序单元的存储器,其中,程序单元由处理器执行,该程序单元包括:第二获取单元11和第二同步单元13。
第二获取单元11,被设置为获取第一指示信息,第一指示信息用于指示参与一局游戏的第一客户端和第二客户端同步播放一局游戏的过场动画。
第二同步单元13,被设置为向第一客户端和第二客户端发送第一指示信息,以指示第一客户端在第一客户端上的时间到达第一时刻时开始与第二客户端同步播放过场动画,其中,第一时刻是第一客户端基于第一指示信息确定的在第一客户端上开始与第二客户端同步播放过场动画的时刻。
可选地,该装置还可以包括:第三同步单元,被设置为在向第一客户端和第二客户端发送第一指示信息之后,向第一客户端和第二客户端发送第二指示信息,其中,第二指示信息用于指示过场动画的播放进度,在第一客户端和/或第二客户端对过场动画的播放进度与第二指示信息指示的播放进度不相同的情况下,在第一客户端和/或第二客户端中按照第二指示 信息指示的播放进度对过场动画进行播放。
可选地,该装置还可以包括:第四同步单元,被设置为在向第一客户端和第二客户端发送第一指示信息之后,向第一客户端和第二客户端发送第三指示信息,第三指示信息用于指示在第一客户端和第二客户端中同步显示目标内容,目标内容用于表示一局游戏中的非玩家控制对象发生变化的过程。
此处需要说明的是,上述模块与对应的步骤所实现的示例和应用场景相同,但不限于上述实施例所公开的内容。需要说明的是,上述模块作为装置的一部分可以运行在如图1所示的硬件环境中,可以通过软件实现,也可以通过硬件实现,其中,硬件环境包括网络环境。
根据本申请实施例,还提供了一种用于实施上述动画的同步播放方法的电子装置,该电子装置可以是服务器或终端。
图11是根据本申请实施例的一种电子装置的结构框图,该电子装置可以是服务器或终端,以该电子装置是终端为例进行说明,如图11所示,该终端可以包括:一个或多个(图11中仅示出一个)处理器1101、存储器1103、以及传输装置1105(如上述实施例中的发送装置),如图11所示,该终端还可以包括输入输出设备1107。
其中,存储器1103可被设置为存储软件程序以及模块,如本申请实施例中的动画的同步播放方法和装置对应的程序指令/模块,处理器1101通过运行存储在存储器1103内的软件程序以及模块,从而执行各种功能应用以及数据处理,即实现上述的动画的同步播放方法。存储器1103可包括高速随机存储器,还可以包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器1103可进一步包括相对于处理器1101远程设置的存储器,这些远程存储器可以通过网络连接至终端。上述网络的实例包括但不限于互联网、企业 内部网、局域网、移动通信网及其组合。
上述的传输装置1105被设置为经由一个网络接收或者发送数据,还可以被设置为处理器与存储器之间的数据传输。上述的网络具体实例可包括有线网络及无线网络。在一个实例中,传输装置1105包括一个网络适配器(Network Interface Controller,NIC),其可通过网线与其他网络设备与路由器相连从而可与互联网或局域网进行通讯。在一个实例中,传输装置1105为射频(Radio Frequency,RF)模块,其被设置为通过无线方式与互联网进行通讯。
其中,具体地,存储器1103被设置为存储应用程序。
处理器1101可以通过传输装置1105调用存储器1103存储的应用程序,以执行下述步骤:
在第一客户端上获取第一指示信息,其中,第一指示信息用于指示参与一局游戏的第一客户端和第二客户端同步播放一局游戏的过场动画;
基于第一指示信息确定第一时刻,其中,第一时刻为在第一客户端上开始播放过场动画的时刻;
在第一客户端上的时间到达第一时刻时开始与第二客户端同步播放过场动画。
处理器1101还被设置为执行下述步骤:
获取第一指示信息,其中,第一指示信息用于指示参与一局游戏的第一客户端和第二客户端同步播放一局游戏的过场动画;
向第一客户端和第二客户端发送第一指示信息,以指示第一客户端在第一客户端上的时间到达第一时刻时开始与第二客户端同步播放过场动画,其中,第一时刻是第一客户端基于第一指示信息确定的在第一客户端上开始与第二客户端同步播放过场动画的时刻。
采用本申请实施例,在第一客户端上获取第一指示信息,其中,第一 指示信息用于指示参与一局游戏的第一客户端和第二客户端同步播放一局游戏的过场动画;基于第一指示信息确定第一时刻,其中,第一时刻为在第一客户端上开始播放过场动画的时刻;在第一客户端上的时间到达第一时刻时开始与第二客户端同步播放过场动画,游戏第一客户端和第二客户端的过场动画是同步播放的,可以使得游戏进度保持一致,可以解决由于播放过场动画造成的游戏进度不一致的技术问题,进而达到保持游戏进度一致的技术效果。
可选地,本实施例中的具体示例可以参考上述实施例中所描述的示例,本实施例在此不再赘述。
本领域普通技术人员可以理解,图11所示的结构仅为示意,终端可以是智能手机(如Android手机、iOS手机等)、平板电脑、掌上电脑以及移动互联网设备(Mobile Internet Devices,MID)、PAD等终端设备。图11其并不对上述电子装置的结构造成限定。例如,终端还可包括比图11中所示更多或者更少的组件(如网络接口、显示装置等),或者具有与图11所示不同的配置。
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令终端设备相关的硬件来完成,该程序可以存储于一计算机可读存储介质中,存储介质可以包括:闪存盘、只读存储器(Read-Only Memory,ROM)、随机存取器(Random Access Memory,RAM)、磁盘或光盘等。
本申请的实施例还提供了一种存储介质。可选地,在本实施例中,上述存储介质可以被设置为执行动画的同步播放方法的程序代码。
可选地,在本实施例中,上述存储介质可以位于上述实施例所示的网络中的多个网络设备中的至少一个网络设备上。
可选地,在本实施例中,存储介质被设置为存储被设置为执行以下步 骤的程序代码:
S51,在第一客户端上获取第一指示信息,其中,第一指示信息用于指示参与一局游戏的第一客户端和第二客户端同步播放一局游戏的过场动画;
S52,基于第一指示信息确定第一时刻,其中,第一时刻为在第一客户端上开始播放过场动画的时刻;
S53,在第一客户端上的时间到达第一时刻时开始与第二客户端同步播放过场动画。
可选地,存储介质还被设置为存储用于执行以下步骤的程序代码:
S61,获取第一指示信息,其中,第一指示信息用于指示参与一局游戏的第一客户端和第二客户端同步播放一局游戏的过场动画;
S62,向第一客户端和第二客户端发送第一指示信息,以指示第一客户端在第一客户端上的时间到达第一时刻时开始与第二客户端同步播放过场动画,其中,第一时刻是第一客户端基于第一指示信息确定的在第一客户端上开始与第二客户端同步播放过场动画的时刻。
可选地,本实施例中的具体示例可以参考上述实施例中所描述的示例,本实施例在此不再赘述。
可选地,在本实施例中,上述存储介质可以包括但不限于:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
上述实施例中的集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在上述计算机可读取的存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对相关技术做出 贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在存储介质中,包括若干指令用以使得一台或多台计算机设备(可为个人计算机、服务器或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。
在本申请的上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。
在本申请所提供的几个实施例中,应该理解到,所揭露的客户端,可通过其它的方式实现。其中,以上所描述的装置实施例仅仅是示意性的,例如所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,单元或模块的间接耦合或通信连接,可以是电性或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
以上所述仅是本申请实施例的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本申请实施例原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本申请实施例的保护范围。
工业实用性
在本申请实施例中,游戏第一客户端和第二客户端的过场动画是同步 播放的,可以使得游戏进度保持一致,可以解决由于播放过场动画造成的游戏进度不一致的技术问题,进而达到保持游戏进度一致的技术效果。

Claims (15)

  1. 一种动画的同步播放方法,包括:
    在第一客户端上获取第一指示信息,其中,所述第一指示信息用于指示参与一局游戏的所述第一客户端和第二客户端同步播放所述一局游戏的过场动画;
    基于所述第一指示信息确定第一时刻,其中,所述第一时刻为在所述第一客户端上开始播放所述过场动画的时刻;
    在所述第一客户端上的时间到达所述第一时刻时开始与所述第二客户端同步播放所述过场动画。
  2. 根据权利要求1所述的方法,其中,在第一客户端上获取第一指示信息包括:
    获取所述第一指示信息携带的时间戳和所述第一指示信息所指示的第二时刻,其中,所述时间戳为服务器向所述第一客户端发送所述第一指示信息时所述服务器的时钟系统所在的时刻,所述第二时刻是按照所述服务器的时钟系统开始播放所述过场动画的时刻,所述时间戳和所述第二时刻用于获取在所述第一客户端中所述过场动画的播放时刻,所述时间戳和所述第二时刻还用于获取在所述第二客户端中所述过场动画的播放时刻,以使得所述过场动画在所述第一客户端和所述第二客户端上同步播放。
  3. 根据权利要求2所述的方法,其中,基于所述第一指示信息确定第一时刻包括:
    根据所述第一指示信息携带的所述时间戳确定所述第一客户端的时钟系统与服务器的时钟系统之间的时间差;
    将所述第一指示信息所指示的所述第二时刻与所述时间差之和作为所述第一时刻。
  4. 根据权利要求3所述的方法,其中,根据所述第一指示信息携带的时 间戳确定所述第一客户端的时钟系统与服务器的时钟系统之间的时间差包括:
    获取在所述服务器与所述第一客户端传输所述第一指示信息的网络延迟时间,其中,所述网络延迟时间为所述第一客户端接收到所述第一指示信息时所述服务器的时钟系统所在的时刻与所述第一指示信息携带的时间戳之间的差值;
    获取所述服务器与所述第一客户端的时间戳差,其中,所述时间戳差为所述第一客户端接收到所述第一指示信息时所述第一客户端的时钟系统所在的时刻与所述第一指示信息携带的时间戳之间的差值;
    将所述网络延迟时间与所述时间戳差之和设置为所述第一客户端的时钟系统与所述服务器的时钟系统之间的时间差。
  5. 根据权利要求1或2所述的方法,其中,在所述第一客户端上的时间到达所述第一时刻时开始与所述第二客户端同步播放所述过场动画之后,所述方法还包括:
    在所述第一客户端上获取第二指示信息,其中,所述第二指示信息用于指示所述过场动画的播放进度;
    在所述第一客户端对所述过场动画的播放进度与所述第二指示信息指示的播放进度不相同的情况下,在所述第一客户端中按照所述第二指示信息指示的播放进度对所述过场动画进行播放。
  6. 根据权利要求1或2所述的方法,其中,在所述第一客户端上的时间到达所述第一时刻时开始与所述第二客户端同步播放所述过场动画之后,所述方法还包括:
    在所述第一客户端上获取第三指示信息,其中,所述第三指示信息用于指示在所述第一客户端和所述第二客户端中同步显示目标内容,所述目标内容用于表示所述一局游戏中的非玩家控制对象发生变化的过程;
    响应于所述第三指示信息,在所述第一客户端中与所述第二客户端同步显示所述目标内容。
  7. 根据权利要求6所述的方法,其中,
    在所述第一客户端中与所述第二客户端同步显示所述目标内容之前,所述方法还包括:获取所述第一客户端的时钟系统与服务器的时钟系统之间的时间差,并获取所述第三指示信息指示的第三时刻,其中,所述第三时刻是按照所述服务器的时钟系统显示所述目标内容的时刻;获取所述第三时刻与所述时间差之和为第四时刻;
    在所述第一客户端中与所述第二客户端同步显示所述目标内容包括:在所述第一客户端上的时钟系统到达所述第四时刻时开始与所述第二客户端同步显示所述目标内容。
  8. 根据权利要求7所述的方法,其中,所述第一客户端上的时钟系统到达所述第四时刻时开始与所述第二客户端同步显示所述目标内容包括:
    在所述第四时刻不晚于第五时刻的情况下,在所述过场动画中显示所述目标内容,其中,所述第五时刻是所述第一客户端结束播放所述过场动画的时刻;
    在所述第四时刻晚于所述第五时刻的情况下,在所述一局游戏的游戏画面中显示所述目标内容。
  9. 一种动画的同步播放方法,包括:
    确定第一指示信息,其中,所述第一指示信息用于指示参与一局游戏的第一客户端和第二客户端同步播放所述一局游戏的过场动画;
    向所述第一客户端和所述第二客户端发送所述第一指示信息,以指示所述第一客户端在所述第一客户端上的时间到达第一时刻时开始与所述第二客户端同步播放所述过场动画,其中,所述第一时刻是所述第一客户端基于所述第一指示信息确定的在所述第一客户端上开始与所述第二客户端同步播放所述过场动画的时刻。
  10. 根据权利要求9所述的方法,其中,在向所述第一客户端和所述第二客户端发送所述第一指示信息之后,所述方法还包括:
    向所述第一客户端和所述第二客户端发送第二指示信息,其中,所述第二指示信息用于指示所述过场动画的播放进度,在所述第一客户端和/或所述第二客户端对所述过场动画的播放进度与所述第二指示信息指示的播放进度不相同的情况下,在所述第一客户端和/或所述第二客户端中按照所述第二指示信息指示的播放进度对所述过场动画进行播放。
  11. 根据权利要求9所述的方法,其中,在向所述第一客户端和所述第二客户端发送所述第一指示信息之后,所述方法还包括:
    向所述第一客户端和所述第二客户端发送第三指示信息,其中,所述第三指示信息用于指示在所述第一客户端和所述第二客户端中同步显示目标内容,所述目标内容用于表示所述一局游戏中的非玩家控制对象发生变化的过程。
  12. 一种动画的同步播放装置,包括一个或多个处理器,以及一个或多个存储程序单元的存储器,其中,所述程序单元由所述处理器执行,所述程序单元包括:
    第一获取单元,被设置为在第一客户端上获取第一指示信息,其中,所述第一指示信息用于指示参与一局游戏的所述第一客户端和第二客户端同步播放所述一局游戏的过场动画;
    确定单元,被设置为基于所述第一指示信息确定第一时刻,其中,所述第一时刻为在所述第一客户端上开始播放所述过场动画的时刻;
    第一同步单元,被设置为在所述第一客户端上的时间到达所述第一时刻时开始与所述第二客户端同步播放所述过场动画。
  13. 一种动画的同步播放装置,包括一个或多个处理器,以及一个或多个存储程序单元的存储器,其中,所述程序单元由所述处理器执行,所述程序单元包括:
    第二获取单元,被设置为确定第一指示信息,其中,所述第一指示信息用于指示参与一局游戏的第一客户端和第二客户端同步播放所述一局游戏的过场动画;
    第二同步单元,被设置为向所述第一客户端和所述第二客户端发送所述第一指示信息,以指示所述第一客户端在所述第一客户端上的时间到达第一时刻时开始与所述第二客户端同步播放所述过场动画,其中,所述第一时刻是所述第一客户端基于所述第一指示信息确定的在所述第一客户端上开始与所述第二客户端同步播放所述过场动画的时刻。
  14. 一种存储介质,所述存储介质包括存储的程序,其中,所述程序运行时执行上述权利要求1至8,或权利要求9至11中任一项所述的方法。
  15. 一种电子装置,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器通过所述计算机程序执行上述权利要求1至8,或权利要求9至11中任一项所述的方法。
PCT/CN2018/110566 2017-10-17 2018-10-17 动画的同步播放方法和装置、存储介质及电子装置 WO2019076309A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US16/583,179 US11229842B2 (en) 2017-10-17 2019-09-25 Method and apparatus for synchronously playing animation, storage medium, and electronic apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710967202.7 2017-10-17
CN201710967202.7A CN109672918B (zh) 2017-10-17 2017-10-17 动画的同步播放方法和装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/583,179 Continuation US11229842B2 (en) 2017-10-17 2019-09-25 Method and apparatus for synchronously playing animation, storage medium, and electronic apparatus

Publications (1)

Publication Number Publication Date
WO2019076309A1 true WO2019076309A1 (zh) 2019-04-25

Family

ID=66141404

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/110566 WO2019076309A1 (zh) 2017-10-17 2018-10-17 动画的同步播放方法和装置、存储介质及电子装置

Country Status (3)

Country Link
US (1) US11229842B2 (zh)
CN (1) CN109672918B (zh)
WO (1) WO2019076309A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111225263A (zh) * 2020-01-17 2020-06-02 广州虎牙科技有限公司 视频播放控制方法和装置、电子设备及存储介质
CN112221120A (zh) * 2020-10-15 2021-01-15 网易(杭州)网络有限公司 游戏状态同步方法、装置、电子设备及存储介质

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111586096A (zh) * 2020-03-31 2020-08-25 完美世界(北京)软件科技发展有限公司 一种数据处理方法和设备
CN112004132B (zh) * 2020-09-02 2022-10-21 北京猿力未来科技有限公司 一种视频同步播放方法及装置
CN113068250B (zh) * 2021-04-01 2023-07-18 广东电网有限责任公司清远供电局 一种时间同步装置、方法、设备及存储介质
CN113365126B (zh) * 2021-05-24 2023-02-21 武汉乐谷在线科技有限公司 一种游戏数据同步方法及系统、设备、存储介质
CN116932223B (zh) * 2023-08-17 2024-01-26 北京久幺幺科技有限公司 集成于安卓应用中的Unity引擎的游戏控制方法和Unity引擎

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007024289A2 (en) * 2005-05-06 2007-03-01 Microsoft Corporation Dynamic frame system
CN102497447A (zh) * 2011-12-26 2012-06-13 北京像素软件科技股份有限公司 网络游戏场景关卡声光效果的多用户同步方法
US20120249806A1 (en) * 2011-03-31 2012-10-04 Gong Michelle X Collaborative image control
CN106559426A (zh) * 2016-11-24 2017-04-05 腾讯科技(深圳)有限公司 一种基于帧同步的数据处理方法和服务器以及客户端
CN106730836A (zh) * 2016-12-22 2017-05-31 Tcl集团股份有限公司 一种减少arpg游戏网络延时的方法及系统

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101262494A (zh) * 2008-01-23 2008-09-10 华为技术有限公司 对发布信息进行处理的方法、客户端、服务器和系统
CN101577715A (zh) * 2009-06-19 2009-11-11 腾讯科技(深圳)有限公司 一种同步网络游戏时间的方法及装置
JP5227389B2 (ja) * 2010-12-07 2013-07-03 株式会社スクウェア・エニックス ネットワークゲームシステム、ゲーム装置、及びプログラム
CN105099649B (zh) * 2015-08-14 2018-10-16 宋亚玲 一种网络时间同步嵌入的方法和系统
US9798515B1 (en) * 2016-03-31 2017-10-24 Bose Corporation Clock synchronization for audio playback devices

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007024289A2 (en) * 2005-05-06 2007-03-01 Microsoft Corporation Dynamic frame system
US20120249806A1 (en) * 2011-03-31 2012-10-04 Gong Michelle X Collaborative image control
CN102497447A (zh) * 2011-12-26 2012-06-13 北京像素软件科技股份有限公司 网络游戏场景关卡声光效果的多用户同步方法
CN106559426A (zh) * 2016-11-24 2017-04-05 腾讯科技(深圳)有限公司 一种基于帧同步的数据处理方法和服务器以及客户端
CN106730836A (zh) * 2016-12-22 2017-05-31 Tcl集团股份有限公司 一种减少arpg游戏网络延时的方法及系统

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111225263A (zh) * 2020-01-17 2020-06-02 广州虎牙科技有限公司 视频播放控制方法和装置、电子设备及存储介质
CN111225263B (zh) * 2020-01-17 2022-06-14 广州虎牙科技有限公司 视频播放控制方法和装置、电子设备及存储介质
CN112221120A (zh) * 2020-10-15 2021-01-15 网易(杭州)网络有限公司 游戏状态同步方法、装置、电子设备及存储介质

Also Published As

Publication number Publication date
US20200016489A1 (en) 2020-01-16
US11229842B2 (en) 2022-01-25
CN109672918B (zh) 2020-11-03
CN109672918A (zh) 2019-04-23

Similar Documents

Publication Publication Date Title
WO2019076309A1 (zh) 动画的同步播放方法和装置、存储介质及电子装置
US11050823B2 (en) Method, apparatus, and system for playing scene animation
EP3713653B1 (en) Temporary game control by user simulation following loss of active control
JP7169338B2 (ja) ゲームコンテンツの同期表示に関する方法、装置およびコンピュータプログラム
US9526995B2 (en) Video game recording and playback with visual display of game controller manipulation
CN102968549B (zh) 基于智能移动终端设备的多人在线交互方法与系统
US9089777B2 (en) Restoring gameplay by replaying past inputs
US9675885B2 (en) Game system, a controlling method of the game system thereof, and a non-transitory computer-readable storage medium thereof
CN111744177B (zh) 游戏数据处理方法和装置、存储介质和电子设备
EP2800365A1 (en) Video playback system
CN114344892B (zh) 一种数据处理方法和相关装置
US20190262707A1 (en) Method and system of creating a network to facilitate a multiplayer game
CN108261762A (zh) 数据同步方法和装置、存储介质及电子装置
CN113274727A (zh) 直播交互方法、装置和存储介质及电子设备
JP6423974B1 (ja) コンテンツ処理システム、コンテンツ処理方法、タイマー制御サーバおよびタイマー制御プログラム
CN106861192B (zh) 事件执行方法和装置
CN111970268B (zh) 一种观战数据展示方法、设备及计算机可读存储介质
CN111821696B (zh) 一种游戏观战的方法及装置、电子设备、存储介质
CN109857567A (zh) 一种ai状态信息的同步方法和装置
KR101528491B1 (ko) 게임서버 기준에 의한 로컬 클라이언트와 리모트 클라이언트에서의 프레임 동기화 방법 및 그 시스템
KR20050068360A (ko) 네트워크 게임에서의 동기화 방법 및 그 방법이 구현된게임 프로그램을 기록한 컴퓨터가 읽을 수 있는 기록매체
JP2022125598A (ja) ゲームシステム及びプログラム
CN111111208A (zh) 目标应用的启动方法和装置、存储介质及电子装置
JP2021115128A (ja) 配信システム、配信システム用のコンピュータプログラム、及び配信用映像の作成方法
CN116248739A (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: 18869136

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18869136

Country of ref document: EP

Kind code of ref document: A1