Server

From VCMI Project Wiki
Revision as of 13:44, 10 November 2011 by Warmonger (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The main purpose of server is to maintain the game state and to inform clients participating in game about changes. Ideally, all the mechanics should be handled by server in order to avoid cheating on client side.

Operation

Information about changes is sent to all clients with netpacks from GameHandler defined in gamehandler.cpp. This way every client receives synchronized information about changes in game state. Server receives requests in form of netpacks from clients entered via player interface and processes it according to game mechanics.

Game Handler