A MODEL FOR A CHEAT-FREE GAME
By Kent Wang
September 30, 2000
NOTE: This is The Column, a regular feature on Apolyton where anyone can write
about anything to do with Civilization or the gaming industry as a whole. If you feel like writing,
please visit the article submission page.
Warning: this column is a bit technical. An understanding of client/server theory helps but is not necessary.
For those of us that have played any game online, we know about the perils of cheating. It really harms the competitive community and severely limits the legitimacy of organizations like GameLeague. Yet, the game companies still fail to address this issue.
Deconstructing the Game
First, let us take a look at how a multiplayer game works. Usually, the hosting player's game will establish a central server, then all the players connect to the game server as clients. Whenever a client makes a change, like moving a unit or reassigning work orders, the change (not the command itself) is sent to the server and the server passes it onto all the other players. This way, every game has a copy of the entire gamestate, including information that does need to be known. This is useful for many reasons. If I move a unit into an unexplored region, my game can immediately display the region since it already knows what was there; it was merely hiding the information from me. This also allows me to save the game and continue later.
Hacking the Game
Unfortunately, since every game has a copy of the entire gamestate, an unscrupulous player could use a program to access the hidden information in memory. One could also decompile the game into assembly and re-program the game to disclose the information. No amount of encryption could ever solve this problem, because a decompiler could just remove the encryption mechanisms. Granted, one could make it harder for the game to cracked, but it's only a matter of time before a diligent hacker cracks it again.
The Solution
The entire problem stems from the fact that all clients have a copy of the gamestate. A better solution would be to create an independent server that would mediate all transactions. This server would be the only machine with knowledge of the entire gamestate. Players would only know the gamestate that is relevant to them (e.g., their cities and units, but not other players'). Every action taken by a player would be sent to the server. The server then checks the validity of the command, because the client could still be hacked to send bogus and outrageous commands like "move my Warrior 50 squares". The server then updates the gamestate and passes the changes on to only the players that would see these changes happen. For example, when I move my Horsemen next to an opponent's scout he would be notified of that change, but other players that would not see this information would not be notified.
This solution actually puts out less network load for each user, since each game is only fed information that is relevant to it. The only problem is that every time a new square is explored there will be a slight lag waiting for the server to respond with the new square's information.
It is key to allow the server to be independent. Instead of having a player host a game, the server needs to be set up on an independent automated server, like on an official Firaxis or GameLeague server. This ensures that the server itself is cannot be hacked. This independent server software should be made public, like the Quake server is, so that the network load could be distributed among multiple local servers as opposed to a few centralized servers.
Or is it?
This solution seems so simple and few disadvantages, yet why have the companies not implemented this already? I don't know, maybe I got my programming knowledge wrong somewhere, or maybe I'm just a genius? Well, for your sake and mine let's hope it's the latter.
---------
About the author: "GameLeague admin, Apolyton "Master of CGI", temporarily retired Civer".
Comment on this article!
The opinions expressed on this page do not necessarily reflect those of Apolyton CS or GameStats. They are just the personal opinions of the writer.