rea-ci-tests-audit
MOmorluto/rea486k8,943 new stars in the last 7 days
Designs survival-crafting loops in any engine: gathering, recipes and tech trees, carry weight, spoilage, hunger and temperature, and base building. Use for a Minecraft-, Valheim- or Don't Starve-like, or crafting that eats materials or needs that feel like chores. Not for RPG equipment stats (`rpg`), terrain generation (`procedural-gen`) or save files (`save-systems`).
Owns the gather, craft, build and survive loop and the pressure systems around it: needs, scarcity, logistics and escalating threats. Each tier of tools must open the next tier of resources; when that ladder breaks, the game turns into chores.
When not to use: weapon and armour stat systems, rarity and affixes (rpg); world and
biome generation (procedural-gen); save file format and migration (save-systems).
Track freshness per stack (0..1, merged as a count-weighted average) and apply tiers.
Don't Starve's tiers are a tested reference: fresh (50-100%) gives full value; stale
(20-50%) gives 2/3 of the hunger, 1/3 of the health and no sanity; spoiled (under 20%) gives
1/2 the hunger, no health and costs 10 sanity, then the item rots. Cooking halves the spoilage
so far. Cold storage slows the clock. Show the tier on the icon.
# Pseudocode. Validate everything, then consume and add as one step.
recipe = {"id": "stone_axe", "inputs": {"wood": 3, "stone": 2}, "output": ("stone_axe", 1),
"station": "workbench", "tech": "basic_tools"}
def craft(recipe, inv, tech, station):
if recipe["tech"] and recipe["tech"] not in tech: return "locked"
if recipe["station"] and recipe["station"] != station: return "needs " + recipe["station"]
if any(inv.count(i) < n for i, n in recipe["inputs"].items()): return "missing materials"
if not inv.fits_after_removing(recipe["inputs"], *recipe["output"]):
return "no room" # count slots the inputs free up
for item, n in recipe["inputs"].items():
inv.remove(item, n)
inv.add(*recipe["output"])
return "ok"
dt, or decay tied to
render frames. Tick needs on the game clock.save-systems).references/needs-and-crafting.md: read when writing the needs model and thresholds, the
tech tree as a graph, multi-step recipe chains, gather and respawn rules, build placement
and stability, threat escalation or incremental world saves.Related: rpg (gear stats and loot rarity), procedural-gen (biomes, resource placement),
save-systems, game-ai (creatures and raiders), game-ui-ux with the engine UI skill
(inventory, crafting menu, needs HUD), godot-tilemap or unity-tilemap-2d (2D build grids).
Last verified: 2026-11-11.
MOmorluto/rea486k8,943 new stars in the last 7 days
MOmorluto/rea486k8,943 new stars in the last 7 days
MAmattpocock/skills337k4,978 new stars in the last 7 days
MAmattpocock/skills337k4,978 new stars in the last 7 days
MAmattpocock/skills337k4,978 new stars in the last 7 days
Block dangerous git commands like push and reset --hard before they execute.
MAmattpocock/skills337k4,978 new stars in the last 7 days