I'm starting to work on a mobile game that will have a server-side part (to handle user's interactions between them) and, of course, the client (game itself) part. It's not meant to be a browser game and the goal is for it to run even when not connected to the internet.

I would want to have the network-requireing functions disabled when the network isn't accessible (so user can't send a message to another user when offline, obviously, or trade with other users) but when the network becomes available, the game should sync with the server.

Now, my main concerns are:

  • how to handle the syncing part? What would be the best way to handle it? Should I just send full game state from the device to the server? This way if a user plays the game on 2 different devices, one of them can get out of sync, but lets say I can live with that...

  • how to ensure there's no "cheating"? I mean, having some kind of server API exposed, would there be a possibility that someone makes a request that creates some powerful item on the server for him, right?

What would be best practices to approaching thos


1 Answer 1


Offline play means that the players can cheat as much as they want. The only way to prevent cheating is to calculate any mechanics which are relevant for the gameplay on the server.

That means you have two very conflicting goals here: A) to let the player play while being offline and B) to prevent them from cheating.

The only compromise between both goals would be to limit the options of the player severely in offline mode. Any decision by the player which has effect on the gameplay would have to be queued, and the player wouldn't receive the results of their actions before the network connection is back on and the server can tell them the results.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .