{"id":50412310,"url":"https://github.com/cskwork/crittermoor","last_synced_at":"2026-05-31T04:04:54.046Z","repository":{"id":359105218,"uuid":"1241347123","full_name":"cskwork/crittermoor","owner":"cskwork","description":"Browser-playable colony sim with tameable creatures and turn-based battles. Play: https://cskwork.github.io/crittermoor/","archived":false,"fork":false,"pushed_at":"2026-05-20T11:41:07.000Z","size":992,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-20T15:47:15.354Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://cskwork.github.io/crittermoor/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cskwork.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-17T09:15:11.000Z","updated_at":"2026-05-20T11:41:11.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/cskwork/crittermoor","commit_stats":null,"previous_names":["cskwork/crittermoor"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/cskwork/crittermoor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cskwork%2Fcrittermoor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cskwork%2Fcrittermoor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cskwork%2Fcrittermoor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cskwork%2Fcrittermoor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cskwork","download_url":"https://codeload.github.com/cskwork/crittermoor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cskwork%2Fcrittermoor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33718496,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-31T02:00:06.040Z","response_time":95,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-05-31T04:04:53.236Z","updated_at":"2026-05-31T04:04:54.033Z","avatar_url":"https://github.com/cskwork.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Crittermoor\n\n\u003e A browser-playable RimWorld-style colony sim with tameable creatures.\n\u003e **Settle the wild moors. Tame the critters. Survive the storm.**\n\nCrittermoor blends a real-time colony simulator (build, haul, mine, cook, sow) with a turn-based monster-battle layer that fires for raids and expeditions. Every creature, structure, and tile is original art — no copyrighted designs.\n\n**Status:** alpha (v0.2). Tracked via [`omc ultragoal`](.omc/ultragoal/) — 29 stories shipped across pre-alpha, alpha, and build/defense pushes.\n\n## Try it\n\n```bash\nnpm install\nnpm run dev\n```\n\nOpen the URL Vite prints, type a seed (or keep the random one), click **New Game**.\n\n```bash\nnpm run typecheck   # tsc strict\nnpm test            # vitest (42/42)\nnpm run lint        # ESLint (zero warnings)\nnpm run build       # production bundle to dist/\nnpm run verify      # all of the above except build\n```\n\n## Playable feature set\n\n**Colony loop**\n- 3 settlers (\"wardens\") with hunger / rest / joy / warmth needs and 8 skill tracks\n- Utility-AI behavior: wardens auto-sleep when tired, auto-eat when hungry, pick the best job by skill + distance\n- Tool-driven world interaction: Select, Chop, Mine, Build, Tame, Cancel (hotkeys `S C M B T X`)\n- 96×96 procgen map with 8 terrain types (grass, dirt, sand, stone, mountain, forest, shallow/deep water)\n- Day / night cycle (10 real-minute days) with tinted overlay and a nocturnal speed bonus for moonlit creatures\n\n**Creatures**\n- 6 starter species (Spritmoth, Tindercub, Loamfin, Brackboar, Ferroquill, Mosskit), each with two types from an 8-type wheel\n- 16 moves spanning all types with status effects (burn, soak, quill, daze, snare, bloom)\n- Wild packs roam the map. Weaken one in battle, then Shift+left-click to attempt a tame\n- Tamed creatures follow their bonded warden and stay in your party\n\n**Combat**\n- 4v4 turn-based battles with party-row UI, move wheel (type-color borders + power/accuracy), switch, victory/defeat banner\n- Deterministic damage formula with crit, effectiveness, and seeded RNG\n- Raid scheduler triggers a battle every 4-8 in-game days; arrive at the colony, transition to the battle scene, return to the colony on resolution\n\n**Build \u0026 defense**\n- 6 structures: Wall, Door, Bed, Stove, Storage, Turret\n- Wood / Stone resources from chop / mine; blueprints cost materials, cancel refunds 50%\n- Wardens auto-walk to the nearest blueprint and construct it (skill bonus applies)\n- Walls block pathfinding, doors pass; turrets auto-fire on hostile creatures within range 6\n\n**Persistence**\n- Versioned save format (v3) in IndexedDB with v1 → v2 → v3 migration chain\n- Round-trip preserves seeded RNG state, designations, blueprints, structures, resources, and raid schedule\n\n**UI**\n- Toolbar (left), Resources HUD (top right), Events log (right), Selection inspector (bottom) with needs / skills / faction / critter bond\n- 4-step interactive tutorial on first run\n- Animated battle scene with HP bars, type chips, action log\n- Keyboard: Space = pause · 1 / 2 / 3 = speed · S / C / M / B / T / X = tool · Esc = clear\n\n## Tech stack\n\n| Layer | Library |\n|---|---|\n| Language | TypeScript 5 strict |\n| Bundler | Vite 5 |\n| Rendering | PixiJS v8 (WebGL2) |\n| ECS | bitecs (typed-array SoA) |\n| UI shell | React 18 + Zustand |\n| Persistence | IndexedDB via `idb` |\n| Audio | Howler.js |\n| Tests | Vitest + fast-check (property tests for the battle resolver) |\n\nSee [`docs/architecture.md`](docs/architecture.md) and the ADRs in [`docs/adr/`](docs/adr/) for the design rationale.\n\n## Repo layout\n\n```\nsrc/\n  main.tsx              entrypoint\n  app/                  React shell, stores, error boundary, keybindings\n  game/\n    Game.ts             game orchestrator (sim + renderer + battle wiring)\n    Renderer/           PixiJS layers — tilemap (chunked), entities, camera\n    Sim/                ECS world + systems + tick loop\n      Critters/         species data + spawn + tame\n      Structures/       structure defs + spawn + path-cost helpers\n      Battle/           battle state + sim + damage + type chart + moves\n      Pathing/          A* (worker) + path client + cache\n      Saves/            schema + codec + migrations + IndexedDB store\n      systems/          needs, behavior, jobs, construct, turret, wild AI, raid, …\n      Gen/              procedural world gen\n    workers/            pathfinding worker\n  ui/                   React panels + screens (title, HUD, battle, selection, toolbar, events, resources)\n  assets/sprites/       all art — creatures, wardens, terrain, structures\n  shared/               rng (Mulberry32), constants, types\ndocs/                   spec, architecture, ADRs\ntests/sim/              vitest suite\n```\n\n## Performance\n\n- ≤ 250 KB gzip JS bundle (Pixi + React + app + ECS + path worker)\n- Sustained 60 FPS at 200+ entities on a 2020 M1 laptop\n- Chunked tilemap with dirty-hash repaint, web-worker pathfinding, fixed-step tick with render interpolation\n\n## Determinism\n\nEvery gameplay roll (procgen, AI, battle damage, raid roster, tame success) routes through a single seeded `Mulberry32` RNG. The RNG state is part of the save, so reloading and replaying the same actions produces identical outcomes. The battle property tests in [`tests/sim/battle.test.ts`](tests/sim/battle.test.ts) lock this down with `fast-check`.\n\n## Roadmap\n\nNot yet in: needs-based bed targeting, stove cooking, stockpile zones, weather, more biomes / species, mod tooling, multiplayer. The work plan that produced the current build lives in [`plan.md`](plan.md), [`plan-alpha.md`](plan-alpha.md), and [`plan-build.md`](plan-build.md).\n\n## License\n\nTBD.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcskwork%2Fcrittermoor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcskwork%2Fcrittermoor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcskwork%2Fcrittermoor/lists"}