survival-crafting
它能做什么
该技能指导构建玩家在压力下采集材料、制作工具并建造基地的生存游戏。适合制作生存沙盒或合成与基地建造游戏的开发者。
适用场景
- ✓当你的游戏中玩家需要采集资源、合成物品并建造基地时。
- ✓当你需要饥饿、口渴或体温等生存需求时。
- ✓当你希望有一棵科技树来解锁新区域和资源时。
技能链接
https://github.com/gamedev-skills/awesome-gamedev-agent-skills/blob/main/skills/genres/survival-crafting/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我想做一款生存合成游戏,玩家可以采集木头和石头、制作工具,并管理饥饿和寒冷。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会设置资源节点和采集、带科技树的合成系统,以及饥饿和体温等需求。它还会加入基地建造和逐步升级的威胁,使每一种新工具都能解锁下一阶段。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Survival Crafting
A playbook for survival-crafting games — the gather → craft → build loop, survival needs, the crafting/tech progression, and base building. This is a compositional skill: it orchestrates inventory data, world content, persistence, and threats. It does not re-teach those primitives; it defines the loop and the pressure systems (needs, scarcity, escalation) that make survival tense rather than tedious.
When to use
- Use when the player gathers resources, crafts items/structures, manages survival needs, and builds a base against escalating threats: survival sandbox, crafting/base-building game.
- Use when designing needs (hunger/thirst/temperature), a crafting tech tree, gathering loops, or base placement/building.
When not to use: crafting as a minor RPG feature → rpg. Permadeath grid dungeon →
roguelike. For inventory/items as data assets, use godot-resources /
unity-scriptableobjects; for world generation, procedural-gen.
Core loop
Gather raw resources → craft tools/items → build and upgrade a base → manage survival needs → explore farther for better resources → survive escalating threats → repeat at a higher tier. Each loop should unlock the next loop (better tools → reach new biomes → new resources → better crafts). When that ladder breaks, the game becomes a grind.
Must-have systems
- Resource nodes + gathering — harvestable world objects; tool requirements/tiers; respawn.
- Inventory — stacks, capacity (slots or weight), drop/transfer, hotbar.
- Crafting — recipes (inputs → output), a crafting station/tech gate, a tech tree.
- Survival needs — hunger, thirst, temperature, stamina, health, with decay + consequences.
- Base building — placeable structures, a build grid/snapping, storage, crafting stations.
- World + day/night — biomes/resources (often procedural); a time cycle driving threats.
- Threats — hostile creatures/weather/events that escalate; combat or avoidance.
- Save/load — world state, inventory, base, needs, progression; large-world persistence.
Design knobs
| Knob | Effect | Notes |
|---|---|---|
| Needs decay rates | pressure cadence | Slow enough to explore, fast enough to matter. |
| Need-failure consequence | stakes | Damage over time, not instant death. |
| Resource scarcity / respawn | exploration push | Scarce near base → travel for more. |
| Tool tiers / gating | progression ladder | Better tool → new node types. |
| Recipe complexity / tech depth | long-term goals | Multi-step chains, not flat lists. |
| Inventory limit (slots/weight) | logistics tension | Forces base trips and storage. |
| Threat escalation curve | difficulty over time | Night/seasonal/event ramps. |
| Day length | rhythm | Day = gather, night = defend. |
Patterns
1. Needs decay with graded consequences
# Pseudocode in the per-frame/per-tick update. dt = seconds. Needs fall; failure bleeds HP.
def update_needs(p, dt):
p.hunger = max(0, p.hunger - HUNGER_RATE * dt)
p.thirst = max(0, p.thirst - THIRST_RATE * dt)
p.temp = approach(p.temp, ambient_temperature(p), TEMP_RATE * dt)
# Consequences are graded, not binary: warnings, then attrition — never instant death.
if p.hunger == 0 or p.thirst == 0:
p.hp -= STARVE_DAMAGE * dt # damage over time creates urgency with recovery room
if p.temp < COLD_THRESHOLD or p.temp > HEAT_THRESHOLD:
p.hp -= EXPOSURE_DAMAGE * dt
if p.hunger > 0 and p.thirst > 0 and not exposed(p):
p.hp = min(p.max_hp, p.hp + REGEN_RATE * dt) # safe + fed => heal
2. Crafting: validate, then atomically consume inputs
# Pseudocode. Recipes are data: inputs -> output, with an optional station/tech requirement.
recipe = {"id": "stone_axe",
"inputs": {"wood": 3, "stone": 2}, "output": ("stone_axe", 1),
"station": "workbench", "requires_tech": "basic_tools"}
def can_craft(recipe, inv, tech, station):
if recipe.get("requires_tech") and recipe["requires_tech"] not in tech: return False
if recipe.get("station") and recipe["station"] != station: return False
return all(inv.count(item) >= n for item, n in recipe["inputs"].items())
def craft(recipe, inv, tech, station):
if not can_craft(recipe, inv, tech, station): return False
if not inv.can_add_after_removing(recipe["inputs"], *recipe["output"]):
return notify("No room for the result") # che
常见问题
为什么循环需要解锁下一步?
该技能指出,每个循环都应通向更好的工具和新区域,一旦失去这一点,游戏就会变成枯燥的重复劳动。
它适用于作为 RPG 小功能的合成吗?
不适用。作为次要 RPG 功能的合成更适合由 RPG 技能处理。
世界生成属于哪里?
世界生成由程序化生成技能涵盖,本技能可以使用它。
详情
作者的原始描述
Build a survival-crafting game: resource gathering, inventory, crafting and a tech tree, needs (hunger/thirst/temperature), and base building. Use for a survival or crafting/base-building game.
热度
- GitHub 星标
- 6.6k
- 排名
- #13813
- 许可证
- Apache-2.0
- 更新时间
- 2026/10/28
评论
- …