Technical issues networking
Download
1 / 57

Technical Issues: - PowerPoint PPT Presentation


  • 280 Views
  • Updated On :

Technical Issues: Networking Technical Issues: Networking More and more gaming environments are supporting networked multiplayer play. Computer based games have supported network games for many years. Consoles are now starting to support network play as well.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Technical Issues:' - albert


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

Technical issues networking2 l.jpg
Technical Issues:Networking

  • More and more gaming environments are supporting networked multiplayer play.

    • Computer based games have supported network games for many years.

    • Consoles are now starting to support network play as well.

  • Most new games released these days make use of networking in some way.

    • Support and user communities.

    • Delivery of patches, updates, and upgrades.

    • Multiplayer gaming experiences.


Networking requirements for video games l.jpg
Networking Requirementsfor Video Games

  • Consistency and synchronization

    • All game players should see the game world in the same state at the same time.

  • Low latency

    • Delays between players should be low.

    • This helps promote consistency.

  • Scalability

    • The game should be able to support a large number of players without difficulties.

    • The game should also be able to scale in real time as players enter and leave the game.


Networking requirements for video games4 l.jpg
Networking Requirementsfor Video Games

  • Performance

    • Sufficient network resources (e.g. bandwidth) should be available to ensure the game runs smoothly.

  • Reliability

    • If part of the game goes down, the rest should continue to function without major service disruptions.

  • Security

    • It should be easy to keep track of players and prevent them from breaking game rules, cheating, or abusing other players.


Networked game structure the peer to peer model l.jpg
Networked Game Structure:The Peer-to-Peer Model

Peer

Peer

. . .

Peer

Peer

Peer


Networked game structure the peer to peer model6 l.jpg
Networked Game Structure:The Peer-to-Peer Model

  • Each player plays the game with the same program as every other player.

    • Each such program is a “peer”.

    • Each peer accepts player input, carries out game processing, and provides feedback.

    • Each peer must communicate directly with all other peers involved in the game to maintain synchronization and game consistency.

    • All peers are equivalent in functionality and standing in the networked game.


Networked game structure the peer to peer model7 l.jpg
Networked Game Structure:The Peer-to-Peer Model

  • Advantages:

    • Conceptually very simple.

    • All players have equal standing in the game, providing some element of fairness.

  • Disadvantages:

    • Each player’s system must have sufficient resources to support the game or everyone can suffer.

    • Each player must know about all other players in the game, with network resources consumed for each pair of players in the game. (Using multicasting or broadcasting will reduce this problem, but will increase complexity in the game.)

    • Consistency and synchronization may be difficult to maintain, especially with many players.


Networked game structure the peer to peer model8 l.jpg
Networked Game Structure:The Peer-to-Peer Model

Screen shot from Doom. One of the first multiplayer games, Doom

used the peer-to-peer model.


Networked game structure the integrated server model l.jpg
Networked Game Structure:The Integrated Server Model

Client/Server

Client

Client

Client

Client

. . .


Networked game structure the integrated server model10 l.jpg
Networked Game Structure:The Integrated Server Model

  • The networked game is composed of two different kinds of programs.

    • Multiple clients.

    • A single integrated client/server.

  • Clients are the player interfaces to the game, taking their input and providing audio, visual, and tactile feedback where appropriate.

  • The integrated client/server acts as a client to one player, but has additional responsibilities.

    • Coordinates and synchronizes all player activities.

    • Hosts any non player characters.

    • Carries out the majority of processing involved in serving the game out to players.


Networked game structure the integrated server model11 l.jpg
Networked Game Structure:The Integrated Server Model

  • Advantages:

    • Players no longer need to know about every other player in the game.

    • Total communication volume decreases.

    • Consistency and synchronization is easier, as the server is in sole control over the game.

  • Disadvantages:

    • Will the integrated server have the resources to adequately handle all the players?

    • Will the player playing at the integrated server have an unfair advantage in terms of reduced latency and preferential server access?

    • How well will this scale?

    • What if the server goes down?


