I Built a Realistic 3D Motorcycle Game in My Browser: BlueBird, Apex and Dune

A few weeks ago, the 3D drive-around on this blog had a problem. The cars looked fine, but the bikes looked like toys. So I set out to fix that: a realistic motorcycle that leans into corners, jumps, climbs and feels like a real bike, all running inside a normal web page with no download. This is the story of how it went from a cartoon to three bikes you can ride today.

You can try it right now: play the ZenByte Explore 3D game, open the Garage, and pick a bike.

Where it started: a cartoon bike and a photo

The first bike in the game was a rounded, plastic-looking shape with a rider made of blobs. It worked, but nobody would call it real. So I did what any bike lover would do and sent a reference: a photo of a blue roadster with gold upside-down forks, a round headlight, black alloy wheels and a silver upswept exhaust. I also sent a photo of myself, because I wanted the rider to be me: glasses, short dark hair, a trimmed beard and moustache.

The bike got a name, BlueBird, and the rider became Pratik. That one decision changed how the whole project felt. It stopped being a demo and became my bike.

First attempt at the BlueBird roadster in the 3D game, flat colours and simple shapes
The first BlueBird: right shape, but flat colours and simple parts.

Making metal look like metal

Realism in 3D is mostly about light. Chrome and glossy paint only look right when they reflect something, and my first real attempt turned every shiny part completely black. The cause was a reflection-map technique that the browser graphics code did not like. The fix was to build a simple sky-and-studio reflection a different way, and suddenly the tank had a glossy clear-coat, the forks glowed gold and the exhaust looked like steel.

Realistic blue BlueBird roadster motorcycle with glossy paint, gold forks and a rider in a 3D browser game
BlueBird now: glossy paint, gold forks, chrome exhaust and a rider with a proper jacket shape.

The details people actually notice

  • Real hands. Gauntlet gloves with knuckle guards, four curled fingers and a thumb wrapped around the grip, plus brake and clutch levers and switch pods.
  • A working dashboard. A speedometer dial with a needle, a digital readout and a gear indicator that updates as you ride.
  • Tail light and pedals. An LED tail light that brightens when you brake, a number plate, foot pegs, a gear lever and a brake pedal.
  • Handlebars that turn. The bars, forks, headlight and gloves now steer left and right with you.
Close-up of motorcycle handlebar, gloved hand, brake lever and mirror in a 3D browser game
Close-up of the cockpit: gloved hand, lever, mirror and switchgear.

Three bikes, three personalities

One bike is nice. Three that behave differently are a garage. Each has its own look, riding position, suspension and sound of its own.

BikeStyleBest for
BlueBirdClassic roadsterRelaxed cruising and the city
ApexFull-fairing sport bikeSpeed on the highway
DuneTall adventure bikeOff-road, rocks and jumps
Blue Apex full-fairing sport motorcycle with a rider in a 3D browser game
Apex: the sport bike, with a crouched rider and a tail hump.
Dune adventure motorcycle with knobby tyres, windscreen and rear rack in a 3D browser game
Dune: knobby wire wheels, a beak fender, a windscreen and a rear rack.

How it feels to ride

A bike that looks real but rides like a car is a letdown, so the feel got as much work as the looks. Steering gets lighter at speed. The bike leans into corners. Hard acceleration lifts the front wheel and hard braking tips it forward. Nitro burns blue, and the exhaust sometimes snaps out a yellow flame with a pop. The suspension soaks up bumps and rebounds after a jump, and the Dune is set up to climb much steeper slopes than the road bikes.

One bug worth sharing. For a while the handlebars simply never turned, even though the steering code existed. The link between the steering input and the fork had been lost along the way. Testing by actually riding, not just looking at a still picture, is what caught it.

Crashes that look like crashes

Riding fast means occasionally hitting things, so the break effects got an upgrade as well. Early on, trees and buildings shattered into perfect little cubes, which looked more like a block game than a real crash. Now buildings fall into irregular concrete chunks and dust, trees split with a layered sound of cracks, creaks and a heavy thud, and the dust is earth-coloured instead of a strange green cloud.

What I learned

  1. Start from a real reference. A single photo gave the whole project direction.
  2. Preview before going live. Every change was checked in a preview first, which saved me from shipping the black-metal bug.
  3. Feel matters as much as looks. Lean, suspension and sound do more for realism than extra polygons.

I built this together with an AI assistant, which handled the 3D modelling and physics code while I made the creative calls: the bike, the name, the rider and what had to feel right.

How to ride the bikes

  1. Open the ZenByte Explore page.
  2. Tap Garage and choose BlueBird, Apex or Dune.
  3. Press Play the world and ride. On a keyboard use W or Up to accelerate, S to brake, A and D to steer, Shift for nitro. On a phone, use the on-screen buttons.

Frequently asked questions

Is the 3D motorcycle game free?
Yes. It runs in your browser on this blog, with nothing to install.

What is it built with?
The three.js 3D library, plain JavaScript and the browser graphics engine (WebGL).

Can I play it on my phone?
Yes, it is designed for both phones and desktop browsers. A recent phone gives the smoothest ride.

Which bike should I pick first?
Start with BlueBird for a gentle ride, then try the Dune off the road.

Have a bike you would like to see in the Garage? Tell me in the comments.

Comments

Like ZenByte? There's more on OutOfBoxxi.Free tools, daily reads and an anonymous wall to share what you feel.
Go to OutOfBoxxi ↗