No description
  • Rust 43.6%
  • TypeScript 34%
  • Python 18.3%
  • CSS 2.9%
  • JavaScript 0.7%
  • Other 0.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-11-20 09:55:52 +01:00
.cargo M1 combat prototype: Rust/WASM core + Three.js client 2026-11-04 23:17:04 +01:00
crates Bug reports and feedback from the system menu (online): text plus pasted, dropped or picked screenshots; the server saves each report as a folder (report, screenshots, the player's campaign) under ZST_FEEDBACK_DIR 2026-11-20 09:55:52 +01:00
data Elements, relics and sound: five elements (fire, shock, ice, toxin, acid) with resistances, statuses and their looks; 50 relic weapons as a new top rarity with their own models, auras, lore and drops; sound on/off setting and sound review; forge button on equipment rows; weapon icons in shop and inventory; status and weapon effects toned down as the camera pulls back 2026-11-19 08:41:15 +01:00
deploy Bug reports and feedback from the system menu (online): text plus pasted, dropped or picked screenshots; the server saves each report as a folder (report, screenshots, the player's campaign) under ZST_FEEDBACK_DIR 2026-11-20 09:55:52 +01:00
docs Bug reports and feedback from the system menu (online): text plus pasted, dropped or picked screenshots; the server saves each report as a folder (report, screenshots, the player's campaign) under ZST_FEEDBACK_DIR 2026-11-20 09:55:52 +01:00
scripts Elements, relics and sound: five elements (fire, shock, ice, toxin, acid) with resistances, statuses and their looks; 50 relic weapons as a new top rarity with their own models, auras, lore and drops; sound on/off setting and sound review; forge button on equipment rows; weapon icons in shop and inventory; status and weapon effects toned down as the camera pulls back 2026-11-19 08:41:15 +01:00
web Bug reports and feedback from the system menu (online): text plus pasted, dropped or picked screenshots; the server saves each report as a folder (report, screenshots, the player's campaign) under ZST_FEEDBACK_DIR 2026-11-20 09:55:52 +01:00
.dockerignore Docker deployment of the online server; Secure session cookie; sign-in and registration limits 2026-11-07 20:25:47 +01:00
.env.example DEBUG build flag: model review, battle debug and rotation buttons, and auto battle only in debug builds (on in the dev server, off in builds unless DEBUG=1; ZST_DEBUG for Docker) 2026-11-07 20:33:49 +01:00
.gitattributes Full campaign client: overworld, screens, saves, campaign battles 2026-11-05 00:15:05 +01:00
.gitignore Bug reports and feedback from the system menu (online): text plus pasted, dropped or picked screenshots; the server saves each report as a folder (report, screenshots, the player's campaign) under ZST_FEEDBACK_DIR 2026-11-20 09:55:52 +01:00
Cargo.lock Online milestones: player market (listings, buy orders, private offers, mailbox), town and global message boards, leaderboards, live PvP arena over WebSocket with Elo ladder, moderation, backups, rate limits, deploy script; title shows server offline state with retry 2026-11-07 19:20:13 +01:00
Cargo.toml Online mode foundations: shared world seed, game-core API with replayable command log and state hash, server (accounts, SQLite cloud campaigns, replay sync with resync), client sign-in and sync; design doc 2026-11-07 13:47:26 +01:00
docker-compose.yml Bug reports and feedback from the system menu (online): text plus pasted, dropped or picked screenshots; the server saves each report as a folder (report, screenshots, the player's campaign) under ZST_FEEDBACK_DIR 2026-11-20 09:55:52 +01:00
Dockerfile Bug reports and feedback from the system menu (online): text plus pasted, dropped or picked screenshots; the server saves each report as a folder (report, screenshots, the player's campaign) under ZST_FEEDBACK_DIR 2026-11-20 09:55:52 +01:00
README.md Docker setup, low-poly Blender models and animations for units, props and places 2026-11-05 21:01:39 -10:00
rustfmt.toml Full game core: campaign, overworld, characters, items, bases, towns 2026-11-04 23:58:58 +01:00

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.

World

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: a wasm-bindgen bridge. The CampaignHandle.call(method, json) dispatcher handles the campaign, and Game runs skirmishes.
  • web/: Vite + TypeScript + Three.js. It renders the overworld and battle scenes, the HTML screens, and the IndexedDB saves. The TypeScript types in web/src/generated/ are generated from the Rust types with ts-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-cli at 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=123 starts a fresh campaign on a fixed seed, skipping the title.
  • /?skirmish=1 starts a quick battle.
  • In the Claude desktop app, the web entry in .claude/launch.json starts 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. R opens the roster, I the inventory, B the base, T research, K crafting and J jobs. Esc opens the menu, Space pauses, C recenters, and Q/E rotate.
  • Battle: click a blue tile to move, pick an action, then click a target. Esc backs out, Space pauses, 1 2 3 set the speed and F3 toggles 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 in combat.rs.
  • World: danger scaling is TIER_DISTANCE in world.rs.
  • Survival and raids: upkeep, threat and raids are in base.rs.