Repository navigation
Demos
A demo is a recorded run: the player's input from a level's load, enough for the game to play the same run again, physics and all. Played back, it can be watched with free cameras, saved as a video, or drawn twice with different settings side by side.
In free skate the pause menu has DEMOS:
| Item | What it does |
|---|---|
| RECORD DEMO | The level starts again and records (REC and the time in the corner). STOP RECORDING in the pause menu saves it. F6 does the same |
| PLAY DEMO | The saved demos, newest first: the level loads and the run plays with the game's camera. Any button hands the controls back to you |
| WATCH REPLAY | The demo in the viewer (below) |
| SAVE AS VIDEO | The demo plays and is saved as thug2-decomp-videos\<demo>.mp4
|
From the command line:
| What | How |
|---|---|
| Record from a level's start |
thug2-decomp.exe -level BO -record mydemo; F6 or quitting saves |
| Play back |
-demo mydemo (-demo-quit quits at the end) |
| Save as a video |
-demo mydemo -demo-video out.mp4, then the game quits |
| Every frame as PNG | -demo mydemo -demo-capture <folder> [-demo-every N] |
| From the console |
demo record [name], demo stop, demo play <name>, demo view <name>
|
Demos are saved in thug2-decomp-demos\ next to the exe. [Keybinds] DemoRecord= changes F6.

WATCH REPLAY, -demo <name> -viewer or the console's demo view <name> play a demo in the viewer: a timeline you
can scrub, play / pause, frame steps, 0.1x - 4x speed, a loop region, and cameras - the game's, a free camera, an orbit
camera, fixed cameras and a keyframed camera path (kept in <demo>.camera.txt). SAVE AS VIDEO there saves the
keyframed path.
| Keys | |
|---|---|
| Space | Play / pause |
| Left / Right | A frame back / forward (Shift: a second) |
[ / ]
|
Slower / faster |
| C | The next camera |
| K, Delete | Add a key at the frame shown / delete the selected key |
| I / O, L | Loop in / out, loop on / off |
| U | The HUD on / off |
| V | The split comparison on / off |
| H | Hide / show the panels |
| WASD, Q / E, right mouse button | Fly the free camera |
| Esc | Leave the viewer: the controls are yours from the frame shown |
A video is rendered, not filmed: every frame is drawn and handed to the encoder however long it takes, so a slow export
plays the same run. Settings in [demo]:
| Key | Default | What it does |
|---|---|---|
video_fps |
60 | Frames a second (1-60) |
video_quality |
80 | 1-100 |
video_codec |
auto |
auto (NVIDIA's H.264, else Windows' H.264, else MPEG-4), h264, mpeg4
|
video_scale |
100 | Size in % of the game's picture (10-400) |
Videos have no sound.
The screen-space effects drawn with two sets of settings at once: the ini's [Graphics] left of a divider (A), and
the same with [Compare]'s values over it on the right (B). Drag the divider with the mouse, or Alt+Left / Right.
| Setting | Default | What it does |
|---|---|---|
[Graphics] compare_split |
0 | 1: on from the start (the console's compare on / off, the viewer's V) |
[Graphics] compare_divider |
0.5 | Where the divider is (0.05-0.95) |
[Graphics] compare_labels |
1 | The sides' names at the top (0: none) |
[Compare] <key>=<value> |
none | Side B's values, e.g. rt_ao=1
|
The console: compare on | off | status | divider <0..1> | set <key> <value> | unset <key> | clear | labels <0|1>.
The ray-traced lighting pictures on this wiki were taken with it.
Some settings can't differ per side and are drawn the same on both (named in the viewer's panel): the renderer,
ray_tracing, rt_hdr, the upscaler (off while split), rt_tessellation, rt_relit, msaa, the texture set, and
the effects drawn after the world (art styles, camera effects, grass).
node tools/game/demo_compare.ts --demo mydemo --game <folder> --set A:Graphics.msaa=0 --set B:Graphics.msaa=8
renders the demo once per set of settings and puts the frames side by side (--layout split / wipe / diff), with a
report of any difference in the run.
- Recording and playback are refused online and in network games.
- A demo plays only at the tick rate it was recorded at.
Rendering
- Vulkan renderer
- Graphics options
- Ray-traced lighting
- Reflections
- Relit levels
- Per-pixel lighting
- Sky and fog
- Water
- Grass
- Lamp lights
- HDR and bloom
- Upscaling
- Tessellation
Looks
Gameplay and content
Tools