METHOD AND APPARATUS FOR SYNCHRONIZING THE ANIMATION SPEED OF MULTIPLE VIDEO GAME SYSTEMS IN A NETWORKED ENVIRONMENT FIEIP OF THE INVENTION
The present invention relates to the field of video game systems. Specifically, the present invention pertains to synchronization of the animation of multiple video game systems in a networked environment.
REFERENCE TO RELATED PATENT APPLICATIONS
The following co-pending patent applications are related: U.S. Patent Application entitled, "AN IMPROVED NETWORK ARCHITECTURE TO SUPPORT REAL-TIME VIDEO GAMES", invented by Steve
Perlman, with serial no. and filed on .
U.S. Patent Application entitled, "AN IMPROVED NETWORK
ARCHITECTURE TO SUPPORT MULTIPLE SITE REAL-TIME VIDEO GAMES", invented by Steve Perlman, with serial no. and filed on
U.S. Patent Application entitled, "AN IMPROVED MODEM TO SUPPORT MULTIPLE SITE CALL CONFERENCED DATA COMMUNICATIONS", invented by Steve Perlman, with serial no. and filed on
U.S. Patent Application entitled, "AN IMPROVED NETWORK ARCHITECTURE TO SUPPORT RECORDING AND PLAYBACK OF REAL-TIME
VIDEO GAMES", invented by Steve Perlman, with serial no. and filed on .
U.S. Patent Application entitled, "METHOD AND APPARATUS FOR
LOOSELY SYNCHRONIZING CLOSED FREE-RUNNING RASTER DISPLAYS", invented by Steve Perlman and Steve Roskowski, with serial no. and filed concurrently with the present application.
DESCRIPTION OF RELATED ART
When synchronizing two or more freely running video game systems communicating over a network, it is often desirable to have all systems execute code independently that results in the same game
behavior. Certain factors, such as animation speed regulation, can affect the outcome of a game.
Some video games always complete a game loop within one frame time. For these systems, it is not necessary to throttle the speed of game loop execution. For more complicated games, however, a single game loop may span more than one frame time. This situation presents no problem for the synchronization apparatus of the present invention as long as the length of the game loop is a fixed length of time. However, some video games dynamically alter the animation speed in the course of execution by measuring the elapsed time in prior game loops. The decision is based on local system timing parameters.which may vary among the systems; thus, it is possible for a master and slave system running the same game code and using exactly the same controller input data to produce a different length game loop and therefore use different animation speed predictors. This phenomenon makes it very difficult to synchronize these systems over a network; because different animation speeds can result in different game outcomes. Prior art systems have been unable to solve this problem.
Thus, a better means and method for synchronizing the animation speed of multiple video game systems in a networked environment is needed.
SUMMARY OF THE INVENTION
The present invention defines a protocol for synchronizing the animation speed of multiple video game systems connected over a network. This protocol assures that each system remains in game loop synchronization with other systems. The player controller inputs are always directed to the correct game loop on each system.
The present invention specifies that a master video game system determines the number of frames that have passed in a game loop and uses that information as a predictor of future game loop duration. The master sends this prediction along with game controller data to the slave system. The master delays the prediction in a read FIFO for its own internal use. The read FIFO delay matches the network latency so that
the slave and master use the same predictor in their game execution logic. Thus, the master and slave remain in game loop synchronization.
BRIEF DESCRIPTION OF THE DRAWINGS
Figures 1 and 3 illustrate the variable number of frames per game loop and the messages used by the present invention for regulating the speed of an animation.
Figure 2 illustrates the queueing system used in the preferred embodiment.
Figure 4 illustrates two video game systems connected via a communication medium.
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT
The present invention is a means and method for synchronizing the animation speed of multiple video game systems in a networked environment. In the following detailed description, numerous specific details are set forth in order to provide a thorough understanding of the present invention. However, it will be apparent to one of ordinary skill in the art that these specific details need not be used to practice the present invention. In other instances, well known structures, interfaces, and processes have not been shown in detail in order not to unnecessarily obscure the present invention.
The preferred embodiment of the present invention operates in the context of a networked video game system. In a networked video game system, a first video game system is coupled to a second video game system via a communication medium. Such a configuration is illustrated in Figure 4.
Referring now to Figure 4, a simplified diagram illustrates two video game systems 510 and 520 connected via a communication medium 505. For purposes of the following description, game system 510 is denoted the master and game system 520 is denoted the slave. It will be apparent to those of ordinary skill in the art that the designation of a particular system as master or slave is purely arbitrary.
ln the preferred embodiment, the communication medium 505 is the standard telephone network and the first and second video game systems are direct connected via a direct telephone call initiated by one of the video game systems. The details of establishing this interconnection of video game systems via the telephone network is described in detail in the above-referenced co-pending patent applications. The video game system initiating the telephone call is denoted the master system. The video game system receiving the telephone call is denoted the slave system. Except in some circumstances, it makes no difference which video game system initiates the telephone call and becomes master.
Some video games always complete a game loop within one frame time. For these systems, it is not necessary to throttle the speed of game loop execution. For more complicated games, however, a single game loop may span more than one frame time. This situation presents no problem for the synchronization apparatus of the present invention as long as the length of the game loop is a fixed length of time. However, some video games dynamically alter the animation speed in the course of execution by measuring the elapsed time in prior game loops. The decision is based on local system timing parameters, which may vary among the systems; thus, it is possible for a master and slave system running the same game code and using exactly the same controller input data to produce a different length game loop and therefore use different animation speed predictors. This phenomenon makes it very difficult to synchronize these systems over a network; because different animation speeds can result in different game outcomes. This phenomenon is illustrated in Figure 1. In Figure 1 , a substantially similar master and slave system are executing substantially the same processor instructions for game loops (GLa, GLb, and GLc) which span frames using the same controller input. However, the master system produces three frames for game loop GLa while the slave system produces only two frames for the same game loop. This discrepancy can result from a variety of reasons. For example, if the systems or software are at all different or even if the systems and
software are identical, there may be a difference between the phase of the instruction that may cause the systems to execute differently. If the frame count is used as a factor in any processing decisions, this effect will disturb the synchronization between the two systems.
Prior art video games frequently use frame count per game loop (eg. GLa=2 or GLb=3) as a determinant of animation speed for future game loops. If the master and slave have a different frame count per game loop, the animnation speed will differ between them and synchronization will be lost.
The present invention solves this problem by providing a means for predicting the number of frames needed for a particular game loop and for synchronizing the use of this information by the slave system.
Referring to Figure 3, a time line illustrates the game loop timing for a master and a slave system. In this example, the network transmission latency between the master and the slave is two frame times. It will be apparent to one of ordinary skill in the art that a greater or lesser latency is equivalents supported by the present invention. In Figure 3, a message sent by the master at time F0 arrives at the slave at time F2. These messages comprise game controller data during run mode operation of the system. The present invention augments these messages sent by the master to add a game loop prediction value that specifies the number of frames that are expected to be used in game loops in the near future. As a reasonable estimate for the number of frames needed for game loops in the near future, the present invention uses the number of frames needed in the previous and most recent game loop. Empirical analysis has shown that it is often the case that the execution time of a given game loop is usually a good predictor of game loops in the near future.
Figure 2 shows a simplified block diagram of the presently preferred embodiment. Both systems have a user controller device 320 such as a joystick in a Sega Genesis system. Data read from the user controller device 320 is sent directly to the modem to the other system. Since the modem and network both introduce latency to the data, a read FIFO 316 is used to delay the read controller data appropriately to
correspond to the modem and network latency. Thus, the game execution logic 355 of both systems will operate on the same controller data for a given game loop. Thus, synchronous execution will be maintained.
It is necessary to ensure that the master and slave systems both use the same predictor of frames per game loop. Otherwise, animation speed will vary and synchronization between the two systems will be lost. If the master and slave systems were allowed to execute without modification, the length of the game loops executed by the master and slave would eventually be different and a different predictor would be used by each system.
Thus, the present invention uses the master system prediction of the number of frames per game loop to drive both the master system game loop and the slave system game loop. The master sends its game loop prediction value along with the corresponding game controller data in messages across the network to the slave system. Because the game loop prediction is applied to the game execution logic in correspondence with the game controller data associated with a particular game loop, the slave system can always apply the master systems' prediction value to the appropriate slave system game loop. Any game loop prediction value generated by the slave system in its normal course of processing is replaced by the master prediction value. The slave system is therefore assured to use the same prediction for the game loop (i.e., run their animations at the same speed) as the master system.
Note that when the slave amd master have a discrepancy in game loop execution time (see GLa in Fig 3) one will have to wait for the other to catch up at some point. But by only using the master's execution time as a predictor, consistent execution can be maintained.
The master system, for its part, generates its game loop prediction value and stores the prediction value in its READ FIFO 316 with the corresponding master system game controller data. This information is fed to the game execution logic for the appropriate master game loop. Because the master system and the slave system use the game loop
prediction value generated by the master, any slave prediction value is not used. Thus, as shown in Figure 3, the slave system does not send any game loop prediction value to the master system. The messages sent by the slave to the master for each game loop contain only slave game controller data for use by the master. In this manner, the present invention guarantees that the game loops (GLa, GLb, and GLc) will each be the same length (i.e., run at the same speed) for both the master and slave system.
Thus, a means and method for synchronizing the animation speed of multiple video game systems in a networked environmentwith no external synchronization signals required is disclosed. These specific arrangements and methods described herein are merely illustrative of the principles of this invention. Numerous modifications in form and detail may be made by those of ordinary skill in the art without departing from the scope of the present invention. Although this invention has been shown in relation to a particular preferred embodiment, it should not be considered so limited. Rather, the present invention is limited only by the scope of the appended claims.