For education purposes only · no game files included · bring your own THUG2
Field notes

THUG2 on a Mac

Tony Hawk's Underground 2Fan port
World Destruction Tour

Tony Hawk's Underground 2 (2004) on the THUG1 port's engine: SDL2 and OpenGL, native builds, the original PC data you already own.

Start the tour

How Tony Hawk's Underground 2 (2004) got a native build for macOS, Windows and Linux: the engine of the THUG1 port, taught to run THUG2's own data, plus the settings menus, controls and saves a modern computer expects. Each guide is a short "how to", with the diffs that did it. The story section tells how it all happened, chapter by chapter.

GoalRun THUG2's PC data natively on Apple Silicon and Intel Macs (and on Windows and Linux), with its own menus, its own saves and its own feel, plus modern screen, graphics, keyboard and gamepad settings.
THUG2's main menu, the Wheel of Looogie, running natively: STORY MODE highlighted, the skater from a retail save next to it.
The Wheel of Looogie, native on Apple Silicon, with the skater from a THUG2 PC save.

The map

Three layers, and almost every guide touches all three:

FolderWhat lives thereTouch it when
Code/The engine and the game: skater physics, screen elements, scripting, the front end. Everything THUG2 does differently is marked THUG_THUG2; THUG2's own C functions are in Code/Sk/Scripting/thug2funcs.cpp.A THUG2 script calls something the engine doesn't have, or the engine has to know about something new.
Wn32/Code/Plat/The platform layer. Originally Xbox/Win32; here it's SDL2 + OpenGL + miniaudio: graphics, audio, input, files, saves.Anything that talks to the computer: windows, keys, controllers, files.
Scripts/patches/QScript patches parsed on top of THUG2's own scripts (the port's menus, the quick start).You add or change a menu.

The port doesn't edit THUG2's scripts, it patches them. See Scripts: it's the trick every menu here relies on.

How it got here

CommitWhatRead
43aced5THUG1 port, thug2 branch: the THUG1 engine boots THUG2's Data to the main menuChapter 1
e090dc9Its own repository: THUG2 only, three platforms, icon and disk image artChapter 2, Installation
15614f7The main menu wheel's labels: rotation for every screen element, rotated textChapter 3
6860d54Game Options › Screen, Graphics, Keyboard, Gamepad, as script patchesChapter 4, Screen settings
0694250Skating: bails, animations, controls, triggers, balance, level cleanupChapter 5, Controls
eb60480THUG2 PC's save files, byte for byteChapter 6, Saves

How to test a menu without touching it

The game is driven by a file. A small hook in Wn32/Code/Plat/Gfx/p_nx.cpp, active only when THUG_DEBUG_DIR is set, reads one command at a time from $THUG_DEBUG_DIR/cmd: press a key, wait, take a screenshot (the backbuffer, read right before the swap), jump to a level, save the game, quit. Every screenshot on this site, and most of the bugs in the story, came through it.

excerptWn32/Code/Plat/Gfx/p_nx.cpp (test hook)
excerpta test run: Game Options › Screen

THUG2's wheel turns when you press Up, and the skater spins it for you, every single time, like he's trying to win a fridge. Scripted tests made him spin it more times than any player ever will. He never won the fridge.