All labs

Game · 2026

Hjulben

A pixel-art motocross game in the browser, with its own physics engine, a trail editor and world leaderboards.

Hjulben project

Hjulben is my browser-based motocross game, inspired by the physics-driven handling of the classic Elasto Mania. You build momentum across rolling terrain, shift the rider’s weight, balance wheelies and stoppies, collect every apple, and reach the finish flag without touching your helmet to the ground. The name is a play on Julben – and hjul, the Danish word for wheel.

It runs straight in the browser with nothing to install, and can be saved as an offline-capable web app.

Built from scratch

  • Plain JavaScript modules and Canvas rendering, with no framework and no build step.
  • A custom Verlet-style physics engine featuring suspension, weight transfer, flips, and ragdoll crashes.
  • Procedural sound effects built with Web Audio, from engine revs and brakes to rain and thunder.
  • Dynamic weather, a day-night cycle, pixel lighting, and splashable water, alongside a trail editor where players can build and share their own levels.
  • Keyboard, touch, and gamepad support with remappable controls and a layout tailored for both mobile and desktop.

Records you can trust

Global leaderboards run on Netlify Functions backed by Postgres, with passwordless sign-in via passkeys. Because the physics engine is deterministic, the server replays every submitted run to verify the finish time before accepting it. That keeps the leaderboards clean and lets players race against the ghost of the world record.

Hjulben is a side project, but it’s built with the same care for performance, accessibility, and testing as my client work.

What it demonstrates

  • A custom physics engine gives weight, suspension, and throttle a tactile feel without a game framework.
  • Deterministic physics let the server replay and verify every run before it reaches the leaderboard.
  • A buildless setup and offline-ready service worker keep the game fast to load and simple to ship.