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
Explore a medieval town in first‑person view and watch the sunset
AI summary · website content
GamesJavaScript · CSSGitHub @andreperdizOnlineOwner 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
The maker's introduction consists of the line above. Read the repository README for more details. Repository README ↗
Loading the full README.
Read the full README ↗Walk the walled medieval town of Óbidos, Portugal, in the browser. Wander up Rua Direita from the main gate, climb a flight of stone steps onto the walls, follow them round, and watch the sun go down over the Várzea from the west wall. It runs on WebGPU and WGSL with a small rendering engine of its own, forked from Tidewater.
The town is built from real data:
The coordinates are metres from the centre of the walls, with x east and z south. The long straight wall on the west side faces the sunset all year.
| Key | Action |
|---|---|
| W A S D | Move |
| Mouse | Look (click to capture the mouse, Esc to release) |
| Shift | Run |
| Space | Jump |
| C | Crouch |
| F | Free camera (press again to drop to your feet where you are) |
| T | Let the day run / pause time |
| L | Flashlight |
| M | Sound on / off |
| H | Settings panel: time of day, day of the year, clouds, haze, post-processing, render scale |
| P | Photo mode |
| R | Reference photo: line the game up with a real photo and save the view (npm run dev: saved to references/) |
| F1 or ? | All controls |
| Option | Effect |
|---|---|
fly | Start in the free camera |
noClouds | Skip the volumetric clouds |
noHaze | Skip the haze and sun shafts |
noVeg | Skip the trees |
noAudio | No sound |
bg | Keep rendering when the tab is hidden (automation) |
ref=<folder> | Open a saved reference photo: its view, the photo over the game |
bench&shots=gate,westWall,… | Render reference shots of the named views (src/core/DebugViews.js) and post them to a local collector |
npm install
npm run dev # http://127.0.0.1:5189
npm test # walks the town and the walls headlessly, then an engine smoke test
npm run build # static build in dist/
.github/workflows/deploy.yml builds and deploys to GitHub Pages on every push to main, and can also be
run by hand from the Actions tab.
sh tools/geodata/fetch.sh # OpenStreetMap (Overpass API) + Copernicus DEM tiles, into tools/geodata/raw/
node tools/geodata/build.mjs # -> public/data/dem-*.bin, src/world/obidos/osm.json
The LiDAR tiles (MDT-2m-*.tif) need a free account on the DGT's data portal:
download them there and put them in tools/geodata/raw/ before running build.mjs. The town's tiles are
111267, 112266 and 112267 (2024 flight).
| Folder | Contents |
|---|---|
src/world/obidos/ | Óbidos: geodata loading and geometry helpers, walls / towers / gates / stairs, houses, trees, town materials |
src/world/ | Terrain heightmap and masks (TerrainData), the CDLOD terrain and its material, the far terrain, colliders |
src/engine/ | The rendering engine: math, scene graph and geometry, GPU resources, WGSL shader composition, materials, lighting and shadows |
src/sky/ | Atmosphere, clouds, sky and environment |
src/post/ | Post chain: AO, haze, TAAU, motion blur, bloom, lens flare |
src/materials/ | Shared lighting: shadow filtering, bounce light, local lights |
src/player/ | The walker and the free camera |
src/ui/ | Settings panel, loading screen and HUD |
tools/geodata/ | Fetches and converts the OpenStreetMap and DEM data |
test/ | The Óbidos world test, engine and post-chain smoke tests |
Map data © OpenStreetMap contributors (ODbL). Elevation data: Copernicus WorldDEM-30 © DLR e.V. and © Airbus Defence and Space GmbH, provided under COPERNICUS by the European Union and ESA; LiDAR terrain model © Direção-Geral do Território (CC BY 4.0). The engine, sky and post chain come from Tidewater by DRG Software Solutions LLC (MIT). Full details are in CREDITS.md.