Resource Scheduling and Defense Design for Colony Survival Games
This article outlines a systems-oriented approach to colony survival games: world, economy, behavior, and survival loops, plus simulation timing, production chains, job scheduling, pathfinding, raids, tech, multiplayer, and performance validation.
1. System Boundaries from Gameplay
Colony survival is not only about stacking buildings. Players organize a settlement that must keep running under scarce resources and ongoing threats. Bases, colonists, and jobs turn natural resources into food, materials, and defense. Growth and expansion also raise management pressure.
From a development view, the loop maps to four linked systems:
- World: terrain, resource placement, build space, and traversal.
- Economy: gathering, processing, consumption, inventory, and job specialization.
- Behavior: goals, movement, and task execution for colonists and enemies.
- Survival: periodic raids, combat resolution, and recovery from losses.
Research, multiplayer, and custom content sit on top of these systems. They should change the decision space—new production splits, different defense costs and payoffs—not only add more content.
The following is a general design approach, not a claim about any specific shipped game.
2. A Stable Simulation Loop
Separate visual updates from rule updates
First-person input needs immediate feedback. Production, needs, and raid checks need consistent rules. Keep rendering (camera, animation, UI) separate from logic simulation that advances tasks, resources, and combat on a deterministic timestep. That reduces frame-rate effects on the economy and helps multiplayer sync and bug reproduction.
A fixed timestep does not mean every object ticks every step. A job waiting on crops need not update as often as a fighter in combat. Schedule by activity so idle objects do not waste CPU.
Define event order
Recruitment, production completion, food consumption, and building damage can land in the same moment. Unclear order can double-spend inventory or assign a job after a workstation is gone.
A workable order:
- Validate and accept player input
- Update buildings and traversal
- Assign or retarget jobs
- Advance production and movement
- Resolve combat, consumption, and losses
- Publish state for the UI
It is not the only valid order, but the project must pick one and test edge cases. Complex systems cannot rely on modules “happening” to run in the right sequence.
3. Data Layout and Terrain Constraints in a 3D World
Separate voxel data from dynamic entities
Voxel worlds are mostly discrete blocks; colonists change every tick. Terrain edits are relatively rare. Do not put both in the same high-frequency structure.
Blocks store material, collision, destructibility, and walkability. Entities store position, job, goals, and health. Interactive buildings (workbenches, stockpiles) also need functional state.
Large worlds can be chunked so only relevant regions load and update. On edits, refresh affected surfaces, collision, and nav data first—not the whole world.
Validate generated terrain for playability
Random maps increase variety but do not guarantee a fair start. Missing starter resources or unreachable key areas can trap players before they learn the rules.
Split generation constraints:
- Hard: required starter resources, standable space, basic connectivity.
- Soft: resource distance, terrain quality, expansion difficulty—these create strategy.
Biomes should differ in resources, layout, and production conditions, not only palette. Flat land favors concentrated production; complex terrain can hinder building but offer natural defense. Treat these as design directions to verify against your rules.
4. Production Chains and Population Feedback
Resource value comes from conversion
Depth comes from how resources convert, not from a long list of types. Food is typical: gather or grow inputs, process them at a job, colonists consume the output.
Bottlenecks include too few jobs, unstable inputs, weak processing, long hauls, or full storage. Specify inputs, outputs, duration, and prerequisites per step so players can locate a shortage instead of only seeing “no food.”
UI can show recent production, consumption, pending work, and idle reasons. That beats a single stockpile number.
Population is not a one-way bonus
More colonists add labor, but also food demand, job demand, and defense load:
More people → higher production potential → higher consumption and defense needs → more labor spent maintaining the system.
If every recruit is immediately net-positive, expansion becomes spam. If every recruit is a burden, players stay small. Growth should pay off differently by stage, with enough information to judge.
A simplified stock trend:
Inventory change = actual output − colonist consumption − construction and research spend − other losses.
Actual output must include idle time, travel, and supply breaks—not theoretical jobs × rate.
Consistent resource deduction
When several tasks claim the same stock, use reservation or atomic checks so two builds cannot both assume the goods exist.
Define cancel rules: if a job is cancelled, a station is destroyed, or a worker dies, are reservations released, and how is already-consumed material handled? A clear resource lifecycle reduces bugs and inventory confusion.
5. Jobs and Task Scheduling
Colonist behavior splits into: pick a task, path to the target, work, submit results. Profession gates which tasks are valid; the task system tracks demand and execution.
A typical lifecycle: unassigned, reserved, in progress, completed, failed or cancelled. States must handle missing targets, blocked paths, and missing materials.
Distance-only scheduling is weak. A nearby job may be low value; a farther food job may keep the colony alive. Combine priority, eligibility, expected travel cost, and resource availability.
Reduce thrash: in-progress work can keep a continuity bonus unless something more urgent appears or the current job cannot continue.
Players should see why a station is empty, why someone is waiting, and which chains a profession change affects. Transparent behavior turns simulation into readable strategy.
6. Pathfinding and Built Defense Together
Traversal rules before the pathfinder
3D navigation is more than empty cells: standable ground, clearance, and vertical moves.
Stairs, bridges, tunnels, and underground routes change height, spanning, and connectivity. Colonists and enemies can share base nav data with different costs and capabilities.
Pathfinding only searches within those rules. If collision and nav disagree, agents can stick in corners or clip through blocked space even when the search “succeeds.”
Defenses should change attack conditions
Walls, ditches, and forts should lengthen routes, funnel entries, provide firing positions, and protect production. Tradeoffs among those effects create layout strategy.
Define what happens when the map is fully sealed: some enemies may breach, some may use different movement, or rules may keep a legal attack path. Do not change the rule after the player has already built.
No path is a nav result, not an automatic “enemies vanish,” “raid pauses,” or “attack any building.” Survival systems must define follow-up behavior.
Invalidating paths after terrain edits
Edits can invalidate routes. Replanning everyone on every change spikes cost.
Mark affected regions, find paths that cross them, and replan in batches. Agents can also locally validate the next step and wait or replan if it is blocked, instead of colliding forever.
7. Periodic Raids and Difficulty
Raid strength can scale with population, stage, or other public metrics, but “designed threat” is not the same as felt pressure. The same enemy count plays differently on different terrain, entries, and defenses.
Treat raids as a budget: set a threat budget, then allocate count, types, spawn points, and timing. Calibrate in playtests; do not declare balance from a formula alone.
Growth should be predictable. Players should know how expansion raises risk and have time to prepare. Sudden spikes with no warning or recovery window feel unfair.
Recovery is part of difficulty. Fewer colonists can cut food output and empty defense posts, causing cascade failure. Keep a baseline of production, allow reassignment, and report losses clearly so players can rebuild.
8. Tech, Mods, and Multiplayer
A tech tree should structure stages: efficiency, new conversions, new defenses, new use of space. Pure numeric stacking does little to change how players operate.
For custom content, prefer declarative data (job conditions, recipes, building stats) with reference checks. Missing resources, cycles, and illegal values should fail at load with clear errors, not as runtime stalls or crashes.
Multiplayer needs a shared world. Recruit, build, spend, and combat outcomes should be validated on an authority; clients may show optimistic feedback, but confirmed state wins.
Permissions are not one blob. Building, demolishing, changing jobs, and spending shared stock differ. Separate them and keep an operation log to cut mistakes and social conflict.
9. Performance and Maintainability
Bottlenecks often come from many agents pathing at once, continuous terrain edits, and mass task reassignment. Profile before rewriting.
Watch:
- Logic-tick time and variance
- Path request volume, queue time, and failure reasons
- Active tasks and switch rate
- Refresh radius after terrain edits
- Multiplayer sync payload
- Save and restore time
Test stable production, fast population growth, sealed entries, empty warehouses, and large battles. Beyond “does not crash,” check inventory conservation, task consistency, and explainable rule outcomes.
Quality depends on a closed loop: the world constrains space, the economy sets expansion capacity, jobs turn demand into action, pathfinding links production and defense, raids test layout and management. Define those relationships, then keep validating them with observable data so the simulation serves player strategy.
