🎮 Tank Town

My submission for Vibe Jam 2026 where 90%+ of the game needs to be made with AI.

View Live Project →

Tank Town is a 3D multiplayer tank game built with Three.js for the Vibejam 2026 game jam. Inspired by the 1985 NES classic Battle City – rebuilt from scratch with procedural rubber-hose cartoon art, real-time online multiplayer, and a 12-level single-player campaign. Solo-developed over four weeks, 95%+ vibe coded with AI. There are no game engines or build steps. All written in JavaScript, WebSockets, and custom GLSL shaders.

Play it here: tanktown.xyz

Read the build story: I Built a 3D Multiplayer Tank Game in a Month


Tech Stack

  • Rendering: Three.js (v0.170) – no build step, ES modules via CDN import map
  • Server: Node.js + Express + WebSocket (ws library) on a Hetzner VPS
  • Database: SQLite for leaderboards, stats, and visit tracking
  • Audio: Web Audio API with procedural 8-bit synthesis + CC0 samples from Kenney.nl
  • Shaders: Custom GLSL for toon materials, world curvature, water, scorch marks, wind, color grading
  • AI: Claude Opus 4.7 (95%+ of code generated via vibe coding)

Features

  • 12-level single-player campaign with procedural level generation
  • Online co-op (2 players, shared base defense)
  • PvP deathmatch (1v1, best of 5 rounds)
  • PvP base defense (destroy the opponent’s base)
  • Matchmaking (auto-pair with strangers) + private rooms
  • Procedural rubber-hose cartoon art style – tanks, terrain, effects, HUD
  • 7 power-ups (star, shield, freeze, grenade, extra life, shovel, speed boost)
  • 4 enemy tank types with distinct AI behaviors
  • 3 camera modes (top-down, 3D chase, cockpit)
  • Mobile touch controls with virtual joystick
  • Installable as a PWA
  • Client-side prediction, entity interpolation, server-side lag compensation
  • Public stats page with global player counts and SVG graphs

Changelog

5 May 2026 – Stats page, grass meadow, cartoon dirt floor

Public stats screen added to the main menu showing six global numbers – players worldwide, countries, tanks destroyed, hours played, levels completed, total visits – plus three SVG graphs (daily visits, level drop-off, top countries). No chart library. Co-op kills now count toward the global total.

A wind-blown grass meadow now wraps the arena – there are now thousands of instanced blades swaying in sync. Inside the arena, a refreshed cartoon dirt floor with bigger patches, ink scratches, and mud near water. The floor records what happens on it too – chevron tank tracks stamp in as you drive, scorch craters mark explosions, and ambient dust puffs drift across the field.

1 May 2026 – 3D splash screen, cinematic spawns, menu rebuild

Splash screen rebuilt as a full 3D scene with two real in-game tanks that drive in, idle, and chat in speech bubbles. Click triggers a cinematic – tanks turn to camera, fire, comic BOOM explosion, screen shake.

Cinematic level-start spawns. Your tank rises through opening steel doors on a metal pad. Enemies burst up through cartoon flame plumes. Power-ups descend on a light beam, bounce on landing, and can’t be picked up until they touch down.

Start menu restructured – “Single Player” hero button, secondary row (Multiplayer + Leaderboard), smaller tertiary row (How to Play, Options, Stats, About).

30 April 2026 – Visual overhaul, curved-world horizon, soundtrack

Full art-direction reset. Bloom removed (was washing out the cartoon outlines). Toon shading brightened. Color grading rewritten with saturation boost and contrast.

New curved-world shader bends the ground plane into a tiny-planet horizon. Forest expanded from 80 to 140 trees with cloud trees, willows, ponds with lily pads, and winding rivers.

Four-track original soundtrack with per-level shuffle rotation. Music fades in over the level intro.

29 April 2026 – Pause, NES levels, power-up popups, performance

Single-player pause (Esc + rebindable key, mobile button) is now working. Resume, Options, and Quit overlay. Music keeps playing, SFX muted. Game now also auto-pauses on window blur.

Original NES level rebuild started – built a sub-tile paint tracer tool to match the 1985 originals at full fidelity. First two stages hand-traced and shipping.

Rubber-hose power-up pickup popups with per-type cartoon sound stings – wood-block doink for shield, wind-chime for freeze, zip for speed. Timed buffs show a countdown badge at the top of the screen.

Multiplayer performance pass. Fixed an audio allocation bottleneck that was freezing the game on explosions. Added particle system pooling and capped server tick catch-up. Tracked down a room-membership leak where sockets could silently join multiple rooms – this was the root cause of the growing snapshot rate players were seeing.

26 April 2026 – Options redesign, multiplayer regression fixes

Options menu redesigned as master-detail with a category sidebar (Audio, Graphics, Controls). Fixed two multiplayer regressions – double popup on local fire and tanks going invisible in co-op.

25 April 2026 – Netcode pass for high-latency multiplayer

Three-tier latency mitigation triggered by a Singapore-to-Europe playtest (~220ms round trip).

Tier 1 – felt-lag fixes. Bullets now fire instantly on your screen instead of waiting for the server echo. Tanks slide into corrections instead of teleporting on desync.

Tier 2 – adaptive smoothing. The interpolation buffer adjusts to your connection quality. Remote bullets now emerge from the shooter’s barrel instead of popping into existence mid-air.

