MechanicsTechniquesGamesGenresGlossaryResearchClaimsSourcesSearch
Source · Code · source-release

A Dark Room source code

games), Michael Townsend (doublespeak and A Dark Room contributors. 2025. “A Dark Room source code.” Commit 1fada46.

Cite as
doublespeakgames/adarkroom
Original
https://github.com/doublespeakgames/adarkroom
Pinned
doublespeakgames/adarkroom @ 1fada4620b6c66bd07bf15a3f1eb8223df8bc1d7
Accessed
2026-10-20
Licence
MPL-2.0
Credit
Michael Townsend / doublespeak games, plus the contributors and translators in the repository history.
Notes
The date is the pinned commit's (“Update world.js (#739)”).

Cited on

  • A Dark Room
  • Cost scaling
  • Exponential cost scaling
  • Linear cost scaling
  • Prestige

Claims (5)

A hut costs 100+50n wood, with n already built, up to 20 huts (11,500 wood for all 20).script/room.js L43–58Verified
A trap costs 10+10n wood, and at most 10 can be built.script/room.js L13–28Verified
The build action does nothing at the item's maximum count, so the cap, not the price, ends each building's run.script/room.js L1025–1027Code
Each hut adds room for 4 villagers; the maximum population is huts × 4.script/outside.js L177–179script/outside.js L11Code
When A Dark Room ends, it saves each store divided by a random whole number (computed from the draws: 1–9 for goods, 1–4 for weapons, 1–100 for ammunition, a draw of 0 counting as 1), and the next game hides them in a landmark, “A Destroyed Village”.script/space.js L436–440script/prestige.js L43–44script/prestige.js L82–100script/events/setpieces.js L3535–3577script/world.js L153–155script/prestige.js L62–63Code
AboutFeedbackSupportFor AI agentsCredits