(I have a month of exams, so updates will be coming out once per two days, or most likely just randomly)
While working on OpenGTA2 I spent (and still spending) some time on actually reverse-engineering GTA2 engine. It’s not source code reverse engineering – but rather I’m just working out how the engine handles different stuff, etc. This gives some interesting ideas.
In this post I’ll tell you about some general stuff about GTA2 engine and it’s developement environment. Right now I have two versions of GTA2 on my hands – one is official russian translation from Buka (released back in 1999), and the other one is GTA2 downloaded from Rockstar official website (at least I think it is, because someone else downloaded it for me).
First thing to notice is that these two versions are very different:
GTA2.EXE (rockstar.com)
File date: 27 april 2004
File size: 1.58 MB (1 667 072 bytes)
File version: 9.6
GTA2.EXE (Buka)
File date: 22 november 1999
File size: 2.80 MB (2 944 512 bytes)
File version: 10.1
It is interesting that version you can download from official website is older than one released long time ago. It also contains a lot of bugs, for example there is a bug with sound system in 9.6 which was fixed in 10.1 (it causes some sounds to be played at 255% pitch without no obvious reasons). More about bugs in one of next posts.
The Rockstar version was compiled from c:\code\gta2\source\ folder, while the Buka one was compiled from c:\gbh\coop101release\ folder (it is the original version, as you can see the reference to early GTA2 name – GBH).
There are no differences in what registry keys these both versions use:
Software\DMA Design Ltd\GTA2\Network
SOFTWARE\DMA Design Ltd\GTA2\Sound
SOFTWARE\DMA Design Ltd\GTA2\Debug
SOFTWARE\DMA Design Ltd\GTA2\Option
SOFTWARE\DMA Design Ltd\GTA2\Control
SOFTWARE\DMA Design Ltd\GTA2\Screen%sd%
SOFTWARE\DMA Design Ltd\GTA2\Player
And also there is no difference between files these versions use:
test\error.log (debug error log)
test\warning.log (debug warnings log)
data\s.gxt (spanish translation)
data\j.gxt (japanese translation, not present in either version)
data\i.gxt (italian translation)
data\g.gxt (german translation)
data\f.gxt (french translation)
data\e.gxt (english translation)
data\r.gxt (russian translation, only in Buka version)
data\movie\intro.bik (short snippets from the “GTA2: Movie”)
data\movie\preintro.bik (rockstar logo)
data\fstyle.sty (graphics files for the menu screen)
data\nyc.gci (car handling file)
player\data\q.scr (unknown script file – for debugging?)
data\style.sty (unknown graphics file)
data\jointmap.gmp (unknown map file)
test\replay.rep (test replay playback file)
data\kanji.dat (unknown file – not present in either of versions)
player\plyslot%d.svg (save file data)
test\MISSLOG.TXT (mission log file)
player\hiscores.hsc (highscores file)
data\audio\ (GTA2 sounds)
data\gtaudio\ (radio station files)
data\audio\vocals\ (GTA2 narrator sounds)
data\attract\attr1.rep (replay files)
data\attract\attr2.rep
data\attract\attr3.rep
Curious note: the Rockstar version has only e.gxt and s.gxt file, and it seems that kanji.dat file exists only in Japanese version of GTA2 (there was japanese version?).
Seeing how the rockstar.com version seems to be older than the one originally released, they might have lost the original sourcecode.