Game Development Reference
In-Depth Information
A simplistic login message body consists of:
• Username length (int)
• Username (bytes)
• Password length (int)
• Password (bytes)
A simplistic chat message body consists of:
• Sender name's length (int)
• Sender's name (bytes)
• Chat message length (int)
• Chat message (bytes)
The game client
Similar to the server, the client also contains several modules that are responsible for
performing various functions:
Message Handler
Object Serialization
Game
Code
Game
Server
Messages
Game State Manager
Friends
Message Handler : Any messages coming from the server or any messages
that the client sends either as a request or are intended for other clients are
handled by this module.
Object Serialization : Similar to the module found in the game server; all
messages that are received are converted from objects to binary messages
and vice versa by this module.
Game State Manager : The game state manager handles all the caching of
state information when the player is playing the game.
 
Search WWH ::




Custom Search