|This article does not cite any references or sources. (January 2007)|
Game trainers are programs made to modify behavior of a computer game, usually using addresses and values, in order to allow cheating. It can "freeze" a memory address disallowing the game from lowering or changing the information stored at that memory address e.g. health meter, ammo counter. It simply manipulates the data at the memory addresses specified to suit the needs of the person cheating at the game.
In the 1980s and 1990s, trainers were generally integrated straight into the actual game by cracking groups. When the game was first started, the trainer loaded first, asking the player if he/she wished to cheat. Then the code would proceed to the actual game. In the cracker group release lists and intros, trained games were marked with one or more plus signs after them, one for each option in the trainer, for example: "the Mega Krew presents: Ms. Astro Chicken++". Modern trainers append their titles with a single + and a number, as many have several functions. The number used represents the number of modifications the trainer has available, e.g. 'infinite cash' or 'instant research'. For example: "Final Fantasy VII - Ultima Edition +50 Trainer", Brutal Legend +10 Trainer etc.
Modern trainers also come as separately downloadable programs; instead of modifying the game's programming directly, values stored in memory are changed.
With object-oriented programming the memory objects are often stored dynamically on the heap but modern operating systems use heap and stack randomization. Therefore, the only way to modify such memory in a reproducible manner is to get information from inside the game process. This requires reverse engineering methods like API hooking of malloc() and free() or code injection. The trainer gets active when the object has been allocated and deactivates itself again when the object is freed. E.g. the free and open-source (FOSS) universal game trainer "ugtrain" shows these methods completely legal with FOSS games as examples.