roguelike
gamedev-skills/awesome-gamedev-agent-skills
Build turn-based grid dungeons with procedural generation, permadeath, and field-of-view.
What is roguelike?
A compositional skill for roguelikes and roguelites: turn-based grid movement, procedural dungeon generation, field-of-view, permadeath, and loot tables. Use this when designing a run-based dungeon crawler where each death regenerates the world.
- Turn scheduler with energy-based initiative so faster actors act more often
- Procedural dungeon generation with guaranteed connectivity (rooms, corridors, BSP, cellular automata)
- Field-of-view and fog-of-war using shadowcasting algorithms
- Permadeath system with optional meta-progression (run state vs. profile state)
- Combat, HP, status effects, and monsters following the same rules as the player
- Depth-scaled loot tables and monster spawning for difficulty ramps
How to install roguelike
npx skills add https://github.com/gamedev-skills/awesome-gamedev-agent-skills --skill roguelike- A game engine (Godot, Unity, or similar) with tilemap support
- Procedural generation skill (noise, seeded RNG, dungeon algorithms)
- Understanding of turn-based game loops and discrete action resolution
How to use roguelike
- 1.Set up a seeded RNG per run to ensure reproducible dungeons
- 2.Implement a turn scheduler using an energy-based system where actors gain speed-dependent energy each tick
- 3.Generate a procedural dungeon with rooms and corridors, then verify connectivity via flood-fill
- 4.Compute field-of-view from the player position each turn using shadowcasting; track explored cells separately from visible cells
- 5.Define combat rules (HP, attack, defense, status effects) that apply equally to player and monsters
- 6.Create depth-scaled loot and monster spawn tables weighted by rarity and dungeon depth
- 7.Separate run state (wiped on death) from profile state (unlocks, scores) in your save system
- 8.Build a message log UI to display turn results, HP changes, and game events clearly
Use cases
- Build a classic roguelike dungeon crawler with permadeath and procedurally generated levels each run
- Create a roguelite with meta-progression unlocks that persist across runs while the dungeon resets
- Design a turn-based tactical dungeon crawler with field-of-view and resource scarcity tension
- Implement daily challenge runs using seeded RNG for reproducible dungeons
- Develop a grid-based hack-and-slash game with exploration, loot discovery, and escalating difficulty
- Game developers building roguelikes or roguelites
- Designers creating turn-based grid-based dungeon crawlers
- Developers wanting procedural generation with permadeath mechanics
- Game makers focusing on replayability through world regeneration rather than fixed layouts
roguelike FAQ
Use this skill for turn-based, grid-based gameplay where permadeath and procedural generation are core. If you're building real-time action (platformer, shooter), use the action genre skill and layer procedural generation on top instead.
A roguelike has strict permadeath with no meta-progression; a roguelite softens permadeath by persisting unlocks, abilities, or progression across runs. Both use this skill—just adjust which state you wipe on death vs. keep in your profile.
Always run a connectivity check (flood-fill from the starting room) after generation. If unreachable cells exist, carve corridors until all walkable tiles are reachable from the start.
FOV creates tension and information asymmetry—the player can't see everything, and neither can enemies. Use symmetric shadowcasting (not naive raycasting), which avoids flickering and asymmetric vision artifacts.
Scale monster density, monster stats, and loot rarity by dungeon depth. Use depth-weighted spawn tables and keep resources (food, healing, ammo) scarce to pressure the player to descend and take risks.
Full instructions (SKILL.md)
Source of truth, from gamedev-skills/awesome-gamedev-agent-skills.
name: roguelike description: > 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.
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
- Turn scheduler — energy/initiative system so fast actors act more often (Pattern 2).
- Grid map + movement — tile coordinates; bump-to-attack; blocked/walkable queries.
- Procedural dungeon generator — rooms + corridors, or BSP/cellular; guarantee connectivity.
- Field of view + explored memory — what's visible now vs. seen-before (Pattern 3 / refs).
- Combat + entities — HP, attack/defense, status; monsters obey the same rules as the player.
- Loot + drop tables — weighted, depth-scaled item/monster spawning (refs).
- Permadeath + (optional) meta-progression — wipe the run; persist only unlocks/score.
- 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. Each actor gains energy each tick and acts when it has 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: # stable order avoids ties favoring one side
a.energy += a.speed # e.g. speed 100 = normal, 150 = hasted
if a.energy >= TURN_COST:
a.energy -= TURN_COST
return a # this actor takes exactly one action now
3. Field of view + explored memory
# Pseudocode. Recompute visibility from the player each time they move.
visible = compute_fov(map, player.pos, radius=8) # symmetric shadowcasting (see refs)
for cell in visible:
explored.add(cell) # remember it forever (dim "fog of war")
# Render: visible -> lit; explored-but-not-visible -> dim; never-seen -> hidden.
Use a proven FOV algorithm (recursive shadowcasting or symmetric shadowcasting). Do not roll a naive raycast-per-cell — it produces asymmetric, "blinking" vision. See refs.
Pitfalls / failure modes
- Disconnected dungeons → rooms the player can't reach. Always run a connectivity/flood-fill pass and carve corridors until every walkable cell is reachable.
- Naive FOV → vision that flickers or is asymmetric (you see them, they don't see you). Use shadowcasting; test symmetry.
- Real-time loop pretending to be turn-based → input races and double-moves. Resolve one discrete turn at a time; queue input.
- Flat difficulty → no descent pressure. Scale monsters/loot by depth and keep resources scarce.
- Permadeath that wipes meta-unlocks → frustration. Separate run state (wiped) from
profile state (unlocks, scores) when saving (see
save-systems). - Save-scumming a "permadeath" game → delete or invalidate the run save on load if you want true permadeath; keep only the profile.
- Unreadable state → the player can't plan. Show HP, turn results, and a message log.
Composition (build it from these skills)
- Generation:
procedural-gen(noise, seeded RNG, dungeon/room algorithms) — the engine of replayability. - Map rendering:
godot-tilemap/unity-tilemap-2dfor the grid;level-designfor set-piece rooms/vaults. - Enemies:
game-aifor monster decision-making (often simple on a grid: seek/flee/patrol). - Persistence:
save-systemsfor run-resume, profile/meta-progression, and true permadeath wipes. - Scripting/data:
godot-resources/unity-scriptableobjectsto define items, monsters, and drop tables as data. - UI:
godot-ui-controlfor the message log, inventory, and HUD. - Feel:
game-feelfor hit/death juice — screen shake and hit-stop that sell impacts on a turn-based grid.
References
- For dungeon-generation algorithms (rooms-and-corridors, BSP, cellular automata, connectivity),
FOV (shadowcasting), and weighted loot/spawn tables, read
references/generation-fov-loot.md.
Related skills
More from gamedev-skills/awesome-gamedev-agent-skills and the wider catalog.

router
Routes game-dev requests to the right specialized skill based on engine and task.

rpg
Build RPGs with stats, leveling, inventory, quests, dialogue, and combat systems.

save-systems
Design crash-safe, versioned save/load for game state across sessions and patches.

shader-programming
Write portable game shaders—vertex/fragment pipeline, coordinate spaces, UV math, and common effects (dissolve, outline, rim light) in GLSL with HLSL equivalents.

steam-publish
Publish and update games on Steam using Steamworks, SteamPipe, and steamcmd.

survival-crafting
Build survival-crafting games with resource gathering, crafting tech trees, base building, and escalating threats.