🚇 I Accidentally Built a Full 3D Endless Runner Game in the Browser (It’s in KBs btw)

Published: (January 15, 2026 at 08:21 AM EST)
4 min read
Source: Dev.to

Source: Dev.to

Source: Dev.to – I Accidentally Built a Full 3D Endless Runner Game in the Browser (It’s in KBs btw)


Cover image for “I Accidentally Built a Full 3D Endless Runner Game in the Browser (It’s in KBs btw)”

Screenshot 1
Screenshot 2
Screenshot 3


Hey devs, Ishant here 👋

Quick question before we start:

  • Why does every web game need to be ~200 MB?
  • Why does my phone sound like a jet engine the moment I open them?

So I did something irresponsible… again!

In ~6 hours, fueled by coffee and poor decisions, I built Metro Runner — a full‑3D endless runner that runs entirely in the browser.

  • No Unity.
  • No Unreal.
  • No Godot.
  • Just Three.js, React, and Audacity. 💀

📦 Size Flex (Chrome Users Don’t Know This)

Metro Runner is a Progressive Web App (PWA). This means:

  • Chrome already includes the rendering engine.
  • Three.js is shared across sites.
  • All assets are delivered as CSS and lightweight resources.

Actual download size: only a few hundred KB (yes, KB, not MB or GB).

You can:

  1. Open the site.
  2. Install the PWA.
  3. Launch the game from your home screen.

Chrome users often don’t realize they’ve already downloaded half the engine simply by using Chrome. (I’m one of them! 😂)

🎮 What Is Metro Runner?

Metro Runner is a 3D endless‑runner browser game featuring:

  • Three‑lane movement
  • Jump / slide mechanics
  • Increasing speed as you progress
  • Coins & power‑ups to collect
  • An in‑game shop for upgrades
  • Multiple biomes with distinct visuals
  • A quirky UFO abduction event (more on that later 💀)

Think Subway Surfers, but:

  • Runs natively in the browser
  • Fully 3D graphics
  • Much more unhinged

👉 Play it here: [Insert game link] (replace with the actual URL)

🧠 “Did you use a game engine?”

No 😏

It’s built with React Three Fiber (Three.js) and:

  • Custom game loop
  • Manual collision logic
  • Fake speed via world movement (delta‑time‑based motion)

The player barely moves forward; the world rushes toward you—a classic illusion that remains undefeated.

🚂 Trains, Ramps, and a Bug That Became a Feature 💀

At high speed, sometimes:

  • The player hits a train ramp
  • Trips, gets launched, and dies 💀

I tried fixing it (sweep collision, alignment tweaks, debugging at illegal speeds).

Did it work? No.

So I did what every sane developer does: If you can’t fix a bug — promote it to gameplay.

🧠 Lore Update

Some train ramps are slightly misaligned with coaches. At high speed, sloppy jumps lead to a skill‑based punishment (you get knocked off and game over).

Now it’s not a bug; it’s intentional.

🚂 Train Systems (a.k.a. Pain Generators)

  • Regular trains – static + moving
  • Triple‑train ramp sections (~10%) – all lanes blocked, ramps on top, huge coin reward
  • Train‑hopping sections (~10%) – jump between trains across lanes; miss once = back to menu 💀

Trains have real collision—no ghost clipping.

👽 Alien Abduction Event (I Lost Control Here)

Random event during runs:

  1. UFO appears
  2. Green lights & tractor beam
  3. Screen fades
  4. Teleport to a new biome
  5. +25 free coins and temporary invincibility

Is it realistic? No.
Is it funny? Absolutely. 🛸

⚡ Power‑Ups (Yes, Those Particles Are Real)

Power‑UpEffect
🧲 MagnetPulls coins
👟 Super Boots2× jump height
🛹 HoverboardOne free crash
🚀 HeadstartRocket boost
✖️ MultiplierDouble coins
🚀 JetpackFly above obstacles

Those particles (wind streaks, speed lines) aren’t just “visual effects”; they sell the illusion of speed. Jetpack particles come from the jetpack, not vibes.

🏪 Shop System (I Went Too Far)

  • Buy power‑ups with coins
  • Upgrade magnet duration (up to 6 levels)
  • Choose starting power‑ups

The inventory persists via localStorage. Close the tab, reopen later—your grind is saved. 😤


🌍 Biomes

  • 🚇 Subway
  • 🏙️ City
  • 🌲 Forest

Biome switches are forced, so runs don’t feel copy‑pasted.


🥚 Easter Egg

Click the game title in the menu.
That’s all I’ll say 😏


🔧 Tech Stack (a.k.a. Bad Decisions)

  • React + TypeScript
  • Three.js (via React Three Fiber)
  • Custom collision logic
  • Particle systems
  • PWA (installable, offline‑friendly)
  • Saved state via localStorage

No engine, no physics library babysitting—just math, timing, and vibes.

🧠 Why I Built This

I wanted to see: Can a real 3D game live comfortably in the browser… and still feel good?

Turns out — yes. And it fits in KBs, which still feels illegal.


🙌 Feedback

Feel free to drop comments, suggestions, or just say “wow!”

Roasts Welcome

If you play it:

  • Tell me where you died.
  • Tell me which ramp betrayed you.
  • Tell me if the UFO jump‑scared you.

Now excuse me while I pretend this was “just a quick experiment.”

Ishant 🖤

Back to Blog

Related posts

Read more »

Virtual 3D Museum - Three.js

So, I was shitcanned recently and said to myself: “Hey, why not actually learn something new and interesting for once?” Three.js has been high on my list for a...

Cigarette smoke effect using shaders

Article URL: https://garden.bradwoods.io/notes/javascript/three-js/shaders/shaders-103-smoke Comments URL: https://news.ycombinator.com/item?id=46497589 Points:...