Roguelike
Procedural dungeons, turn-based combat, and permadeath — built one syntax beat at a time.
Start Part 1Overview
The Roguelike project splits into two halves. The dungeon crawler (Parts 1-4) builds a playable game: grid movement, enemy AI, procedural room layouts, inventory, and permadeath. The map generation series (Parts 5-9) teaches five standalone algorithms — Drunkard's Walk, Cellular Automata, BSP Dungeons, Noise Terrain, and a Synthesis capstone that combines them all behind a strategy pattern.
Every line of GDScript is typed from memory rather than copied from a tutorial. You write TileMapLayer lookups, RandomNumberGenerator seeds, recursive partitioning, and flood fill cleanup without referencing documentation. The map generation tutorials are especially good for building this kind of muscle memory because the algorithms are short (20-40 lines each) and the visual feedback is immediate — you see the map change as you type each piece.
The project assumes you know Godot basics: CharacterBody2D, signals, scene instancing. If those are new, start with Arena Survivor. The map generation tutorials are self-contained and can be done in any order — each one teaches a single algorithm from scratch and produces a playable result.
Prerequisites
- ✓Complete Arena Survivor or be comfortable with CharacterBody2D, signals, and scene instancing
- ✓Familiarity with GDScript basics: variables, functions, conditionals, loops
- ✓A modern web browser (everything runs in-browser, no install needed)
What You'll Learn
- •Implement grid-snapped turn-based movement on a TileMapLayer
- •Build enemy AI with chase behavior and turn-based attack calculations
- •Generate procedural dungeons with four different algorithms (drunkard walk, cellular automata, BSP, noise)
- •Manage inventory with typed arrays, equipment stats, and item pickup signals
- •Combine multiple generation strategies behind an enum with seeded randomness
Build a roguelike in Godot 4 with procedural dungeon generation, turn-based grid movement, combat mechanics, and permadeath — all typed from memory in GDScript.
Part 1: Into the Cave
Create tile-based dungeon rooms, implement grid-snapped movement with Input actions, and build the core game loop for a turn-based roguelike in GDScript.
Part 2: Every Turn Has Teeth
Add turn-based combat with attack calculations, enemy AI that chases the player, health tracking, and damage signals in GDScript.
Part 3: The Dungeon Breathes
Generate procedural dungeon layouts with random room placement, corridor connections, and seeded RandomNumberGenerator for reproducible levels.
Part 4: Mutations in the Dust
Add item pickups, inventory management with typed arrays, equipment stat modifiers, and permadeath progression mechanics.
Drunkard's Walk
Generate organic cave maps with a random walker algorithm — set a starting position, pick random directions, and carve floor tiles until you hit a coverage target.
Cellular Automata
Smooth random noise into natural cave chambers using the cellular automata 4-5 rule — fill the grid, count neighbors, snapshot state, and iterate.
BSP Dungeons
Build structured dungeon layouts with Binary Space Partitioning — recursively subdivide space, place rooms in leaves, and connect them with corridors.
Noise Terrain
Use Godot's FastNoiseLite to generate terrain — create noise, add fractal octaves for detail, shape an island with distance falloff, clean up disconnected tiles with flood fill, and spawn the player.
Synthesis
Combine all four map generation algorithms behind a strategy enum — switch generators and regenerate maps with new seeds at the press of a key.
GDScript Concepts Covered
Frequently Asked Questions
- How long does the full Roguelike project take?
- The dungeon crawler (Parts 1-4) takes roughly 3-5 hours. The five map generation tutorials add another 3-4 hours. Each tutorial is self-contained, so you can complete them across multiple sessions.
- Do I need to finish the dungeon crawler before the map generation tutorials?
- No. The map generation tutorials are standalone — each one teaches a single algorithm from scratch. They use the same Godot project as a vehicle but do not depend on Parts 1-4. You can do them in any order.
- What makes this different from a roguelike tutorial on YouTube?
- You type every line from memory instead of copying. Active recall builds stronger retention than passive watching. After finishing, you will be able to write RandomNumberGenerator seeds, TileMapLayer lookups, and dungeon carving algorithms without referencing documentation.
- Which map generation algorithm should I try first?
- Drunkard's Walk is the simplest — four beats, one concept, instant visual feedback. If you want structured rooms with corridors (the classic roguelike layout), try BSP next. Cellular Automata produces smooth open chambers, and Noise Terrain creates natural islands. The Synthesis part at the end lets you switch between all four and compare them side by side.