THUG2 on a Mac
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.

Installation
Build it, run it, ship it
Graphics and sound
Pixels and noise
How save works
THUG2 PC's .SKA files, as they are
Screen settings
Window, fullscreen, resolution, 60/120 fps
Controls
Keys, contexts, and the front end that wasn't
Keyboard settings
Rebindable keys in Game Options
Gamepad settings
Rebindable buttons in Game Options
Button hints
No more triangles on a keyboard
Controllers
SDL game controllers, hotplug, rumble
Remaster
Shadows, bloom, blur, one checkbox
Scripts
Patching THUG2's scripts without touching them
The story
How THUG turned into THUG2, commit by commit
The map
Three layers, and almost every guide touches all three:
| Folder | What lives there | Touch 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
| Commit | What | Read |
|---|---|---|
43aced5 | THUG1 port, thug2 branch: the THUG1 engine boots THUG2's Data to the main menu | Chapter 1 |
e090dc9 | Its own repository: THUG2 only, three platforms, icon and disk image art | Chapter 2, Installation |
15614f7 | The main menu wheel's labels: rotation for every screen element, rotated text | Chapter 3 |
6860d54 | Game Options › Screen, Graphics, Keyboard, Gamepad, as script patches | Chapter 4, Screen settings |
0694250 | Skating: bails, animations, controls, triggers, balance, level cleanup | Chapter 5, Controls |
eb60480 | THUG2 PC's save files, byte for byte | Chapter 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.
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.


