Tuesday, November 29, 2011

Networking Update - Single Player

Welcome back for an update on the network development for MEDUSA. Much of the network development initially has been centered around multiple client computers connecting to a single server computer. This communication is great for playing the game with multiple people, but supporting only a single player is essential as well.

In order to support a single player, we run the server and client game states alongside each other in one application. This means that the input, updates, and rendering to the screen is run from both states. A basic idea is the following:

  • Client sends input to the Server
  • Server reads the input and updates the game accordingly
  • Server sends all updated information to the Client
  • Client renders the newly updated objects to the screen
This process is the same for single player as with multiple players, with the key difference being the Client and Server are running in the same application on a single computer.

The end result of this method prevents us from writing a completely different set of logic specific to a single player. It allows the preexisting client/server communication logic to be used regardless of the player count. The networking is coming along nicely and will provide a great experience for the players.

That's all for now, but stay tuned for more updates on MEDUSA!

0 comments:

Post a Comment