Networked game structure the integrated server model12 l.jpg
Networked Game Structure:The Integrated Server Model

Screen shot from Starcraft. Starcraft supported many network play options,

including an integrated client/server mode, as well as Battle.net.


Networked game structure the dedicated server model l.jpg
Networked Game Structure:The Dedicated Server Model

Client

Client

. . .

Server

Client

Client

Client


Networked game structure the dedicated server model14 l.jpg
Networked Game Structure:The Dedicated Server Model

  • In this model, the game is again split into two different kinds of programs:

    • Multiple clients.

    • A single dedicated server.

  • Clients serve the same purpose as in the previous model, interfacing players to the game they are playing.

  • The server in this case, however, is a separate program without any client functionality.

    • Its sole purpose is to coordinate and synchronize the game, and to serve it out to the players’ clients.


Networked game structure the dedicated server model15 l.jpg
Networked Game Structure:The Dedicated Server Model

  • Advantages:

    • With separated functionality, there is no single client with a clear unfair advantage.

    • If a dedicated machine is unavailable, the server can be run on the same machine as one of the clients, falling back to essentially an integrated model.

  • Disadvantages:

    • Will clients closer to the server still have an advantage over clients farther away?

    • Will the dedicated server have the resources to support all of the clients?

    • How well will this scale?

    • What if the server goes down?


Networked game structure the dedicated server model16 l.jpg
Networked Game Structure:The Dedicated Server Model

Screen shot from Quake II. The Quake series of games pushed the dedicated

server model, and provided dedicated servers for many different platforms.


Networked game structure the flat server model l.jpg
Networked Game Structure:The Flat Server Model

Client

Client

Client

Client

Server

Server

Server

Client

Client

Client

Client

Server

Client

Client

Client


Networked game structure the flat server model18 l.jpg
Networked Game Structure:The Flat Server Model

  • In this model, there are multiple dedicated servers for scalability to support a much larger number of players.

    • Each server must know about every other server in use.

    • The servers must communicate with one another to ensure consistency and synchronization between all game players.

  • Each player uses a client to connect with a dedicated server to access the game.


Networked game structure the flat server model19 l.jpg
Networked Game Structure:The Flat Server Model

  • Advantages:

    • More scalable than single server approaches.

    • More reliable, as there are multiple servers.

    • Conceptually easy to manage servers.

  • Disadvantages:

    • As number of servers grow, so does communication overhead (unless multicasting or broadcasting is used).

    • Consistency maintenance and synchronization are more difficult now than before, especially with more clients.


Networked game structure the hierarchical server model l.jpg
Networked Game Structure:The Hierarchical Server Model

Client

Client

Server

Client

Client

Server

Server

Server

Client

Client

Client

Client

Server

Client

Client

Client


Networked game structure the hierarchical server model21 l.jpg
Networked Game Structure:The Hierarchical Server Model

  • In this model, additional servers are added solely for the purpose of managing and coordinating other servers.

    • This creates a hierarchy of servers, in a tree-like configuration.

    • The server at the root of the tree has ultimate responsibility over the entire game, but ensures scalability by delegating many of its tasks to lower level servers.


Networked game structure the hierarchical server model22 l.jpg
Networked Game Structure:The Hierarchical Server Model

  • Advantages:

    • More scalable than flat server model.

    • Reduced communications overhead.

  • Disadvantages:

    • As the number of levels in the hierarchy grows, latency between the various parts of the game grows as well.

    • Consistency maintenance and synchronization are even more difficult now than in the flat server model, due to this increased latency.

    • What if the root server goes down?


Networked game structure the grid computing model l.jpg
Networked Game Structure:The Grid Computing Model

Client

Client

Server

Server

Server

Client

Client

Server

Server

Server

Client

Client

Client

Client

Server

Server

Server

Client

Client

Client


Networked game structure the grid computing model24 l.jpg
Networked Game Structure:The Grid Computing Model

  • In this model, all of the servers act as a single powerful parallel computer.

    • To the clients, the servers seem as if they are a single logical computer.

    • Software on the servers automatically redistributes player load to make use of free resources and to reduce client latency.

    • All servers in the grid may be in the same location, or they can be geographically distributed around the world.


