Moving Out
A build flag in somebody else's repo is a fine place to grow up, but you can't live there forever.
THUG1 had releases to ship, THUG2 had a main menu to show off, and the #ifdefs were starting to outnumber the
furniture. So THUG2 packed 2545 files, one million lines and a stolen logo, and moved into a repo of its own.
1THUG2 is the only mode now
In the old repo, THUG2 was an option. Here it's the point. The CMake flag became a definition every target always gets, and the executable is called what it is:
The #ifdef THUG_THUG2s stayed in the code on purpose. Every one of them is a bookmark that says "THUG2
does this differently", which is exactly what you want to find when something breaks.
2Leave THUG1's stuff at THUG1's place
Moving is the best time to throw things out. THUG1's script patches, its translations, its extra assets and its docs didn't come along: THUG2 runs its own scripts, its own text and its own fonts. The build scripts for all three platforms did come, renamed and pointed at THUG2's data:
| Script | Makes |
|---|---|
build-macos.sh | Game/THUG2, native on Apple Silicon or Intel, data cloned in for free |
build-win.sh | Game/THUG2.exe, MinGW-w64, the retail icon baked in |
build-linux.sh | Game/THUG2.x86_64, built in Docker |
build_dmg.sh | THUG2.app (universal, macOS 11+) in a disk image with a proper background |
3A new place needs a sign on the door
An app needs an icon at 1024×1024. The retail game has one at 32×32. Upscaling a 32 pixel icon 32 times makes modern art, and not the good kind. So it was redrawn instead: each color area of the original traced and smoothed at full size, on the macOS rounded square.
The disk image wanted a logo, and the best THUG2 logo in existence is the one on the main menu. It's a texture
inside levels/mainmenu/mainmenu.tex.xbx, compressed, 241×128 pixels, and stored upside down, because
of course it is. Flipped, put on black and upscaled 4× with xBR, it became the background behind the "drag me to
Applications" arrow.
Everything in THUG2 is stored upside down. Loading screens, menu sprites, logos. If Neversoft ever sends a postcard, read it in a mirror held over your head.
4Separate bedrooms
THUG1's app keeps saves in ~/Library/Application Support/THUG. If THUG2 used the same folder, the two
games would share a memory card, and the first one to save would win. THUG2.app moved into
~/Library/Application Support/THUG2: same mechanism, different name on the door.
Where it landed
One repo, three platforms, one button to build each. The main menu works the way it did in the old house, everything else still T-poses. But now it's THUG2's own T-pose.