Godot Genre Roguelike logo

Godot Genre Roguelike

Community
bgrenat
godot-genre-roguelike

Expert blueprint for roguelikes including procedural generation (Walker method, BSP rooms), permadeath with meta-progression (unlock persistence), run state vs meta state separation, seeded RNG (shareable runs), loot/relic systems (hook-based modifiers), and difficulty scaling (floor-based progression). Use for dungeon crawlers, action roguelikes, or roguelites. Trigger keywords: roguelike, procedural_generation, permadeath, meta_progression, seeded_RNG, relic_system, run_state.

Overview

Publisherbgrenat
Repositorygodot-game-dev-studio
Skill namegodot-genre-roguelike
Stars
27
Forks
3
Bundled files
16
LicenseLGPL-3.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 16 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by bgrenat on GitHub. Read the source before you install it.

Installation

Install the Godot Genre Roguelike AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/bgrenat/godot-game-dev-studio/tree/main/skills/godot-genre-roguelike
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/bgrenat/godot-game-dev-studio.git /tmp/godot-game-dev-studio
mkdir -p .claude/skills
cp -r /tmp/godot-game-dev-studio/skills/godot-genre-roguelike .claude/skills/godot-genre-roguelike
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Godot Genre Roguelike in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Godot Genre Roguelike on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Godot Genre Roguelike is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Godot 4.7 Baseline

  • Expert patterns in this skill target Godot 4.7+ (stable, 2026-06-18).
  • Consult the Godot 4.7 migration guide when upgrading projects from 4.6.
  • NEVER assume 4.6 defaults (stretch mode, audio area_mask, RichTextLabel percent flags) without checking 4.7 migration notes.

Genre: Roguelike

Expert blueprint for roguelikes balancing challenge, progression, and replayability.

NEVER Do (Expert Anti-Patterns)

Generation & RNG

  • NEVER make runs dependent on pure RNG; strictly provide mitigation (rerolls, shops, pity timers) to ensure every run is winnable.
  • NEVER use unseeded RNG for world generation; strictly initialize isolated RandomNumberGenerator with a predictable seed for daily runs/debugging.
  • NEVER rely on @GlobalScope.randi() for critical logic; strictly use local RNG instances to prevent global state pollution.
  • NEVER use Array.pick_random() for critical content drops; strictly use a Shuffle Bag to prevent statistically unfair streaks.
  • NEVER generate massive dungeons on the main thread; strictly use WorkerThreadPool.add_task() or add_group_task() to distribute generation across cores and prevent frame freezes.
  • NEVER interact with the SceneTree from a background thread; strictly generate dungeon data in a thread-safe Array/PackedByteArray before parsing on the main thread.

Data & State

  • NEVER allow Save Scumming; strictly delete mid-run save files immediately upon loading to enforce permadeath.
  • NEVER allow the player to see the "Edge of the World"; strictly use Fog of War or limited vision cones to maintain the mystery of the unknown.
  • NEVER evaluate complex "Director" heuristics every frame; strictly use Frame-Slicing (Engine.get_process_frames()) to run heavy pacing logic only once every 60-120 frames for CPU efficiency.
  • NEVER move rooms individually by pixel values during procedural generation; strictly use Marker2D Connection Points in pre-authored scenes to calculate exact offsets for seamless room stitching.
  • NEVER allow Run State to leak into Meta State; strictly use separate singletons or Resources for RunManager and MetaManager.
  • NEVER scale meta-progression to be overpowered (+100% damage); strictly keep upgrades subtle (+5-15%) to maintain skill-based play.
  • NEVER forget to call duplicate(true) on base stat Resources; failing to deep-duplicate causes all entities to share a single health instance.
  • NEVER save run states to .tscn files; strictly serialize to JSON or binary in user:// to prevent bloat.
  • NEVER rely on the SceneTree as the source of truth for grid logic; strictly maintain grid data in a separate Dictionary or Array.

Grid & Performance

  • NEVER forget to handle Navigation re-baking; strictly rebake NavigationRegion2D AFTER procedural tiles are placed.
  • NEVER use AStar2D for tile grids; strictly use AStarGrid2D with jumping_enabled = true (Jump Point Search) for O(1) queries and high-performance pathing across open areas.
  • NEVER forget to call update() on AStarGrid2D after modifying states; strictly ensures pathfinding queries aren't stale.
  • NEVER use floats (Vector2) for discrete grid coordinates; strictly use Vector2i to prevent precision drift.
  • NEVER use Manhattan heuristics for 8-way movement; strictly use HEURISTIC_CHEBYSHEV or HEURISTIC_OCTILE.
  • NEVER iterate over every cell coordinate (0 to W,H) in GDScript; strictly use get_used_cells() for optimized tile access.
  • NEVER clear procedural levels using free(); strictly use queue_free() to avoid mid-frame segmentation faults.
  • NEVER broadcast mass state changes to a grid immediately; strictly use call_deferred() or call_group_flags to avoid frame spikes during turn transitions.
  • NEVER use heavy TileMapLayer nodes for high-resolution Fog of War; strictly use a GPU Shader Mask via ColorRect and an ImageTexture updated via RenderingServer.texture_2d_update().

