Quote:
Dom 2 has been created in the "spare" time of a few folks whose day jobs are something other than being programmers, game architects, graphics designers, network engineers, et cetera. It's actually remarkable that they've been able to do as well as they have given their relative lack of in-depth knowledge of professional computer game design (as compared to almost all other game dev shops) or even the inner workings of the coding tools they're using.
|
Very well said. I would also add that even though Dom2 stands out due to its gameplay and the "historical/fantasy perspective", the programming job is quite amazing, especially when you consider that it was done by one part-time guy. Just look at it, he had to take care of data processing, GUI, 2D and 3D rendering, networking, encryption, cross-platform code etc. You will not often find programmers with all these skills in the industry. And with all of it, Dom2 is a very stable program, by industry standards.
Concerning making the program resistant to hex-editing of the turn file. Making the server execute all the commands provided by the client and performing all validations on the server is certainly an excellent plan, but when looking into it closer, it involves more work than it appears.
Just a couple of examples:
- We are reading turn file from the clien, the command instructs to rename commander "Kora" to "Sjhslsdsfewoias...hskdf" (... stands for 9000 of various characters). Ok, no problem for the server, one can not cheat by renaming commanders. Oops, extra 8000 bytes in the name has overwritten the players resources structures setting the gem counts to 2000 each...
- The client instructs to casts Well of Misery with 2147483647 extra gems, let's check if he has enough gems:
Code:
int remainingGems = currentGems - baseSpellCost - extraGems;
if (remainingGems < 0)
cheatReport();
else
currentGems = remainingGems;
Code:
remainingGems = 0 - 80 - 2147483647 = 2147483569 (!)
Ok, how many tartarians can we summon for that?
So while it is possible to make the server fail-proof against this kind of cheats, it will take quite a lot of effort and careful programming.