Networked game structure the grid computing model25 l.jpg
Networked Game Structure:The Grid Computing Model

  • Advantages:

    • Can scale to support a large number of players – adding servers to the grid is transparent.

    • Very reliable – if a server is lost, player load is shifted automatically to a new server.

    • Consistency and synchronization is handled automatically by the grid software.

  • Disadvantages:

    • Very complex grid software required, although standard software is emerging.

    • Very costly to provide.


Networked game structure the grid computing model26 l.jpg
Networked Game Structure:The Grid Computing Model

The Butterfly Grid, shown to the left, isbeing developed byButterfly.net to provide a massively multiplayer environment for videogames. It will use IBM technologies based onLinux to support a variety of games on various platforms, including Sony’s Playstation 2, and others.


Game world structuring l.jpg
Game World Structuring

  • Once you decide how to structure your game, you must decide how to spread your game world over the servers used to support your game.

    • Will each server be independent, or will they work together to support a single massive game world?

  • This is an important decision, and can have a large impact on your game.


Game world structuring multiple worlds l.jpg
Game World Structuring:Multiple Worlds

  • Each game server supports its own independent game world.

  • The world, levels, characters, and game rules can differ from server to server.

  • This is the easiest approach, as there is little consistency management needed.

  • Players also like this approach, as they can find a server providing a game world more to their needs and style of game play.

  • Ultimately, however, this approach limits the number of players in a single game at a time.


Game world structuring multiple worlds29 l.jpg
Game World Structuring:Multiple Worlds

Screen shot from Counter Strike. There are many Counter Strike servers

around the world, each providing their own independent game.


Game world structuring the divided single world l.jpg
Game World Structuring:The Divided Single World

  • A single world is supported across all servers, but each server provides its own independent part of the world.

    • Geographic region (planet, country, island, part of a dungeon, etc.)

    • Level of game play.

    • Chapter of an unfolding story.

  • Players move between servers as they play.

    • Each server still supports a limited number of players in its region at a time.

    • By allowing players to move from server to server, they have the illusion of a much larger game world with many more players.


Game world structuring the divided single world31 l.jpg
Game World Structuring:The Divided Single World

Screen shot from Everquest. Everquest features many different regions and

zones across multiple servers to support a very large world.


Game world structuring the single world l.jpg
Game World Structuring:The Single World

  • In this approach, a single massive game world in its entirety is supported by many servers at the same time.

  • There are no independent servers; they all interact to support the same game world.

  • All players exist in the same world at the same time, allowing for vastly different multiplayer experiences.

  • Providing scalability to support this and maintain consistency at the same time is quite difficult.


Game world structuring the single world33 l.jpg
Game World Structuring:The Single World

Concept art for VibeForce. VibeForce is a MMORPG for the PC, Playstation 2,

and wireless devices that will make use of the Butterfly Grid to support a

single massive game world.


Locating networked games l.jpg
Locating Networked Games

  • The first step to playing a networked game is to locate one to participate in.

  • There are a variety of different techniques used.

  • The choice of technique is very important to the success of a game.

    • If it is too hard, users will find it difficult to play.

    • Mechanisms that simplify the procedure are more expensive, and can incur continuing costs throughout the life time of a game.


Locating networked games direct connections l.jpg
Locating Networked Games:Direct Connections

  • The oldest and simplest approach of locating a networked game requires a direct physical connection between the two gaming systems.

    • PC systems required a serial connection.

    • Consoles use a variety of techniques; the Xbox uses a crossover Ethernet connection.

  • With a direct connection, location is quite simple; the other game system can be found at the other end of the connection.

  • While simple, it ultimately limits the number of players possible, and restricts the location of players to within a few metres of each other.


Locating networked games direct connections36 l.jpg
Locating Networked Games:Direct Connections

Screen shot from Mech Assault. It supports direct connection play

to another Xbox with the system link cable.


