Vulcan native 3D engine
  • Zig 83%
  • GLSL 10.9%
  • Python 4.9%
  • C 0.8%
  • Shell 0.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Krzysztof Krystian Jankowski 13ad5c51aa Mach 3: fix terrain chunk seams and road z-fighting far from the origin
The engine renders in absolute f32 world space. A whole 9-zone cycle on one
rail reached ~100 km from the origin, where f32 vertex precision (~8 mm)
opened cracks between chunks and made the road decal (5.5 cm lift) z-fight
the terrain. Each ground zone now flies its own world (seed) with its rail
centred on the spine origin, keeping |x|,|z| < ~14 km (<= 2 mm precision).
The world is re-seeded during the warp / zone card; the time of day still
follows cycle progress.
2026-10-19 23:02:02 +02:00
assets Add Mach 3: into-the-screen rail shooter on the engine 2026-10-19 19:09:01 +02:00
blender Add Mach 3: into-the-screen rail shooter on the engine 2026-10-19 19:09:01 +02:00
deps water update 2026-08-18 01:19:42 +02:00
docs Simplify to physics, car dynamics and drone flight on one infinite road 2026-10-19 16:44:36 +02:00
games Mach 3: fly the real Track Zero terrain with cliff rocks and a day cycle 2026-10-19 22:07:27 +02:00
shaders Add Mach 3: into-the-screen rail shooter on the engine 2026-10-19 19:09:01 +02:00
src Mach 3: fix terrain chunk seams and road z-fighting far from the origin 2026-10-19 23:02:02 +02:00
tools Simplify to physics, car dynamics and drone flight on one infinite road 2026-10-19 16:44:36 +02:00
.clangd Box3D, new car, torus tracks 2026-08-26 01:03:34 +02:00
.gitignore Clean local folder: drop stale docs, SDK leftovers and build junk 2026-10-19 15:28:05 +02:00
.gitleaks.toml phase 7.4 2026-08-23 15:01:19 +02:00
build.zig Mach 3: fly the real Track Zero terrain with cliff rocks and a day cycle 2026-10-19 22:07:27 +02:00
build.zig.zon upd 2026-08-12 03:41:13 +02:00
BUILDING.md Simplify to physics, car dynamics and drone flight on one infinite road 2026-10-19 16:44:36 +02:00
compile_flags.txt Box3D, new car, torus tracks 2026-08-26 01:03:34 +02:00
embedded_assets.zig Simplify to physics, car dynamics and drone flight on one infinite road 2026-10-19 16:44:36 +02:00
icon.ico cleanup 2026-08-08 21:31:15 +02:00
mach3-game.md Add Mach 3: into-the-screen rail shooter on the engine 2026-10-19 19:09:01 +02:00
pyrightconfig.json Box3D, new car, torus tracks 2026-08-26 01:03:34 +02:00
README.md Add Mach 3: into-the-screen rail shooter on the engine 2026-10-19 19:09:01 +02:00
track_zero.rc SD 2026-08-08 12:41:36 +02:00

Track Zero

A Zig/Vulkan driving sandbox: one infinite road through an infinite procedural world.

The project is focused on physics, car dynamics, and drone flight. It contains no world editor, terrain destruction, multiplayer, NPCs, weapons, or combat.

Features

  • Box3D-powered cars with suspension, gears, damage, wheel input, and force feedback
  • Infinite procedural terrain with mountains, dunes, water basins, and procedural rocks/cliffs
  • One infinite road that winds around mountains and water (src/game/world/road_spine.zig)
  • On-foot character, chase/driver car cameras, and a six-axis utility drone
  • Vulkan 1.3 renderer with ray-traced shadows, SSGI, volumetrics, and GPU-driven scene culling
  • Data cartridge packaging for assets and shaders

Build

Requirements: Zig 0.16, Vulkan 1.3 ray-query support, and the vendored dependencies in deps/.

zig build            # retail package
zig build run        # build and run
zig build test       # client, game, and engine tests

Mach 3, a remake of Loriciels' 1987 into-the-screen shooter (design in mach3-game.md), ships as a self-contained exe on the same engine:

zig build mach3       # zig-out/mach3.exe (shaders, ship and profile embedded)
zig build mach3-run   # build and run
zig build mach3-test  # Mach 3 simulation/audio/profile tests

Tuning lives in games/mach3/game.toml.

See BUILDING.md for platform setup and packaging details. Linux / Steam Deck builds run on a Linux box: sh tools/build-deck.sh — see the Linux / Steam Deck section in BUILDING.md for the flow and its verified-vs-untested matrix.

Controls

Input Action
WASD / arrows Move, fly, or drive
F Enter or exit the nearest car
R Ignition
Q / E Shift gear (car) / roll (drone)
Space Handbrake (car) / jump / climb (drone)
Tab Toggle chase/driver camera or on-foot/drone view
Home Open the admin panel (time of day, debug views, road teleports)
End Open wheel setup
F1 Help
F2 Audio
F11 Fullscreen
F12 Performance stats

Layout

  • src/engine/ — platform, rendering, physics, audio, assets, and core utilities
  • src/game/sim/vehicle.zig — car simulation and rendering extraction
  • src/game/camera.zig — on-foot, car, and drone flight cameras
  • src/game/world/ — procedural terrain, the infinite road, rocks, water, and collision
  • src/game/ui/ — HUD, admin panel, and wheel setup panel
  • src/apps/client/ — desktop application
  • games/track-zero/game.toml — world, vehicle, wheel, visual, and asset profile