- Rust 43.6%
- TypeScript 34%
- Python 18.3%
- CSS 2.9%
- JavaScript 0.7%
- Other 0.4%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .cargo | ||
| crates | ||
| data | ||
| deploy | ||
| docs | ||
| scripts | ||
| web | ||
| .dockerignore | ||
| .env.example | ||
| .gitattributes | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| docker-compose.yml | ||
| Dockerfile | ||
| README.md | ||
| rustfmt.toml | ||
Zombie Survival Tactics (working title)
A web-based, top-down 2.5D tactical survival RPG. You lead a squad of up to 6 survivors through an endless, procedurally generated world overrun by the infected, mutated animals and raiders. The farther you go from the shelter, the deadlier it gets, and the better the loot.
Design and requirements live in docs/:
GDD · functional requirements (with an implementation-status table) ·
technical requirements.
What's in the game
| Area | Highlights |
|---|---|
| Overworld | Infinite chunked world with 5 biomes, roads, lakes, and a danger tier that grows with distance. Click-to-move travel with a day/night clock. Roaming groups chase you if they spot you. Night hordes. Search houses, stores, hospitals, police stations, military checkpoints, factories, nests and raider camps. |
| Battles | Grandia-style initiative timeline (WAIT → COM → ACT) with delay and cancel, move-then-act on a height grid, cover and line of sight, shared vision with "?" markers for hidden movement, downed/revive/bleed-out, squad retreat, and ambushes (who engaged first matters). The arena matches the biome you fought in. |
| Enemies | Infected (walker, runner, brute, spitter, screamer, bloater, armored), mutated animals (dogs, boars), raiders (thugs, gunners, marksmen), elites, and nest bosses (the Matriarch, the Raider Warlord). |
| Characters | 6 classes (Brawler, Rifleman, Medic, Sniper, Engineer, Scout), each with 2 specializations at level 5 and a mastery skill at level 10. 6 attributes with randomized growth, traits (innate and earned), injuries (light, serious, permanent), infection, and permadeath. Characters left behind go missing and can be rescued. |
| Items | Base item × tier × rarity × affixes, with stat and class requirements (PSO-style), weapon proficiencies, sidearms, shields and tools. No ammo, no durability. |
| Forge | Grinding (+N), forge effects in rarity-based slots (incendiary, toxic, shocking, piercing, leeching…), and salvage. |
| Base | Free grid building (shelters, farms, water, workbench, forge, chem lab, infirmary, research desk, radio, walls, watchtowers, turrets), jobs for residents, a construction queue, crafting, and a research tree with blueprints found in the wild. |
| Raids | A threat meter leads to announced raids. You fight them on the actual base layout (turret posts join in) or let the defenders auto-resolve. Outposts can be overrun. |
| Settlements | Shops whose stock depends on the tier, a materials market with local prices, tavern recruits, and job boards (bounties, caches, supply runs, rescues). Visitors also come to the base. |
| Survival | Food and water upkeep, starvation, healing over time, autosave with a rolling backup, and save export/import. |
More screenshots are in docs/screenshots/: title, roster, inventory, base, research, crafting,
town (shop, tavern, jobs), battle, raid, report, night, skirmish.
Architecture
crates/game-core: all the rules, in pure, deterministic Rust (seeded RNG, integer math, no I/O). The campaign, world, battle, items, characters, bases and towns all live here. There are 163 tests, including multi-day campaign bots and save round-trips.crates/game-wasm: awasm-bindgenbridge. TheCampaignHandle.call(method, json)dispatcher handles the campaign, andGameruns skirmishes.web/: Vite + TypeScript + Three.js. It renders the overworld and battle scenes, the HTML screens, and the IndexedDB saves. The TypeScript types inweb/src/generated/are generated from the Rust types withts-rs.data/*.json: all the content (classes, skills, items, affixes, effects, enemies, materials, traits, injuries, buildings, tech, recipes, names). It is validated when the game loads.
Prerequisites
- Rust stable with the wasm target:
rustup target add wasm32-unknown-unknown wasm-bindgen-cliat the same version as the crate:cargo install wasm-bindgen-cli --version 0.2.130 --locked- Node.js 20+. On this machine, a portable Node 26 lives in
.tools\node-v26.13.0-win-x64(git-ignored). From the project root, start the dev server with:& .\.tools\node-v26.13.0-win-x64\node.exe web/node_modules/vite/bin/vite.js web --port 5173 --host
Run it
cd web && npm install
npm run wasm
npm run dev
Open http://localhost:5173. Useful URLs:
/?seed=123starts a fresh campaign on a fixed seed, skipping the title./?skirmish=1starts a quick battle.- In the Claude desktop app, the
webentry in.claude/launch.jsonstarts the dev server. It listens on the LAN with--host.
Controls
- Overworld: click to travel, click a group to attack it, right-click to stop.
Ropens the roster,Ithe inventory,Bthe base,Tresearch,Kcrafting andJjobs.Escopens the menu,Spacepauses,Crecenters, andQ/Erotate. - Battle: click a blue tile to move, pick an action, then click a target.
Escbacks out,Spacepauses,123set the speed andF3toggles debug.
Test it
node scripts/check.mjs
This runs fmt, clippy -D warnings, the Rust tests, the WASM build, tsc and vitest.
cargo test -p game-core --release -- --ignored balance --nocapture
This runs a 30-day bot campaign on 6 seeds and prints survival stats.
node scripts/screenshots.mjs
This regenerates docs/screenshots/ with headless Chrome. The dev server must be running.
3D models
The low-poly unit models (6 classes, infected, animals, raiders, turret) are web/public/models/*.glb.
Each model is a small hierarchy of rigid parts (hips, torso, head, arms, legs; body, head, legs, tail for animals)
with four animation clips: idle and walk (loops), attack and hit (one-shots). web/src/render/models.ts
plays them (AnimatedModel); the battle scene triggers walk / attack / hit, the overworld walk / idle.
They are generated by a Blender script; edit it and regenerate, there is no .blend file to maintain:
/Applications/Blender.app/Contents/MacOS/Blender --background --factory-startup --python scripts/blender/build_models.py -- web/public/models
scripts/blender/preview_models.py renders all of them side by side into one PNG
(... --python scripts/blender/preview_models.py -- web/public/models sheet.png).
A unit kind without a model falls back to the old procedural shapes in web/src/render/scene.ts.
The terrain props are built the same way by scripts/blender/build_props.py into web/public/models/props/
(static, no animation): trees (pine, oak, dead), bushes, rocks, cars (sedan, pickup, wreck; the body uses a
paint material recolored per car), barrels, crates, sandbags, fences, low walls, walls and buildings
(scaled to the prop height), plus the overworld pines, oaks and ruins, and one model per overworld place
(poi_<kind>: house, cabin, store, gas station, hospital, police, military, factory, farmstead, nest, raider camp,
town, cache, and poi_shelter for the base; searched places turn grey). web/src/render/props.ts loads them;
the battle scene picks a variant per tile (and by ground type: dead trees on mud, toxic barrels on pavement),
the overworld merges them into instanced meshes. Contact sheets: docs/screenshots/props.png, docs/screenshots/places.png.
/Applications/Blender.app/Contents/MacOS/Blender --background --factory-startup --python scripts/blender/build_props.py -- web/public/models/props
Tuning
- Content: all content numbers are in
data/*.json. - Battle: timeline and battle constants are in
crates/game-core/src/types.rs; combat math is incombat.rs. - World: danger scaling is
TIER_DISTANCEinworld.rs. - Survival and raids: upkeep, threat and raids are in
base.rs.