Locating networked games fixed addresses l.jpg
Locating Networked Games:Fixed Addresses

  • In this approach, a game peer or server to contact is listening on a fixed address for new game players.

    • A specific phone number for a dial-up connection using a modem.

    • A network address and port number for Internet based games.

  • It is up to the player to know this address in advance to connect into the game.

    • No location is actually required, as the game simply contacts the fixed address directly to join.


Locating networked games fixed addresses38 l.jpg
Locating Networked Games:Fixed Addresses

Screen shot of Quake II. The address book in Quake II allowed players

to record fixed addresses to contact their favourite servers.


Locating networked games broadcasting l.jpg
Locating Networked Games:Broadcasting

  • In this approach, game clients or peers broadcast data onto the network to search for servers or other peers.

    • When a server or peer receives a broadcast message, it responds to notify the sender of their address to join the game.

  • This approach is quite simple to implement (using UDP, for example), but is typically restricted to finding networked games on the same network.

    • Broadcast messages are usually not propagated across routers and other network gear.


Locating networked games broadcasting40 l.jpg
Locating Networked Games:Broadcasting

Screen shot from Unreal Tournament 2003. It allows you to browse through

servers on the local network using a broadcast mechanism.


Locating networked games location services l.jpg
Locating Networked Games:Location Services

  • Location services run at fixed network addresses known to the game itself.

  • When a new game server is started, it registers its address and game information with the location service.

  • When the player wishes to join a multiplayer game, the game contacts the location service to help track down a game meeting the player’s needs and requirements.

  • When the player has selected a game to join, the appropriate server is contacted according to its registration information and play can begin as usual.


Locating networked games location services42 l.jpg
Locating Networked Games:Location Services

  • Location services can be hosted by the game producer or by a third party.

  • Location services can provide many features to game players:

    • They can choose games based on server location, game rules, levels, characters, and a variety of other criteria.

    • They do not necessarily need to know any of the other players to join a game.

    • Other features include the ability to run private games, as well as other community services.

  • Because of their ease of use, these services are becoming more common, despite their costs.


Locating networked games location services43 l.jpg
Locating Networked Games:Location Services

Screen shot from Xbox Live. Many features allow easy multiplayer

experiences on this console. You can play with friends or complete strangers.

You can even have the system perform an “optimatch” to link you up with

players of similar skill and ability automatically.


Networked communication l.jpg
Networked Communication

  • Once a networked game is located and joined, the game can proceed.

  • There are still, however, many communications issues that must be resolved.

    • What to communicate.

    • When to communicate.

    • Where to communicate.

    • How to communicate.

  • These issues can have a great impact on the success of a networked game.


Networked communication rules to follow l.jpg
Networked Communication:Rules to Follow

  • The following general guidelines should apply to almost any networked game:

    • Only send what is needed.

    • Only send when it is needed.

    • Only send to where it is needed.

  • Following these rules is a good step towards meeting the requirements of networked games discussed earlier.


Networked communication what is needed l.jpg
Networked Communication:What is Needed?

  • The “state” of a game is essentially the complete set of attributes describing all elements of a game at a given point in time.

  • Remember that we want all players to see the game world in the same state at the same time.

  • To do this, all changes in state must be sent to all parts of the networked game.

  • Keep in mind that we want to minimize the amount of communication, so we need to determine what to send and what not to send.


Networked communication what is needed47 l.jpg
Networked Communication:What is Needed?

  • All changes in state that affect game play and the outcome of the game must be sent.

    • Character movement and actions, object placement, level condition, and so on.

  • Changes in backgrounds, ambience, atmosphere, and so on should not be sent.

    • This can be a large amount of information!

    • These can be handled in the individual peers and clients independently if they do not affect game play.

    • If desired, periodically synchronize random number keys controlling these events for some consistency.


