Open Web Arcade

Three.js racing and driving games you can play in a browser

Open-source car and racing games for the browser, from Three.js to plain canvas: what each one plays like, how it is built and where to read its code.

A car game is one of the first things people try to build with Three.js, and one of the best ways to learn it: a camera that follows something fast, a road or a track, lights, a few models and a physics step that has to feel right at sixty frames a second. This post collects the open-source racing and driving games listed on Open Web Arcade on 29 November 2026. Every one runs in a browser tab with nothing to install, and every one has its source code in a public repository, so you can play it first and then read how it works.

Three of them are built on Three.js. The others use a hand-written WebGL renderer or a plain 2D canvas, and they are here because they solve the same problems in fewer lines, which makes them good reading too. There are no ratings and no rankings below; the descriptions come from the games and their repositories.

Built with Three.js

Rainline is an arcade drifting game in the rain. You drive a late-1980s coupe along a wet coast highway, through tunnels and over a suspension bridge, or around a twisty night circuit, and every slide scores. Wall hits dent the car, and a meme mode called Beaver Run puts a Shiba Inu on a motorbike in the traffic. It is written in TypeScript and the code is MIT licensed, with models, textures and sounds under CC0 or CC BY 4.0. It works with a keyboard, a gamepad or on-screen buttons on a phone. Disclosure: Rainline is made by the people who run this site.

LibreCorsa sits at the other end of the scale: a racing simulator rather than an arcade game. Its developers list 500 Hz physics, tyre temperatures, wet weather, wheel force feedback, AI races and online multiplayer. It is built with Three.js and React, and the code is under the AGPL-3.0, which matters if you plan to run a modified copy as a service: you would have to publish your changes.

HexGL by Thibaut Despoulain is a futuristic anti-gravity racer: you steer a ship around a neon track at very high speed. It is one of the older Three.js games still playable today, written in plain JavaScript on top of Three.js and WebGL. The repository states that its code and resources are MIT licensed unless a file says otherwise, which makes it a common starting point for people who want to see how a complete racing game is put together.

Other open-source racers worth reading

  • JavaScript Racer by Jake Gordon draws a pseudo-3D road on a 2D canvas, in the style of classic arcade racers. It comes with a series of articles that walk through each part, from straight roads to curves, hills and traffic. If you want to understand road projection before you reach for a 3D engine, start here. MIT.
  • 404kph by Jeremy Burns is a retro time-trial racer made for js13kGames 2020, where the whole game must fit in 13 kilobytes. You race for the best time on winding tracks, and a replay can be exported as text so a friend can race against your run. MIT.
  • Highway 404 by Jerome Lecomte is an arcade driving game from the same competition. The motorway is themed on HTTP status codes: 404 breaks the road behind you, 301 moves you to a safer lane, and 418 teapots score extra. MIT.
  • It's a Lovely Day for a Drive by Jay Oster is a slow drive down an empty desert highway with the radio on and the transmission stuck in reverse, made for js13kGames 2015. MIT.
  • WitchCup1276 by Christoph Schansky swaps cars for broomsticks: four courses, rival witches and jinxes that stun them, with points that upgrade your broom. GPL-3.0.

What to look at in the code

Most browser racers split the same way. A fixed-rate physics step moves the car, and the renderer draws whatever state the last step left, often blending between the two most recent steps so the picture stays smooth when the frame rate and the physics rate differ. LibreCorsa lists 500 Hz physics, the rate a simulator wants for tyres and suspension; arcade games get away with far less. Look for the function that advances the simulation and you will find the heart of each game.

The camera is the second thing to read. A chase camera that is rigidly attached to the car feels stiff, so most games let it lag behind and catch up, and widen the field of view as speed rises. The third is the road itself: HexGL and Rainline build their tracks from 3D meshes, while JavaScript Racer builds its road from flat segments projected on the fly, which is why it loads almost instantly.

Mind the licence when you borrow. MIT and the Unlicense let you reuse code with little more than a credit. GPL-3.0 asks you to release your changes under the same terms when you distribute a modified version, and AGPL-3.0 also when you run a modified version that other people use over a network. What makes a browser game open source explains the difference in plain language, and every game page here names its licence and links to the licence file.

Built a car game in Three.js?

If your game runs in a browser and its code is public, it can be listed here for free. A Vite or Three.js build can be uploaded as a zip and played on this site inside a sandbox; packaging a Three.js or Vite game as a zip covers the upload, and how to submit your game covers review. Every listing gets a page with a picture of the game, its licence and a link to its source, and you can add a badge to your README that links back. More driving games are on the racing page, and every Three.js game is on the Three.js page.