跳到正文
Skillpedia
通用编程6.6k · #13811

roguelike

它能做什么

该技能指导构建每局都有随机地下城、死亡即结束本局的肉鸽游戏。适合制作回合制地下城爬行或类 Rogue 游戏的开发者。

适用场景

  • ✓当你在构建带有随机关卡的回合制网格地下城爬行游戏时。
  • ✓当你希望死亡结束本局并重置世界时。
  • ✓当你需要为地下城游戏设置视野、战争迷雾或战利品表时。

技能链接

https://github.com/gamedev-skills/awesome-gamedev-agent-skills/blob/main/skills/genres/roguelike/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/gamedev-skills/awesome-gamedev-agent-skills/blob/main/skills/genres/roguelike/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“我想做一款回合制肉鸽游戏,每局都有新的随机地下城,我只能看到附近的格子,死亡就结束本局。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会在网格上构建回合引擎,根据种子生成地下城,并加入视野,使玩家只能看到自己能够到达的范围。它会设置永久死亡和战利品表,并将所有操作保持在同一模式下。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Roguelike

A playbook for roguelikes — the turn engine, procedural dungeons, field-of-view, permadeath, and run economy. This is a compositional skill: it orchestrates procedural generation, tilemaps, save handling, and AI into a run-based game. It does not re-teach noise/RNG or tilemap APIs; it defines the loop and the systems that make a run compelling.

When to use

  • Use when building a turn-based, grid-based dungeon crawler where each death ends the run and the world is regenerated — a roguelike or "roguelite" (with meta-progression).
  • Use when designing procedural dungeons, FOV/fog-of-war, permadeath stakes, or loot tables.

When not to use: real-time action with roguelike dressing → build the action genre (platformer/fps-shooter) and layer procedural-gen. Deep stats/quests/dialogue without permadeath → rpg. Open-world needs/crafting → survival-crafting.

What makes it a roguelike (design anchor)

The community reference is the Berlin Interpretation (RogueBasin, IRDC 2008): a set of "roguelikeness" factors, not a checklist. The high-value ones are the design targets: random environment generation, permadeath, turn-based, grid-based, non-modal (all actions in one mode), complexity (many item/monster interactions), resource management, hack-and-slash, and exploration & discovery. Lean into these to feel roguelike; pick which to keep deliberately. "Roguelite" usually relaxes permadeath with meta-progression.

Core loop

Take a turn (move / fight / use) → the world resolves its turn → see new state → descend / loot / survive → die and restart with a fresh dungeon. Replayability comes from the world changing each run, not the player memorizing a fixed layout.

Must-have systems

  1. Turn scheduler — energy/initiative system so fast actors act more often (Pattern 2).
  2. Grid map + movement — tile coordinates; bump-to-attack; blocked/walkable queries.
  3. Procedural dungeon generator — rooms + corridors, or BSP/cellular; guarantee connectivity.
  4. Field of view + explored memory — what's visible now vs. seen-before (Pattern 3 / refs).
  5. Combat + entities — HP, attack/defense, status; monsters obey the same rules as the player.
  6. Loot + drop tables — weighted, depth-scaled item/monster spawning (refs).
  7. Permadeath + (optional) meta-progression — wipe the run; persist only unlocks/score.
  8. Message log + clear UI — the player reasons from text/state; surface numbers and events.

Design knobs

Knob Effect Notes
Dungeon size / room count run length, density Scale with depth.
Connectivity guarantee no unreachable rooms Always verify reachability after generation.
Monster density / depth curve difficulty ramp Spawn by depth-weighted table.
Loot rarity weights power variance Rarer = bigger swing; identify adds discovery.
FOV radius / lighting tension, information Smaller radius = scarier, slower.
Resource scarcity (food/HP/ammo) pressure to descend Core tension lever in classic RLs.
Permadeath vs meta-progression run stakes vs. retention Roguelite softens the wall.
Identification / unknowns exploration value Unidentified items reward experimentation.
Seedable RNG daily runs, debugging Always allow a fixed seed (see procedural-gen).

Patterns

1. Deterministic, seedable run RNG

# Pseudocode. One seeded RNG per run makes dungeons reproducible (daily runs, bug repro).
run_seed = chosen_seed or random_seed()
rng = Rng(run_seed)                 # use your engine's seedable RNG, not global random
dungeon = generate_dungeon(rng, depth)   # same seed + depth => same dungeon
# Persist run_seed in the save so a crash can resume the same world (see save-systems).

2. Energy-based turn scheduler (speeds differ)

# Pseudocode. Actors gain energy each tick and act when they have enough.
# Faster actors gain more per tick, so they act more often — no fixed "player then enemies".
TURN_COST = 100
def next_actor(actors):
    while True:
        for a in actors:                 # 1) serve anyone already ready, in a stable order
            if a.energy >= TURN_COST:
                a.energy -= TURN_COST    #    (or the cost of the action they choose)
                return a                 #    this actor takes exactly one action now
        for a in actors:                 # 2) nobody is rea
常见问题

什么是 Berlin Interpretation?

这是社区提出的一组定义肉鸽游戏的特征,该技能将其作为设计目标。

它涵盖局外成长吗?

涵盖。它将肉鸽类游戏的局外成长作为永久死亡之上的一个选项。

它会自己生成地下城吗?

地下城生成由程序化生成技能处理,本技能会使用它。

详情

作者的原始描述

Build a roguelike: turn-based grid movement, procedural dungeons, permadeath, field-of-view, and loot tables. Use for a roguelike/roguelite or turn-based grid dungeon crawler with procedural levels.

repo: gamedev-skills/awesome-gamedev-agent-skills

热度

GitHub 星标
6.6k
排名
#13811
许可证
Apache-2.0
更新时间
2026/10/28

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能