Networked communication when is it needed l.jpg
Networked Communication:When is it Needed?

  • Only communicate to indicate changes in the state of the game.

    • When there is essentially nothing happening in a game, there should be no network traffic being generated!

  • Instead of communicating every change as it happens individually, it might be more efficient to collect them for a short period of time and send several state changes at once.

    • Do not wait too long, however, or the game’s state will become inconsistent across players.

    • You will need to experiment and tune this.


Networked communication where is it needed l.jpg
Networked Communication:Where is it Needed?

  • Not every change in game state needs to be sent to every player in the game.

    • Only send changes in state to players that will be affected by them!

    • For example, a player does not need to be notified of character movement across the level if the player cannot see or hear it; once they are in range, it becomes important.

  • Making these decisions can increase game complexity, but it can provide large benefits to network efficiency.


Networked communication how to communicate l.jpg
Networked Communication:How to Communicate?

  • Assuming that network play involves communication over the Internet, the choice of transports to use is limited.

  • There are two main choices:

    • TCP: Transmission Control Protocol, a connection-oriented Internet protocol.

    • UDP: User Datagram Protocol, a connectionless Internet protocol.

  • There are other protocols, but they can be more complex and lack widespread support.

    • RTP, RSVP, and so on.


Networked communication how to communicate51 l.jpg
Networked Communication:How to Communicate?

  • About TCP:

    • More overhead, in establishing a connection, and in maintaining connection resources.

    • Provides reliable, in order delivery of data in a stream of bytes.

    • Also provides flow and congestion control to regulate transmission rate of data.

  • About UDP:

    • No connection, so there is less overhead.

    • Data can be lost or delivered out of order.

    • Data is delivered with explicit boundaries between messages.

    • UDP may have problems crossing through firewalls, however, so this must be kept in mind.


Networked communication how to communicate52 l.jpg
Networked Communication:How to Communicate?

  • Ultimately, you must assess the needs and requirements of your game and make your decisions accordingly.

    • If reliability is important and no loss of data can be tolerated, TCP may be better. (You can still build reliability on top of UDP, however, if you need to.)

    • If loss of data can be tolerated, UDP might be more efficient in the end.

    • If you want to support massive numbers of players, UDP might be necessary to avoid connection overhead.


Other networking issues persistence l.jpg
Other Networking Issues:Persistence

  • Will the game world continue to exist and function once a player leaves it?

    • If so, the game world is persistent.

  • Persistence introduces several interesting issues:

    • What happens to player characters, their items, and so on when the player leaves?

    • How does time pass in the persistent world?

    • How does the game story unfold when certain players are not always around?

    • How can the game action be split into reasonable pieces that coexists with this persistence?


Other networking issues persistence54 l.jpg
Other Networking Issues:Persistence

  • Keep in mind that persistence works better for some games and game genres than others.

    • It is well suited to role-playing games.

    • It can work well with action and adventure games, if they are designed properly.

    • It can be difficult to work well with strategy and sports games. (Who will take the player’s place when they are gone, or will their side or team be defeated again and again in their absence?)

  • Persistence must be worked into a game early as early in the design process as possible.


Other networking issues persistence55 l.jpg
Other Networking Issues:Persistence

Screen shot from Everquest. Games such as Everquest provide a persistent

world, even when you are not around to participate in it.


Other networking issues security in games l.jpg
Other Networking Issues:Security in Games

  • Traditional network security measures are starting to appear in networked games for a variety of purposes.

    • Authenticating game peers and clients to prevent cheating.

    • Authenticating players for access control and accounting purposes.

    • Authenticating and authorizing players to access special game content.

    • Authenticating and authorizing administrators to adjust game settings.

    • Preventing people from tampering with or disrupting networked games.

    • Preventing players from abusing each other.


Other networking issues security in games57 l.jpg
Other Networking Issues:Security in Games

  • How do we accomplish this?

    • Password systems.

    • Cryptographic mechanisms, for public key and private key encryption.

    • Secure communication protocols such as SSL (Secure Sockets Layer), TLS (Transport Layer Security), and IPSec.

  • What are the costs?

    • Increased complexity in game code.

    • Increased processing requirements.

    • Increased network requirements, as more data must be exchanged to support security.


ad