A 3D Balloon Battle built with Three.js (r128) as a zero-build, classic-script web app.
Game design — balloon rules, the four arenas, AI driving, and the enemy roster — is ported faithfully from tomoto0/balloon_battle (arena collision layouts were extracted from that codebase verbatim). Presentation & handling come from the Mario Kart 3 project: its refined chibi drivers with hands on a working steering wheel, the MK3 go-kart chassis, 150cc driving physics and drift/mini-turbo, item set and icons, the coin system, and the MK64 OST. The title screen shows the classic key art and plays a skippable opening movie.
- Every kart has 3 balloons — red, blue, yellow. Get hit by an item or an enemy and one pops; lose all three and you explode out of the match. Last kart standing wins.
- Falling off the arena costs you a balloon (CPU karts respawn for free — just like the reference).
- If the player is eliminated, the match ends immediately.
- Lightning doesn't pop balloons: victims shrink and slow down for a while, can't use items, and stay vulnerable.
- A mushroom-boost body slam pops a balloon. So does a Star ram.
- Coins (MK3 system): each coin permanently raises your top speed a notch and gives a tiny kick on pickup. They respawn after 8 s.
All four arenas are doubled in size versus the reference, with extra multi-floor structures, themed wall textures, far backdrops, and ambient weather. Matches have no time limit — they run until one kart stands (or the player falls).
| Arena | Theme | Signature |
|---|---|---|
| BLOCK FORT 🏗️ | Neon-night checkerboard, city skyline + starfield | Four 3-story forts, deck ring, big ramps, new drivable center tower, fort flags |
| MEADOW PLAINS 🌿 | Sunny farmland, rolling hills + Peach's castle + spinning windmills | Radial hills, a new elevated boardwalk, a big drivable hill, hay bales, two roaming Chain Chomps |
| CASTLE FORTRESS 🏰 | Lava night, erupting volcano + Bowser-keep silhouettes + rising embers | Brick walls, a new battlement walkway with corner turrets, two courtyard Chain Chomps — and a huge walking Dragon (rams & breathes fire at the player only) |
| SNOW MOUNTAIN ❄️ | Frost peaks, aurora + falling snow + pines | Ice-cracked walls, a new 2-step ice terrace, igloos & crystals, drivable diagonal ice ramps, and a giant Yeti prowling the summit who hits everyone |
Goomba, Koopa Troopa, Lakitu (drops a Bob-omb every 15 s!), Piranha Plant, Chain Chomp, Thwomp, Boo (tails you from behind), Dry Bones, Fireball, Penguin, Mr. Blizzard, Yeti — all positions, patrol patterns, and state machines mirror the reference repo. Regular enemies only hit the player (CPU karts drive through); the boss Yeti crashes everyone.
The Chain Chomp only charges the player: it orbits its post and lunges when the player comes within range — it never chases CPU karts — and every few seconds whips its chain out to full stretch to sweep the ball around in all directions. Its heavy black ball is solid, though: any kart that touches it — player or CPU — loses a balloon. After a crash it retracts and cools down for 7 s. (The boss Dragon also rams and breathes fire at the player only.)
Mushroom, Triple Mushrooms, Golden Mushroom, Green/Red Shells, Triple Green Shells (orbit shield), Banana, Fake Item Box, Bob-omb, Star, Lightning.
- W / ↑ accelerate · S / ↓ brake · A D / ← → steer · R reverse
- Shift hop / drift (hold through a turn for a mini-turbo) · Space use item
- C camera · P pause · M sound · B music
- Touch devices get an on-screen pad (◀▶ steer · ★ item · DRIFT · ACCEL) that doubles as menu input.
git clone https://github.com/tomoto0/fable5_balloon_battle_mk3.git
cd fable5_balloon_battle_mk3
npm start # → http://localhost:5175/game.htmlNo build step, no dependencies (npm start just runs a tiny dependency-free static server). Opening client/public/game.html directly via file:// also works. BGM/SFX degrade gracefully if assets or the Web Audio API are missing.
window.MK namespace, fixed script order (same pattern as the MK3 racing game):
config → utils → audio → input → particles → characters → kart → items →
arena → arenas → scenery → hazards → ai → camera → hud → ui → game → main
arenas.js— pure data extracted from balloon_battle: 3D wall AABBs ([x,y0,y1,z,hw,hd]), floor slabs ([x,y,z,hw,hd]), linear/radial ramps, item boxes, spawns, AI patrol routes, enemy placements.arena.js— the ported physics model: multi-story floors with snap bands, height-banded wall collision (drive under bridges, ride on tops), ramp side collision with pass-under, ride-on diagonal slopes, boundary cushion,'fell'detection.ai.js— the ported route-following controller, deepened: waypoint loops with lookahead corner blending, junction switching, per-CPU personalities (aggression / caution / high-vs-low floor preference / trap IQ), corner pre-braking, evasion of Star/boost-ramming karts, ambush trap drops beside item boxes, wall probes + feelers, hazard dodge, two-stage stuck recovery.hazards.js— the full enemy roster with per-type state machines from the reference.
The code is original to this project. The bundled audio (client/public/music/ — Mario Kart 64 OST), the opening movie (client/public/movie/), and the title key art (client/public/img/) are Nintendo's copyrighted material, included only for this non-commercial fan project — they are not licensed for redistribution.