🛠 Expert Components (scripts/)

Original Expert Patterns

Modular Components

Core Loop

  1. Preparation: Select character, equip meta-upgrades (see meta_progression_resource.gd).
  2. The Run: complete procedural levels (dungeon_generator_walker.gd), acquire temporary power-ups.
  3. The Challenge: Survive increasingly difficult encounters using A* pathfinding (astar_grid_handler.gd).
  4. Death/Victory: Run ends, resources calculated.
  5. Meta-Progression: Spend resources on permanent unlocks (meta_progression_resource.gd).
  6. Repeat: Start a new run with new capabilities.

Skill Chain

PhaseSkillsPurpose
1. Architecturestate-machines, autoloadsManaging Run State vs Meta State
2. World Gengodot-procedural-generation, tilemap, noiseCreating unique levels every run
3. Combatgodot-combat-system, enemy-aiFast-paced, high-stakes encounters
4. Progressionloot-tables, godot-inventory-systemManaging run-specific items/relics
5. Persistencesave-system, resourcesSaving meta-progress between runs

Architecture Overview

Roguelikes require a strict separation between Run State (temporary) and Meta State (persistent).

1. Run Manager (AutoLoad)

Handles the lifespan of a single run. Resets completely on death.

gdscript
# run_manager.gd
extends Node

signal run_started
signal run_ended(victory: bool)
signal floor_changed(new_floor: int)

var current_seed: int
var current_floor: int = 1
var player_stats: Dictionary = {}
var inventory: Array[Resource] = []
var rng: RandomNumberGenerator

func start_run(seed_val: int = -1) -> void:
    rng = RandomNumberGenerator.new()
    if seed_val == -1:
        rng.randomize()
        current_seed = rng.seed
    else:
        current_seed = seed_val
        rng.seed = current_seed
        
    current_floor = 1
    _reset_run_state()
    run_started.emit()

func _reset_run_state() -> void:
    player_stats = { "hp": 100, "gold": 0 }
    inventory.clear()

func next_floor() -> void:
    current_floor += 1
    floor_changed.emit(current_floor)
    
func end_run(victory: bool) -> void:
    run_ended.emit(victory)
    # Trigger meta-progression save here

2. Meta-Progression (Resource)

Stores permanent unlocks.

gdscript
# meta_progression.gd
class_name MetaProgression
extends Resource

@export var total_runs: int = 0
@export var unlocked_weapons: Array[String] = ["sword_basic"]
@export var currency: int = 0
@export var skill_tree_nodes: Dictionary = {} # node_id: level

func save() -> void:
    ResourceSaver.save(self, "user://meta_progression.tres")

static func load_or_create() -> MetaProgression:
    if ResourceLoader.exists("user://meta_progression.tres"):
        return ResourceLoader.load("user://meta_progression.tres")
    return MetaProgression.new()

Key Mechanics implementation

Procedural Dungeon Generation

  • Drunkard's Walk (Walker): Ideal for organic, cave-like or connected room layouts.
  • Binary Space Partitioning (BSP): Best for rectangular, connected room-and-hallway dungeons.
  • Wave Function Collapse (WFC): For highly detailed, rule-based tile environments and modular room assembly.
gdscript
# dungeon_generator.gd
extends Node

@export var map_width: int = 50
@export var map_height: int = 50
@export var max_walkers: int = 5
@export var max_steps: int = 500

func generate_dungeon(tilemap: TileMapLayer, rng: RandomNumberGenerator) -> void:
    tilemap.clear()
    var walkers: Array[Vector2i] = [Vector2i(map_width/2, map_height/2)]
    var floor_tiles: Array[Vector2i] = []
    
    for step in max_steps:
        var new_walkers: Array[Vector2i] = []
        for walker in walkers:
            floor_tiles.append(walker)
            # 25% chance to destroy walker, 25% to spawn new one
            if rng.randf() < 0.25 and walkers.size() > 1:
                continue # Destroy
            if rng.randf() < 0.25 and walkers.size() < max_walkers:
                new_walkers.append(walker) # Spawn
            
            # Move walker
            var direction = [Vector2i.UP, Vector2i.DOWN, Vector2i.LEFT, Vector2i.RIGHT].pick_random()
            new_walkers.append(walker + direction)
        
        walkers = new_walkers
    
    # Set tiles
    for pos in floor_tiles:
        tilemap.set_cell(pos, 0, Vector2i(0,0)) # Assuming source_id 0 is floor
    
    # Post-process: Add walls, spawn points, etc.

