Tuesday, January 20, 2009

Reverse engineered the commercial game Hinterland.

Reverse engineered the commercial game Hinterland by debugging compiled script files inside the game engine virtual machine. Duplicated 20% of the game using the original game assets.
  • The game installation contains all the art assets in forms of native Torque game engine format. The assets can be viewed by tools that comes with the engine and loaded and used inside the engine for your own games. The game also has all the compiled script available in the installation.
  • All the game script code are compiled by a virtual machine inside the game engine into C++ function calls and variables. Consequently, it was possible to debug the script directly inside the engine. In addition, a big portion of the compiled script contains meaningful symbols and texts that helped interpreting the original script content.
  • For example, in the Torque Game Engine, controls that contain texts are not able to resize the texts. The game Hinterland does resize the text. In order to find out how they resize text (either in the engine or in script), I debugged and guessed the contents of the script. After finding that it can not be done in script, I wrote code to transform texts correctly. The seemingly easy task turned out to be a hard problem. To support fonts on multiple platforms, the engine has very complicated text rendering system (at least 10 nested funciton calls to get to the root rendering code).

0 comments: