Test store. Prices are the planned list prices stored as test data, license terms are drafts, and payments go to a Stripe test-mode account. No real money moves.

HTML5 Racing Game Source Code

3D arcade driving, drifting and rally with tuned handling. Every game is playable in the browser and ships as a buildable TypeScript project.

5 games in this collection

Tiny Rally

  • Three.js
  • Build-verified source

Race short miniature rally stages where gravel, mud, snow, sand and tarmac each change how your toy car grips, slides and lands.

Filters

How to choose HTML5 racing game source code

All four racing games here are 3D, built on Three.js r186 and written in TypeScript. Their initial downloads are small for 3D, between 300 and 382 KB, and each one has a daily challenge, upgrades, cosmetics, local saves and support for touch, mouse, keyboard and gamepad. The real difference is the kind of driving: two circuit racers with ghost replays, one endless highway game and one route-planning game against the clock.

Racing game specs

GameDriving styleModesOrientationInitial download
Drift DistrictArcade drifting on compact urban circuitsCampaign, daily, ghosts, upgradesLandscape325 KB
Tiny RallyMiniature rally stages on five surfacesCampaign, cups, AI rivals, ghosts, dailyLandscape382 KB
Traffic ThreadEndless highway weaving with near-miss boostEndless, missions, daily, upgradesPortrait and landscape300 KB
Delivery Dash 3DDelivery routes through a small open cityCampaign, daily, upgradesLandscape340 KB

Handling, physics and who each game suits

Drift District is about style: players chain slides around tight city circuits and earn reputation for style and speed, then race their own ghost. It uses the Rapier physics engine (@dimforge/rapier3d-compat) alongside Three.js. It suits sites whose players come back to beat a time.

Tiny Rally turns the car into a toy on diorama stages. Gravel, mud, snow, sand and tarmac each change how the car grips, slides and lands after jumps, and cups against AI rivals give it a career structure. It also runs its car physics on Rapier.

Traffic Thread is the quickest to pick up: swipe between lanes in dense traffic, and near misses fill a boost that multiplies the score. Police and weather add variety. It is the only racing game here that plays in portrait, which makes it the natural pick for a mobile portal.

Delivery Dash 3D is part driving, part management. Players choose profitable delivery routes through a compact open city before the shift timer runs out. It fits brands with a delivery or logistics theme as well as game sites.

What you can customize

  • Tracks, stages and shifts. In Drift District and Tiny Rally, tracks, stages and daily events are defined in data files under data/, and Delivery Dash 3D keeps its shifts there too, so you can retune them without rewriting the game.
  • Branding. Change the title and description, colors and fonts, then rebuild. The product page's customization recipe shows the steps for a quick rebrand.
  • Cars and look. Rename the game, recolor or replace cars and scenery. ASSETS.md lists where each model, texture and sound comes from, including anything generated in code.
  • Performance. A quality URL parameter lets a host start the game at a lower quality setting on weaker devices.

New to 3D in the browser? Our guide to 3D HTML5 games explains what Three.js handles and where physics engines such as Rapier come in, and Three.js game source code lists every 3D game we sell.

Frequently asked questions

Do you have a 2D car racing game source code?

Not at the moment: all four racing games are 3D. If you want to learn the basics in 2D first, our free racing game code is a single HTML file with a tutorial, under the MIT license. You can also suggest a racing game for the roadmap.

Is any of the racing games multiplayer?

No. All our games are single-player. Ghost replays in Drift District and Tiny Rally and AI rivals in Tiny Rally give players something to race against without a server. Our guide to multiplayer HTML5 games covers what adding real-time racing would take.

Will a 3D racing game run well on phones?

The initial downloads are 300 to 382 KB, and the quality parameter helps on low-end hardware. We run end-to-end tests on desktop Chromium, Firefox and WebKit and on emulated Pixel 7 and iPhone 15 profiles, but emulation is not a real phone. Play the demo on the devices your players use before you buy.

Can I use the racing games for a client or a portal?

Yes, with the right license. Standard covers one end product with one production web deployment. Extended covers up to 5 end products including client work, or up to 3 portal domains your company owns. The licensing page compares both; the terms are drafts until legal review.