Godot genre puzzle

From thedivergentai/GD-Agentic-Skills · View interactive version

Godot genre puzzle is an AI agent skill from the GitHub repository thedivergentai/GD-Agentic-Skills. Expert blueprint for puzzle games including undo systems (Command pattern for state reversal), grid-based logic (Sokoban-style mechanics), non-verbal tutorials (teach through level design), win condition checking, state management, and visual feedback (instant confirmation of valid moves). Use for l

How to use this skill

Skill file

NEVER Do (Expert Anti-Patterns)

Design & Player Experience

Grid Logic & State

Architecture & Performance


🛠 Expert Components (scripts/)

MANDATORY reads before implementing the matching system:

1. puzzle_undo_manager.gd — sole undo authority (UndoRedo)

2. grid_manager.gd — Vector2i grid as truth

3. puzzle_state_validator.gd — soft-lock / win checks on commit

Original Expert Patterns

Modular Components

Do NOT load command_undo_redo.gd — legacy hand-rolled Command stack superseded by UndoRedo.


Core Loop

  1. Observe → 2. Hypothesize → 3. Commit move → 4. Validate → 5. Undo/Reset if needed

Decision Trees

Genre → scripts

| Puzzle type | MANDATORY reads |

|-------------|-----------------|

| Sokoban / push grid | grid_manager.gd, grid_tween_mover.gd, puzzle_undo_manager.gd, puzzle_state_validator.gd |

| Match-3 | match_three_logic.gd, grid_tween_mover.gd, puzzle_undo_manager.gd |

| Physics / spatial | Snap on settle → then same undo/validator path; do not treat rigid bodies as truth |

| Hints / solvers | puzzle_pathfinder.gd (AStarGrid2D.diagonal_mode) |

Undo authority

| Need | Action |

|------|--------|

| Player undo/redo | Only puzzle_undo_manager.gd |

| Level editor history | Still UndoRedo — wrap editor actions the same way |

Skill Chain

| Phase | Skills | Purpose |

|-------|--------|---------|

| 1. Data | dictionaries, resources | Grid truth, level .tres |

| 2. Input | godot-input-handling | Snapped moves |

| 3. Motion | godot-tweening | Piece Tweens |

| 4. AI/hints | godot-navigation-pathfinding | A* hints |

| 5. Persist | godot-save-load-systems | Level / progress |

Common Pitfalls

| Pitfall | Solution |

|---------|----------|

| Dual undo APIs | Delete Command-stack path; use UndoRedo manager only |

| Win check in _process | Validate on move commit via state validator |

| Float grid coords | Vector2i only |

MANDATORY for depth beyond decision trees and script catalog: puzzle-elite-implementations.md. Do NOT Load on first-pass wiring — use bundled scripts/ first.

Architecture Overview

1. Command Pattern (Undo System)

Essential for puzzle games. Never punish testing.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.