
Originally Posted by
Chapter 4 - From Code to Memory
At the lowest level, the entirety of a game – it's code, data, input, and output – is nothing more than complex abstractions of erratically changing bytes. Many of these bytes represent variables or machine code, generated by a compiler that was fed the game's source code. Some of them are the representations of images, models, and sounds that were loaded by the game. Others exist only for an instant, posted by the computer's hardware as input and destroyed by the game when it finished processing them. The ones that remain are for the player to enjoy, spit out by the game's code as the human representation of it's internal state. This is not only true of games, but of all software in general; it's just how computers think.
A major consequence (or privilege, depending on your perspective) of the human condition is our inherent inability to think in bytes. This huge disconnect in thought summons a need for ideas to be translated from the abstract – high-level code and visceral content – to the computationally acceptable – bytes. Some of these ideas are stored losslessly, ready to be presented to the player at a microsecond's notice. The code, logic, and variables of the game, on the other hand, are stripped of all human connotations and compiled down to machine data.
By manipulating the data which comprises a game, game hackers are able to obtain humanly improbable advantages within it. In order to do this, however, they must understand how the code written by developers manifests once it has been compiled and executed; they must think like a computer. Understanding the intricacies of this process will take years of practice, but this chapter teaches everything you will need to get started.