O'Reilly logo

Microsoft XNA 4.0 Game Development Cookbook by Luke Drumm

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Synchronizing client states

After you've got game clients talking to each other comes the challenge of working out what they should actually say, and that can be a more difficult problem than what one might initially suspect.

Presented in this example are the beginnings of a multiplayer-networked version of Pong, or more specifically, a simulation of two clients and a server instance of a game of Pong.

With this simulation, you'll hopefully get a chance to experiment with and discover some useful strategies on how to architect holding and transferring state between networked clients.

Getting ready

This example relies upon a single texture file named block, from which it stretches into various sizes to form the onscreen elements. Any texture will ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required