Dev.to WebDev πŸ›  Dev πŸ‘ 0 πŸ“– 2 min read

I built a multiplayer kart racer that runs in the browser with three.js

I've been working on a side project for a while: Kart Chaos, a 3D kart racer that runs entirely in the browser using three.js and WebGL. No download, no account, and it works on phones too. You can try it here: https://k

I built a multiplayer kart racer that runs in the browser with three.js

I've been working on a side project for a while: Kart Chaos, a 3D kart racer that runs entirely in the browser using three.js and WebGL. No download, no account, and it works on phones too. You can try it here: https://kartchaos.com/?ref=devto

Kart Chaos race in progress

Why a kart racer in the browser?

Kart racers are a great stress test for a web game: lots of moving objects, a camera that has to feel good at speed, physics that needs to be fun rather than realistic, and input that has to feel responsive on both a keyboard and a touchscreen. I wanted to see how far I could push three.js while keeping the "click a link and you're racing" experience.

What's in it

  • Grand Prix – the Chamo Cup, a 5-track cup
  • Versus, Time Trial, and a Daily Challenge that's the same for everyone each day
  • Online multiplayer – create a room, share it with friends, and race with text chat and voice
  • Touch controls for mobile, and no sign-up required

Kart Chaos screenshot

Things I learned along the way

Handling is everything. Arcade kart physics is mostly about faking it well. Getting drifting and steering to feel "right" took far more iteration than any of the rendering work.

Mobile is the real performance target. A scene that runs smoothly on a desktop GPU can struggle on a low-end phone, so a lot of time went into keeping the scene lean and making touch controls feel as direct as a keyboard.

Multiplayer changes everything. Once other players are on the track, you have to care about latency and what each client actually "sees". Adding rooms, chat and voice on top made it feel like a real game night rather than a tech demo.

Kart Chaos screenshot

Feedback welcome

I'd really appreciate feedback from other devs, especially on:

  • how the handling feels
  • performance on low-end phones
  • how the netcode feels when racing others online

Give it a spin at https://kartchaos.com/?ref=devto and let me know in the comments what works and what doesn't. Happy to answer questions about the three.js side of things too!

πŸ“° Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.