Velocity Blocks
A single-player, block-built time-attack racer for Web, Android and iOS, inspired by the
TrackMania Nations Forever formula: snap road blocks together into a track, drive it as fast as
you can, take every checkpoint, and beat the author time. You can also build and share your own
tracks.
It's a clean-room build. The code, physics tuning, tracks, textures, sounds and the Classic vehicles
are all original, generated in code from scratch. The optional Realistic vehicles are the one
exception: third-party 3D models used under CC BY 4.0 (see Third-party assets).
Velocity Blocks is open source under the MIT License. The MIT license covers the code
only; the vehicle models in public/vehicles/ keep their own license.
Features
- 24-track campaign in three sets, Stadium (A01-A12), Desert (D01-D06: sand, dunes, mesas, sunsets)
and Water (W01-W06: bridges and jumps over lakes and rivers, splash zones), each graded White → Black,
with Author / Gold / Silver / Bronze medals.
Each track is checked by an autopilot that has to finish it. The author time is the lap of the
pro driver, an AI that practised every track per vehicle (see Pro driver and author times).
- Arcade physics with F1-style handling at a fixed 100 Hz tick: a rigid body on four
suspension rays with slip-angle tyres, rear-wheel drive, aero downforce through the springs (fast
corners hold more grip than slow ones), ABS brakes, steering lock that eases off with speed,
traction control (Normal, or Low to let the rear wheels spin), a brake-tap drift, road adhesion
over crests, boost and turbo pads, and jump ramps.
- Racing line: an optional coloured line on the road (green: full throttle, yellow: lift, red:
brake) from a pace driver that plans with the car's real grip and braking limits. The 12 campaign
lines are precomputed; custom tracks get theirs worked out in the background. Toggle it in the
pause menu.
- Off-road: ground-level roads have no barriers, so you can drive onto the grass, which has
less grip and tops out around 100 km/h. Raised decks keep their barriers, and gate posts,
pillars and embankment sides are solid. A checkpoint only counts when you drive through its
gate, between the posts, so a grass shortcut can't skip one.
- Time attack rules: a 3-2-1 countdown, a 10 ms timer, checkpoints in any order, a flying
respawn at the last checkpoint (the clock keeps running), and an instant restart. A car stuck on
its roof or side for 3 seconds goes back to the last checkpoint by itself (a warning bar on the
HUD fills up first), or restarts if no checkpoint has been passed.
- Driver profile: the main menu is a home page with your profile card on top; tap it to edit.
Set a photo (gallery or camera, cropped to 192 px and only used by the game, never uploaded),
a name, the car colour and body style, the starting camera, steering, pedals, traction control,
the racing line and auto-accelerate. A skippable setup page asks for the photo and name on first
launch.
- Body styles: Racer, Buggy, Muscle and Formula (open wheels, wings and halo). They are looks
only: every body uses the same physics.
- Photo badge: your photo (or a dummy silhouette when none is set) floats above your car while
you race and in replays, and a dimmed copy rides on the personal-best ghost. It hides in the
hood camera and can be switched off in the profile.
- Ghosts: one target ghost at a time: Gold until gold is won, then the Author, then your
personal best, with its line drawn on the road for the whole lap. A live gap to it (green ahead,
red behind) with the gap at every checkpoint, and a tag over it that stays on screen when it is behind
you. Pause > Chase picks another target.
- Replays with chase, far and trackside cameras at 1x, 0.5x and 0.25x speed, telemetry from the
run's input log (gas and brake %, steering, nitro, speed, splits), and the line the car drove (or the
ideal racing line) on the road. Your best lap is one tap away on every campaign card (▶ Best lap),
and the author's lap is on the results card.
- Sharing: a replay shares as a video (recorded with its telemetry; the system share sheet) or as
a run link that drives the same lap in anyone's game, verified against its time, to watch or race.
- Track editor: 15 block types (water and splash zones too) on a 32 × 32 grid with 8 height levels. Rotate, erase, undo,
route validation, an autopilot check, test drives (your first finish sets the author time), and
save, export and import as
.vbtrack.json.
- Controls: keyboard, gamepad (analog triggers) and touch. On touch, steer with the ◀ ▶ buttons,
an on-screen steering wheel or by tilting the device (gyro), and drive with analog gas and brake
bars on the side (or round on/off pedals). Switch steering from the pause menu, Settings or the
driver profile. Auto-accelerate is in the driver profile.
- Android pause handling: the touch controls keep out of the system gesture strips (and ask
Android to exclude them from the back gesture), a Back swipe that the system takes from a thumb
on the controls is ignored during a race (tap ❚❚ to pause), and a brief loss of focus (a
notification, an overlay) no longer pauses the race. The pause screen says why it paused, with a
small diagnostics line.
- Procedural everything: textures drawn on canvas (asphalt with a roughness map, kerbs, turf,
concrete), cars built from lofted and rounded parts with real wheels and lamp glow, a stadium
with stands, roofs, floodlights, LED boards, trees and hills, a sky with clouds, image-based
lighting, soft shadows, and bloom on High (desktop). Web Audio engine, tyre and wind sounds.
Graphics quality: Low, Medium (phones) and High. Append
?fps to the URL for a frame-rate overlay.
여기까지가 README 앞부분입니다. 나머지는 원문에서 읽을 수 있습니다. README 전문 보기 ↗