Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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

share|improve this question
add comment

1 Answer

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.