Survival and resource-management games (crafting survival, wave survival, colony survival, survival horror). Needs meters (hunger, thirst, warmth, energy, sanity) and how they drain, gathering and resource nodes that respawn, crafting tiers that open the map, base building and storage, day/night danger cycles, threats that scale, death and respawn rules, procedural worlds, saving long sessions,...
Download skill (.zip) Files on GitHubSurvival game development
Core: gather → craft → survive the next threat → expand. Pressure from needs and nights; relief from preparation.
Starter template
A playable starter for the game-scaffolding template is in assets/starter/. A seeded world of trees, rocks and berry bushes, gathering, an inventory, crafting (campfire, spear), a hunger meter, a day/night cycle with real darkness and firelight, night creatures that avoid light, and a win after three nights.
python3 <game-scaffolding>/scripts/scaffold.py my-game --title "My Game" --starter <this skill>/assets/starter
Controls: WASD, Space hits or gathers, E eats, C builds a campfire, V crafts a spear. Touch: stick plus buttons. Esc pauses. All numbers to tune are in src/config.js; the gameplay is in src/scenes/play.js.
Gathering, crafting, eating and the switch to night were tested.
Systems (tested modules)
| System | Module |
|---|---|
| World | procedural-generation noise2D biomes + poissonDisc for trees, rocks, bushes |
| Resources | Nodes with hp → drop items (loot-system), respawn timers |
| Inventory + storage | inventory-system (bag + chests as Inventories) |
| Crafting | crafting-system: tiers (wood → stone → iron), stations (campfire, workbench, forge) |
| Day/night | game-lighting dayNight(hour) + LightMap; campfires as safe light |
| Threats | wave-spawning at night (budget by day number), enemy-ai |
| Needs | Below |
const NEEDS = { hunger: { max: 100, drain: 0.8 }, warmth: { max: 100, drain: 0 } }; // per minute
function updateNeeds(p, dt, env) {
p.hunger = Math.max(0, p.hunger - NEEDS.hunger.drain * dt / 60);
p.warmth = clamp(p.warmth + (env.nearFire ? 6 : env.night ? -2 : 1) * dt / 60, 0, 100);
if (p.hunger === 0 || p.warmth === 0) p.hp -= 1 * dt; // slow, readable damage
}
Design
- 2–3 needs at most, each tied to an activity (food → hunting/farming, warmth → fire/clothes). Drain slowly; warn early (HUD icons flash at 25%).
- Day 1 is safe and teaches gathering; the first night is a scripted, survivable scare.
- Each crafting tier unlocks a new place or ability (axe → forest, boat → islands, torch → caves).
- Death: drop items at the death spot (a recovery run) rather than losing everything, for web sessions.
- Session length: autosave each morning (game-save-migration-friendly save format); “continue” on the title screen.
Controls
Desktop: WASD, click to gather/attack, hotbar 1–9, E inventory. Touch: stick + context button (gather/attack/use based on what’s near), hotbar along the bottom, inventory button.
Pitfalls
Tedious early grind, needs draining faster than fun allows, inventory full constantly (generous stacks), nights that are just darker, and saves that break with updates.