Game Development Reference
In-Depth Information
Networking
There are two stages to a networked game: the game creation/joining stage, and the
gameplay stage. As is the norm with game development, there are many different
ways to approach and design these stages, and you should choose the right one (or
combination) based on the needs of your game.

In this section we will look at the options available and where you might use each one,
before looking at what Windows 8 provides and how to implement them.
For a long time, multiplayer gaming has been an important part of many games, and
sometimes it is the primary part of the game, getting a much larger focus than the
finely-crafted single player experiences on offer. Games from the Battlefield and Call
of Duty series, for example, place a high importance on multiplayer gaming, and many
fans buy the game just to play with others, some not even touching the single player
experience. While this may seem like the easy way to avoid writing intelligent oppon-
ents for single player, multiplayer can often be incredibly difficult to get right, as the
players will complain if there are issues, and will often break your game in ways you
never even thought of. Also, if you create a single player game, and then decide you
want to add in multiplayer, you will find that it is often very difficult to adapt the engine
to the new style of play. For these reasons, you should consider multiplayer to be a
primary experience for your game if you plan to include it, and devote a good amount
of time to getting it right if you want to keep your players happy.
Choosing between client/server and peer-to-peer
models
One of the first decisions you may face is choosing whether you want to go with the
traditional client/server model, or the peer-to-peer model for game communication.
The client/server model
The client/server model treats one machine as the server, just like a web server, and
this machine acts as the central authority for the game. All other players connect to
this server and receive their updates from that one location. There are a few benefits
to this, including being able to dedicate a machine as a server without a player, and
providing extra resources to allow more players to join. Additionally, by adopting this
Search WWH ::




Custom Search