Tier 3 – server-side lag compensation. The server rewinds opponents to where the shooter actually saw them, so shots land where you aimed. Capped at 250ms to keep “shot around a corner” bounded.

23 April 2026 – Matchmaking, rematch, PWA install, stats overlay

Matchmaking went live. User now just needs to pick a mode (co-op, deathmatch, base defense) and get auto-paired with another player. Room codes are now reserved for private online games with friends.

Play Again buttons on all end-of-match screens. Both players click, fresh match starts instantly.

Lobby split into Matchmaking and Private Game paths. Legacy texture modules cleaned up (~1,378 lines were removed).

Installable as a PWA from mobile Safari or Chrome desktop.

Opt-in stats overlay in Options – shows FPS, ping, jitter, packet loss, and server update rate for self-diagnosis.

21 April 2026 – UX sprint, tutorial, new domain

Movement forgiveness on wall corners – when your tank catches on a brick edge with a gap right beside you, the game nudges you through instead of blocking. Enemies skip this so difficulty doesn’t shift.

Rotating team-color ring under the player’s tank so you can spot yourself in a busy fight. “1P”/”2P” marker pops above bushes when you drive into cover.

First-time tutorial – four overlays on level 1 (mission, controls, power-ups, reference). Replayable from Options.

Tank upgrade colors (bronze, silver, gold) now persist across level transitions.

Moved to tanktown.xyz. Old subdomain redirects.

20 April 2026 – Full cartoon makeover, camera modes, minimap, server hardening

Originally shared on X.

Three days spent turning Tank Town into an actual cartoon game. Full rubber-hose makeover – surfaces, tanks, power-ups, HUD, menus, all of it – built on a new shared toon material and ink-outline system. Terrain rebuilt across the board (bricks, steel, ice, bushes, base tower, ground), plus cartoon bullets with trails and muzzle puffs, 3D water pits, and a forest environment replacing the old container-in-the-sea look. Comic popups on shoot and death.

Every tank rebuilt as a procedural cartoon silhouette – five distinct shapes (player, basic, fast, power, heavy), each with its own proportions and personality, breathing, bouncing, leaning into turns, recoiling on fire. Star upgrades swap the palette through bronze, silver, and gold.

Added 3D and cockpit camera views alongside the classic top-down, plus a minimap radar that appears in the two new modes – green scanline sweep with periodic interference bursts. Defaults live in Options, but both camera and minimap can be changed mid-game too.

New 7th power-up – speed boost, +50% speed for 10 seconds with a dust trail – and spawn weights rebalanced so stars stay the common drop and speed/extra life stay rare.

Server cleaned up and hardened for stability (origin checks, rate limiting, reconnect backoff, round-end guards). Mobile experience optimized for some browsers – shadow map halved, bloom dialed back, input font sized so iOS Safari stops auto-zooming. Held-fire bug fixed, along with a bunch of others.

Also shipped Open Graph/Twitter Card previews and the Vibejam 2026 entrant widget. Not bad for a weekend mostly spent with family.

YouTube video

16 April 2026 – Splash screen, camera modes, tank controls, audio

Originally shared on X.

Most of the day went into generating and mixing SFX and theme music, primarily through ElevenLabs. Stock samples filled in the gaps wherever AI-generated audio wasn’t ready yet — intros, level transitions, shooting, explosions.

Per-level intro sounds are in now, though still a work in progress — every level has a default sting for now, more custom ones to follow. Volume controls added to Options, and the splash screen shipped with its own sound toggle.

Cheats disabled. Cleaned up a pile of legacy assets and closed out an XSS hole. Also: new favicon.

YouTube video

15 April 2026 – Mobile overhaul, How to Play, real audio, menu layout

Originally shared on X.

How to Play screen with controls legend that auto-adapts to touch vs desktop, mode descriptions, and power-up reference.

Mobile overhaul – safe-area insets, portrait orientation gate with animated rotate icon, fullscreen toggle, soft-keyboard-tuned name input. Two-column menu layout for landscape phones.

Six core sounds replaced with real audio samples (CC0 from Kenney.nl, ~122 KB total). Original synth code kept as automatic fallback.

YouTube video

14 April 2026 – Leaderboard, score system, cartoon popups

Originally shared on X.

Leaderboard with today, this week, and all-time windows. Basic anti-cheat – score caps, rate limiting, play-time floors.

Score ticker in the sidebar with bump animation. Cartoon starburst popups on kills and power-up pickups.

Multiplayer score parity and player name display.

YouTube video

13 April 2026 – Initial commit

The first commit. Single-player 12-level campaign, multiplayer co-op, PvP deathmatch (best of 5), PvP base defense. Procedural level generation. Custom GLSL shaders for bloom, shockwaves, scorch marks, and animated ocean water. Client-side prediction and entity interpolation. NES-style sidebar HUD. Procedural 8-bit sound synthesis. Four enemy types, six power-ups, mobile touch controls.

YouTube video

9 April 2026 – Got the multiplayer co-op working on local server

Originally shared on X:

YouTube video

6 April 2026 – First game loop test

Originally shared on X:

YouTube video

Built for Vibejam 2026. 95%+ vibe coded with Claude Code.


This is a living document. Last updated 6 May 2026.