Underground 2 Revived
Play Need for Speed: Underground 2 (2004) in Chrome and Firefox with WebGPU graphics, Web Audio, up to 120 fps widescreen, controller support, free roam and Online races with friends. Fan project, not
Build the fleet. Break the flagship.
Translation pending
GamesTypeScript · JavaScriptGitHub @davepartinOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
Loading the full README. The saved excerpt is shown below.
Build the fleet. Break the flagship.
A two-player dice battle you play in a browser. Every ship is a die — a d4, d6,
d8 or d10 — sitting in a three-by-three grid. In the middle is your flagship: a
d6 carrying all 60 of your health, which never fights. The first flagship to
reach zero loses.Read the full README ↗Build the fleet. Break the flagship.
Play it: https://fleetdice.com
A two-player dice battle you play in a browser. Every ship is a die — a d4, d6, d8 or d10 — sitting in a three-by-three grid. In the middle is your flagship: a d6 carrying all 60 of your health, which never fights. The first flagship to reach zero loses.
This is the third version, and the only one still running. Fleet Dice 1 and 2
live in spacetribe-dice,
which was archived and taken offline on 2 September 2026 — their key art was
salvaged first and is what you see on the title, victory and defeat screens.
The owner will delete their leftover Firestore collections (codes,
matches, liveBattles, battleResults). The rules in this repo are
Fleet Dice only.
The repository is fleetdice and the Firestore collections are still fd3*.
The 3 was the development name; it now survives only where renaming would
break live data already on players' phones.
All of this is already set up. It is written down so you know what is holding it together.
Push to main and it deploys itself. .github/workflows/deploy.yml runs
the tests, and only builds and publishes if they pass — so a broken push fails
loudly instead of quietly replacing a working game.
It lives at its own address, https://fleetdice.com, registered at GoDaddy,
where four A and four AAAA records point at GitHub Pages and a www CNAME
points at davepartin.github.io. The domain itself is set in the repo's Pages
settings on GitHub — that setting, not public/CNAME, is what holds it,
because this site deploys from a workflow rather than a branch. Keep
public/CNAME in step anyway; a branch-built copy would need it.
Every older address redirects here, so nothing shared before the move is lost:
| address | what it does |
|---|---|
fleetdice.com | the game |
www.fleetdice.com | redirects here |
fleetdice.ministrybag.com | redirects here — the game's address until 17 September 2026, served by the tiny davepartin/fleetdice-redirect repo |
ministrybag.com/fleetdice | redirects here — one page in davepartin/ministrybag1 |
davepartin.github.io/fleetdice/ | redirects here |
The Firebase rules are deployed and were confirmed live on 1 September 2026.
You only need this again if firestore.rules changes:
npx -y firebase-tools@latest deploy --only firestore:rules --project space-tribes
Read FIREBASE.md before you run that. There is one Firebase
project, and a bad deploy of the rules can break live Fleet Dice.
| Where | What |
|---|---|
/ | Home. Your name, solo, two-player, and a box for a friend's code. |
/solo/ | Pick a difficulty and fight the ship's computer. |
/versus/ | Opens a room. You get four numbers and a link to send. |
/join/ | Where an invite link lands. |
/match/ | The battle itself. |
Two-player works like Jackbox. You create a room, read your friend the four numbers or send them the link, and the moment they sit down your screen turns into the battle. You can have as many rooms running as you like — a group of friends can all be playing different matches at the same time.
One thing to remember: if you created the room, stay on your own screen. Opening your own invite link in a second tab makes you look like a third person to the room, and a room only has two seats.
Node 22 or newer, and pnpm.
pnpm install
pnpm dev
Then open http://localhost:3000/. The game serves from the root now that it
has its own domain — it used to be under a /fleetdice3/ path, which 404s now.
Other useful commands:
pnpm test # the rules, checked against themselves — 145 of them
pnpm sim # what the numbers actually do, over thousands of matches
pnpm build # the static site, into out/
If a change to app/globals.css refuses to appear, rm -rf .next and restart:
running pnpm build while pnpm dev is up leaves the dev server serving stale
CSS, through restarts.
The rules are the same game. What changed is the shape of the board you start with, and it changed because of something a simulation found.
Not because the rule was wrong — because of where your four opening cells were. They were the top-left corner of the board:
# # # A row is possible. A column never is: there is no second
# F . cell under any of the top three. Completing a column meant a
. . . deliberate, specific purchase, and nothing told you that.
Measured across 250 matches, only 2.8% of commanders ever saw a column pay out in a whole match, and when it did it was around round nine.
Your four opening cells are now the four around your flagship:
. # . One row and one column, both live from the very first roll,
# F # both running through your flagship. Same four ships, same
. # . price, same starting Energy.
Rows now fire in 9.0% of rounds and columns in 8.0% — a three-by-three grid that finally treats both directions the same. 62% of commanders now see a column in a match, first one around round four. Every cell you buy after that is a corner, and a corner opens whole new lines instead of finishing the one you have.
As a side effect the wide cheap fleet stopped owning the board. Wolfpack now sits mid-field on 53.6%, level with Formation, Balanced and Command — all four inside two points of each other.
What is left of the spread is one plan. At 600 matches a pairing, Capital
trails the field on 35.8% ±1.4, sixteen points below the next worst, and
that alone is the whole best-to-worst gap of 18.6 points. Whether big hulls
are genuinely weak or the Capital plan is just written badly is still open — no
opponent has ever bought a d10 fresh. See BALANCE.md.
At 10 then 16 Energy, the same money spent on ships beat it 60/40 at level 2 and 78/22 at level 3, and the computer opponent bought one roughly once every twenty-five matches. It now costs 5 then 8, and both steps measure as an even trade.
The face table, the marks, the straight ladder, five in a row, ship prices, cell prices, 60 health, and three across for 5 Energy, three down for 10 Attack.
The full working — including a correction where a measurement turned out to be
answering the wrong question, and the ideas that measured badly and were thrown
away — is in BALANCE.md.
| Folder | What is in it |
|---|---|
lib/engine.ts | The rules. No React, no browser. Every number is in TUNING at the top. |
lib/ai.ts | The opponent's brain — and the yardstick the simulations play with. |
lib/reference.ts | Every word and number the How to Play screen shows, generated from the engine so it can never drift from the rules. |
lib/rooms.ts | Two-player rooms: creating, joining, watching, cancelling. |
lib/three/ | The 3D: the dice themselves, the deck they sit on, the lighting, the effects. |
lib/audio.ts | Every sound, made from scratch in the browser. No audio files. |
components/ | The screens. |
sim/ | The measuring stick. Nothing goes in on a hunch. |
tests/ | The rules, checked against themselves. |
tools/ | Scripts that play the real game in a real browser and screenshot every screen. |
sim/ exists so a change can be argued with
numbers rather than opinions.tests/ checks that on every round of a real
match.| file | what it holds |
|---|---|
README.md | this: what the game is, how to run it, how it gets online |
CLAUDE.md | how to work in this repo — read first if you are an AI |
PLAN.md | the visual direction, what is done, what is still open, future ideas |
BALANCE.md | every number, and the measurement behind it |
FIREBASE.md | the one Firebase project, and how not to break it |