← VoxelBlox: the engineering notes
VoxelBlox · a game within a game

Voxel Racers

An arcade racing game that lives inside the VoxelBlox world. Press P anywhere, pick a track and a car, and the course is built into the world around you: real terrain, real blocks, eight rivals with their own voices and an announcer calling the race.

The trailer: real races filmed through the game's own renderer, each with the game's own engines and effects, under the Voxel Racers theme.
21
tracks, from Neon Night and Frozen Lake to Jupiter Run and the Moon Base
11
cars, each with its own way to win: speed, grip, drift or off-road
8
rival drivers, each a personality with 50+ spoken lines
145
announcer calls, three takes each so none repeats twice running

What it is

How the trailer's sound was recorded

The game films itself: film.py plays a race through the real renderer with the HUD hidden and pipes each frame to an encoder. A frame at 1080p can take far longer to make than it lasts, because every frame waits for the whole view to stream in. That broke the obvious way to record sound. The audio device mixes on the wall clock, so during a film it would run about ten times ahead of the pictures.

Instead the recording sits inside the mixer. A film replaces the mixer's channels with recording channels that behave as the device's do (play, loop, queue, pan, fade). After each game step they mix exactly that step's worth of sound, so frame N's sound lands at N / fps no matter how long the GPU took. A gated check holds it to the sample: three seconds of frames make three seconds of sound, a hit played at 1.0 s is on the tape at 1.0 s, and a sound on the left is in the left ear at the mixer's own pan.

The first cut had too many voices. The game's announcer and the rivals' radio talked in every gap the narrator left. Ducking can only turn them down, so the recorder now keeps two stems, the game and its voices, using the mixer's own record of which channel is speaking. The trailer keeps the engines and drops the in-game chatter except at the start, so only one voice is speaking at a time.