110 likes | 226 Views
Networked Games - consistency and real-time. Objectives – Understand the problems associated with networked games. Realize the importance of satisfying real-time and consistency requirements. First networked games.
E N D
Networked Games - consistency and real-time • Objectives – • Understand the problems associated with networked games. • Realize the importance of satisfying real-time and consistency requirements .
First networked games • Allow multiple users to interact in a single gaming environment via text based communications. • Initially made popular by Multi User Dungeons (MUDS). • These are traditionally text based and reached their highest popularity in the 70s and 80s. • Required users to build up their abilities (e.g., physical strength, magical capability) over a number of sessions. • Games last a long time. Users participate in a number of sessions over a period of days, months and even years. • Replayability value is high. Difficult to stop playing when you have amassed so many points/skills over a prolonged period of time.
Real-time networked games • Allow users to interact in real-time, usually involving graphical representation of the gaming arena. • X-Pilot is an example of such a game. • Very popular in the open source community. • Fly a space ship around a 2D gaming arena, avoiding rocks while shooting other users or automated ships (known as robots – simplified to bots in later years). • Recent games tend to be centered around first person shooters. • Unreal Tournament, Quake 3, etc.
Classification of networked games • Networked games may be considered a sub-category of networked virtual environments (net-VEs). • Net-VEs describe two active areas of research. • Distributed Interactive Simulation (DIS) – Emphasis is on modeling real world scenarios. Usually war type simulations. • Collaborative Virtual Environments (CVE) – Emphasis is on encouraging human interaction in collaborative working scenarios. • Networked games tend to “borrow” from both DIS and CVE lines of research: • For example, simulate fighting scenarios while allowing user collaboration (simply via messaging).
DIS • Research primarily funded by the military. • War simulations for training troops, tank drivers etc. • Attempted to link simulation units (such as tank simulators and flight simulators) that are geographically separated (e.g., different cities) so they can interact in battle scenes. • Emphasis is on realism. • Simulators are replicas of real hardware (interior). • Battles are played out in real-time. • Special “stations” allowing “generals” to monitor battles. • Recent research looking at collaborative techniques. • Allowing battle units to cooperate. • Difficult to achieve as many units are “dummy” entities (actions are partly controlled by computer, may only be ordered by a general). • Integrating AI controlled entities with human controlled entities in a collaborative manner is difficult.
CVE • Allow geographically distributed users to cooperate. • May mimic well known physical collaborative techniques such as lectures, tutorials, common rooms. • Due to the virtual nature of the environment other collaborations are possible. • Walk through a house yet to be built. • Collaboration of engineers on 3D designs. • Molecule modeling. • Emphasis is on improving collaboration between users. • Not as important as real world model. Real world physics is not required (most of the time). • Representation of different individuals, different mechanisms of communication (e.g., gesturing) are most important. • Primarily funded by research grants related to work carried out in the Computer Supported Collaborative Work Community (CSCW).
Problems with networked games that have hard real-time requirements • Must satisfy real-time requirements while satisfying consistency requirements. • Which is more important? • If real-time requirements are not met then realism suffers. • If consistency requirements are not met then user interaction becomes difficult to achieve. • Real-time? • If user U1 opens a door by time t then all users should see U1 open a door by time t. • Consistency? • If user U1 opens a door and then passes through the doorway then all users should see U1 open the same door then pass through the same doorway.
U2 U1 U3 Example of real-time problem • Three users (U1, U2, U3) participate in a first person shooter. • U2 appears in 6 different positions in consecutive frames. • At frame 3 U2 enters the line of fire of U1 and U3. • Due to message latency, U1 views U2 at frame 3 sufficiently late for U3 to gain an unfair advantage.
Example of consistency problem • Three users (U1, U2, U3) participate in a first person shooter. • As viewed from U1: U1 pushes a button that disarms all opponents. • As viewed from U2: Just before U1 pushes the button U2 shoots U1. • What does U3 see? • Ordering of events (even if they appear to happen concurrently) is required. • Ensuring every user views events in the same order is commonly termed identical ordering or total ordering.
Attempting to satisfy real-time requirements • Two methods exist: predictive modeling & scoping/zoning. • Predictive modeling is sometimes termed dead reckoning. • Useful if we can quite accurately predict future events related to a received event. • An example would be the firing of a rocket. Provided with velocity, acceleration and starting position we can predict its flight through the air. • Scoping requires limiting the number of users that are expected to receive an event. • Commonly achieved via the division of the virtual space. • This can be via rooms, or simply user’s views.
Attempting to satisfy consistency requirements • Some form of message ordering protocol is required. • A trivial attempt at satisfying ordering is to use TCP to ensure FIFO and have a central server through which all messages must pass through. • The central server, together with TCP, ensures all nodes receive the same messages in the same order (we are ignoring node failure and disallowing nodes to act on their own messages without traversal through the server). • UDP is used rather than TCP as TCP may introduce excessive latency time for message transit. This prevents FIFO ordering (apart from over LAN where broadcast may be used). • UDP introduces the problem of message loss (even though TCP does not overcome this totally it does provide some indication when messages are not received in some instances).