Chuyển đến nội dung
Skillpedia
Lập trình chung6.6k · #13811

roguelike

Skill này làm gì

Skill này hướng dẫn xây dựng roguelike, trong đó mỗi lượt chơi có một hầm ngục ngẫu nhiên và cái chết kết thúc lượt. Nó dành cho nhà phát triển làm game hầm ngục theo lượt hoặc roguelite.

Khi nào nên dùng

  • ✓Khi bạn đang xây dựng một game hầm ngục theo lượt trên lưới với màn chơi ngẫu nhiên.
  • ✓Khi bạn muốn cái chết kết thúc lượt chơi và đặt lại thế giới.
  • ✓Khi bạn cần tầm nhìn, sương mù chiến tranh hoặc bảng vật phẩm cho game hầm ngục.

Liên kết skill

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

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/gamedev-skills/awesome-gamedev-agent-skills/blob/main/skills/genres/roguelike/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Tôi muốn làm một roguelike theo lượt, mỗi lượt có một hầm ngục ngẫu nhiên mới, tôi chỉ thấy các ô gần mình, và cái chết kết thúc lượt.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent xây dựng bộ máy lượt trên lưới, sinh hầm ngục từ một seed, và thêm tầm nhìn để người chơi chỉ thấy những gì họ có thể tới. Nó thiết lập chết vĩnh viễn và bảng vật phẩm, đồng thời giữ mọi hành động trong một chế độ.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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
Câu hỏi thường gặp

Berlin Interpretation là gì?

Đó là một bộ đặc điểm do cộng đồng đặt ra để định nghĩa roguelike, và skill dùng chúng làm mục tiêu thiết kế.

Nó có bao quát tiến trình xuyên lượt không?

Có. Nó bao quát tiến trình xuyên lượt của roguelite như một lựa chọn thêm vào chết vĩnh viễn.

Nó có tự sinh hầm ngục không?

Việc sinh hầm ngục do skill sinh nội dung theo thủ tục đảm nhiệm, và skill này dùng nó.

Chi tiết

Mô tả gốc của tác giả

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

Độ phổ biến

Sao GitHub
6.6k
Vị trí xếp hạng
#13811
Giấy phép
Apache-2.0
Cập nhật
28/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự