FIGHTING GAME TRAINERS -Sanchit Karve born2c0de@hotmail.com If you just want to know about the protection methods you can just go on further but if you want to see these protections at work, I recommend having these software before you continue. 1) Any C++ Compiler (Tested on Borland C++ 5.02) 2) TSearch from http://membres.lycos.fr/tsearch/tsearch_16.zip OR www.gamehacking.com/download.php?type=tools&file=memfinders/tsearch_16.zip Also, read the Help File included in TSearch on how to search/modify/freeze values.Once you do that, you are ready to continue. Before I begin let me explain what a trainer is. A Trainer is a seperate program that has the ability to access the Primary memory used by another program in an attempt to change valuable data ( in this case ammunition,health,Lives etc.) In short Trainers are like external cheat codes. They seem to be fun if you are the gamer but if you end up being a developer it's a lot frustrating as the whole action and difficulty of the game is lost. Even though trainer protection is not very critical it still is a neat way to ensure that the game is played the way it is meant to be played. Some game developers are now trying to stop creating cheat codes in their games since the whole point of the game is lost. An Example is the game Uplink Hacker Elite by Introversion in which the patch for version 1.3 onwards disables cheats. CD-Protection schemes are used to prevent piracy. But Still Trainers turn out as substitutes for cheats.This Article will help game developers to make trainer creation difficult if not impossible. I would like to discuss the techniques that don't work first. I. PROTECTION MECHANISMS THAT DONT WORK (i).Some people think that displaying a value such as health in a graph stops beginners from making trainers.But this is not so.Assuming you are playing a game in which your health is displayed in the form of a graph. Now you start the trainer maker program which can search for values within an application.Nowadays these Apps have become so intelligent that they can even monitor changing values. So in this case we would set the search mask for "a decreasing value" and do our best in the game to keep losing health. Eventually the address is found. Overcoming this is explained later. (ii)Another frequent method used is to use floating point numbers to store data. But Again Trainers allow mere users to search for float and double values.So this wont work either. (iii)Adding/Subtracting/Multiplying/Dividing Numbers and using the result as the actual data has also lost importance. Because all you have to do is to find the value when your health(or whatever) is FULL and then "Freeze" the memory location as your health decreases. This way people can even overcome this protection without even knowing the calculation mechanism. (iv) Using two or more variables even of different data types isn't of much help the reasons of which are the same as the one described above. These are the basic protection mechanisms used to fight trainers but dont work. Now we shall see what really can be done to stop trainer creation. II. MORE POWERFUL PROTECTION MECHANISMS i) THE PLAIN CONDITIONAL If you tell a software developer that you check the value of a variable just after you assign a value to it he might think that you are the dumbest programmer but it is not so. Look at this example that stops the game when a trainer is detected. While Executing the code below make sure TSearch is Started and the EXE is included as a process. Then keep searching for 100/90/80 as the output is shown. When you find the memory address freeze it or modify it and see the MessageBox Popping Up!! #include #include #include #include void trainer() { MessageBox(0,"TRAINER DETECTED!","WARNING",MB_OK); exit(0); } void main() { int health=100; cout<<"HEALTH="< #include void main() { int health; char *fname="E:\\aaa.txt"; ofstream out(fname); out<<100; out.close(); ifstream in(fname); in>>health; in.close(); cout<<"HEALTH="<>health; cout<<"HEALTH="<>health; cout<<"HEALTH="<>health; cout<<"HEALTH="<