New answers tagged

2

In the data you send with the message, you include information about what the purpose of the message is. Not just the relevant data. For example, you'd create an enumerate of possible message types: enum MessageType { MovePlayer, AttackPlayer, ChatToPlayer, Disconnect, }; When you send some data related to moving a player, you don't just send the ...


0

Requiring an always-on connection to a remote server and handling all mechanics on that server is not really justifiable for a single-player game. But what you could do instead is add a replay-feature for your game. Have the game log all player input to a file. Then add a mode where the game plays itself automatically by using the log of a previous game as ...


2

If you want to prevent cheating then the client could be treated as a dummy terminal displaying state and accepting input. The problem with this is that you have offloaded ALL of the work to your server. As the number of people increases on the server so to will the computational load. Correcting this problem can be solved in a number of ways such as ...



Top 50 recent answers are included