Studio engines for 2D and isometric games
Strategy games, role-playing games and adventures of the 1990s mostly ran on engines a studio built for itself and reused across its games. They were rarely sold, but each studio's games share formats and code, so work on one game helps with the others.
Westwood Studios
Dune II (1992), Lands of Lore (1993), Command & Conquer (1995), Red Alert (1996) and Dune 2000 (1998) share many formats. The formats changed between games, so check each header.
- Dune II and Lands of Lore keep their files in
.PAKarchives. From Command & Conquer, the games use.MIXarchives with entries named by a hash of the file name. .SHPsprites (the layout differs between generations),.VQAvideo,.AUDaudio with Westwood's ADPCM.- Rules for units and buildings are in INI files (
RULES.INIin Red Alert), so many rules are data. Read them first. - Electronic Arts released the source of Command & Conquer and Red Alert in 2020. For these two games, read the source before you reverse engineer.
Blizzard Entertainment
Diablo (1996), StarCraft (1998), Diablo II (2000) and Warcraft III (2002) share storm.dll and the MPQ archive format.
.MPQarchives with a hash table of file names, optional compression (several methods) and encryption with keys derived from the file names. StormLib reads them.storm.dllalso holds shared code: memory, files, networking and drawing helpers. Its functions are exported by ordinal; community lists name many of them.- StarCraft's replays store commands per game tick. The simulation is fully deterministic. OpenBW reimplemented it exactly enough to play replays.
- Diablo's Devilution project reconstructed the source with help from debug information left in the Japanese PlayStation port. Look for such builds of your game: demos, other platforms and beta versions sometimes kept symbols.
The Infinity Engine (BioWare)
Baldur's Gate (1998), Planescape: Torment (1999), Icewind Dale (2000) and their sequels.
chitin.keylists every resource and the.bifarchive that holds it.- Areas (
.are), creatures (.cre), items (.itm), spells (.spl), dialogues (.dlg) and 2DA tables (.2da, plain text tables of rules) hold almost all the game's rules. - Scripts (
.bcs) are compiled lists of trigger and action blocks, run in a fixed order for each creature and area. Their trigger and action numbers are listed inTRIGGER.IDSandACTION.IDS. - GemRB reimplements the engine from these formats. The IESDP documents every format.
The Fallout engine (Interplay)
Fallout (1997) and Fallout 2 (1998).
.DATarchives;.FRMsprites with several directions;.MAPmaps;.PROprototypes for items, critters and scenery.- Scripts are written in a C-like language (SSL) and compiled to
.INTbyte code, which the engine interprets. Decompilers exist. - Fallout 2 Community Edition is a reimplementation built from reverse engineering.
Adventure engines
Point-and-click adventures almost always ran on a script interpreter. See Adventure and story games for the families (SCUMM, SCI, AGI) and ScummVM, which reimplements most of them.
How to approach a studio engine
- Find the archive format and list every file. These formats are usually documented already.
- Read the rule tables and text formats before any code. In these games, many of the rules are in data.
- Find the script interpreter if there is one. List its opcodes.
- Trace the native code for what remains: the simulation step, combat formulas, pathfinding, AI. See the family pages for what must be exact (Strategy, RPGs).