Item/Relic System (Resource-based)

Relics modify stats or add behavior.

gdscript
# relic.gd
class_name Relic
extends Resource

@export var id: String
@export var name: String
@export var icon: Texture2D
@export_multiline var description: String

# Hook system for complex interactions
func on_pickup(player: Node) -> void:
    pass

func on_damage_dealt(player: Node, target: Node, damage: int) -> int:
    return damage # Return modified damage

func on_kill(player: Node, target: Node) -> void:
    pass
gdscript
# example_relic_vampirism.gd
extends Relic

func on_kill(player: Node, target: Node) -> void:
    player.heal(5)
    print("Vampirism triggered!")

4. Director-AI (Pacing Manager)

Use frame-slicing to evaluate student performance and adjust difficulty without CPU spikes.

gdscript
# director_ai.gd (Autoload)
func _process(_delta):
    # Only evaluate every 60 frames
    if Engine.get_process_frames() % 60 == 0:
        _update_pacing_logic()

func _update_pacing_logic():
    if player_health < 30:
        spawn_rate -= 0.5 # Ease up
    elif player_kills > 100:
        spawn_rate += 1.0 # Challenge more

5. Procedural Room Assembler (Markers)

Snap rooms together using connection markers for pixel-perfect stitching.

gdscript
# room_assembler.gd
func add_room(new_scene: PackedScene, prev_exit: Marker2D):
    var inst = new_scene.instantiate()
    add_child(inst)
    await inst.tree_entered # Wait for node to be ready
    
    var entrance = inst.get_node("Entrance")
    # Snap room so entrance matches previous exit
    var offset = inst.global_position - entrance.global_position
    inst.global_position = prev_exit.global_position + offset

6. Synergy-Tag System (Relics)

Use tag aggregation on ItemData resources to trigger synergistic effects.

gdscript
# synergy_manager.gd
func check_synergies(inventory: Array[ItemData]):
    var tags = {}
    for item in inventory:
        for tag in item.synergy_tags:
            tags[tag] = tags.get(tag, 0) + 1
            
    if tags.get(&"Fire", 0) >= 1 and tags.get(&"Projectile", 0) >= 1:
        activate_synergy(&"Flaming_Arrow")

## Common Pitfalls

1.  **RNG Dependency**: Don't make runs entirely dependent on luck. Good roguelikes allow skill to mitigate bad RNG.
2.  **Meta-progression Imbalance**: If meta-upgrades are too strong, the game becomes a "grind to win" rather than "learn to win".
3.  **Lack of Variety**: Procedural generation is only as good as the content it arranges. You need *a lot* of content (rooms, enemies, items) to keep it fresh.
4.  **Save Scumming**: Players will try to quit to avoid death. Save the state only on floor transition or quit, and delete the save on load (optional, but standard for strict roguelikes).

## Godot-Specific Tips

-   **Seeded Runs**: Always initialize `RandomNumberGenerator` with a seed. This allows players to share specific run layouts.
-   **ResourceSaver**: Use `ResourceSaver` for meta-progression, but be careful with cyclical references in deeply nested resources.
-   **Scenes as Rooms**: Build your "rooms" as separate scenes (`Room1.tscn`, `Room2.tscn`) and instance them into the generated layout for handcrafted quality within procedural layouts.
-   **Navigation**: Rebake `NavigationRegion2D` at runtime after generating the dungeon layout if using 2D navigation.

## Advanced Techniques

-   **Synergy System**: Tag items (`fire`, `projectile`, `companion`) and check for tag combinations to create emergent power-ups.
-   **Director AI**: An invisible "Director" system that tracks player health/stress and adjusts spawn rates dynamically (like *Left 4 Dead*).


## Reference
- Master Skill: [godot-master](../godot-master/SKILL.md)

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Godot Genre Roguelike AI skill do?

Expert blueprint for roguelikes including procedural generation (Walker method, BSP rooms), permadeath with meta-progression (unlock persistence), run state vs meta state separation, seeded RNG (shareable runs), loot/relic systems (hook-based modifiers), and difficulty scaling (floor-based progression). Use for dungeon crawlers, action roguelikes, or roguelites. Trigger keywords: roguelike, procedural_generation, permadeath, meta_progression, seeded_RNG, relic_system, run_state.

Why use Godot Genre Roguelike on TypingMind?

Because you install it once and use it with any model. Godot Genre Roguelike is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Godot Genre Roguelike in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/bgrenat/godot-game-dev-studio/tree/main/skills/godot-genre-roguelike. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Godot Genre Roguelike?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Godot Genre Roguelike?

As many as you like. As long as a model supports skills, you can use Godot Genre Roguelike with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Godot Genre Roguelike AI skill free?

Yes. It is published on GitHub by bgrenat under the LGPL-3.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