Logotipo de Godot Genre Puzzle

Godot Genre Puzzle

Comunidad
bgrenat
godot-genre-puzzle

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 logic puzzles, physics puzzles, or match-3 games. Trigger keywords: puzzle_game, undo_system, command_pattern, grid_logic, non_verbal_tutorial, state_management.

Descripción general

Editorbgrenat
Repositoriogodot-game-dev-studio
Nombre de la habilidadgodot-genre-puzzle
Estrellas
27
Forks
3
Archivos incluidos
15
LicenciaLGPL-3.0
Enlaces
  • Instrucciones en Markdown

    Un archivo SKILL.md que el modelo carga cuando lo necesita, de modo que solo consume tokens cuando la petición encaja con la habilidad.

  • Funciona con cualquier LLM

    Las habilidades de IA están en Markdown, no en código específico de un proveedor, por lo que funcionan con GPT, Claude, Gemini, Grok o un modelo local.

  • Archivos incluidos: 15

    Scripts, plantillas y referencias que el modelo puede leer mientras trabaja. Los archivos son de solo lectura y nunca se ejecutan.

  • Código abierto

    Publicada por bgrenat en GitHub. Revisa el contenido original antes de instalarla.

Instalación

Instala la habilidad de IA Godot Genre Puzzle en TypingMind para usarla con cualquier LLM, o añádela a otro agente que lea SKILL.md.

1

Instalar en TypingMind

TypingMind instala una habilidad directamente desde su carpeta de GitHub: lee SKILL.md, empaqueta los archivos de recursos y guarda el resultado localmente.

  1. Abre la aplicación y ve a Plugins → Habilidades.
  2. Elige «Instalar desde GitHub».
  3. Pega la URL de la carpeta de la habilidad que se muestra a continuación y confirma.
    https://github.com/bgrenat/godot-game-dev-studio/tree/main/skills/godot-genre-puzzle
  4. Activa la habilidad en cada chat en el que quieras tenerla disponible.
Plugins → Habilidades → Añadir habilidad → URL de GitHub; después, pega la URL de la carpeta y pulsa Continuar.
2

Instalar en otro agente

Cualquier agente que lea el formato Agent Skills puede usar esta habilidad: copia la carpeta en el directorio de habilidades de ese agente.

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-puzzle .claude/skills/godot-genre-puzzle
Reinicia Claude Code después de copiarla para que detecte la nueva habilidad.

Úsala en TypingMind

Activa Godot Genre Puzzle en cualquier chat de TypingMind y el modelo se encargará del resto. Su nombre y descripción se incluyen en el prompt del sistema y, en cuanto una petición encaja con la habilidad, el modelo carga las instrucciones completas por sí solo. No tienes que invocarla manualmente y no consume tokens hasta que se utiliza.

El modelo carga Godot Genre Puzzle automáticamente en cuanto una petición es relevante para esa habilidad.

Funciona con cualquier modelo de IA

Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que Godot Genre Puzzle no está vinculada al modelo para el que se creó. Instálala una sola vez en TypingMind y úsala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modelo local que ejecutes tú, todo con tus propias claves API.

  • Se carga solo cuando se necesita

    El prompt del sistema solo incluye el nombre y la descripción. Las instrucciones se cargan con la primera petición que encaja con la habilidad, por lo que una habilidad que no se usa no supone ningún coste.

  • Cambia de modelo durante el chat

    Como la habilidad contiene instrucciones y no código, cambiar de modelo no impide que funcione: el nuevo modelo lee el mismo archivo SKILL.md.

Instrucciones de la habilidad

Este es el contenido de SKILL.md que carga el modelo. Léelo antes de instalar la habilidad: contiene instrucciones que tu modelo seguirá.

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: Puzzle

Expert blueprint for puzzle games emphasizing clarity, experimentation, and "Aha!" moments.

NEVER Do (Expert Anti-Patterns)

Design & Player Experience

  • NEVER punish experimentation; strictly provide Undo/Reset functionality to allow risk-free hypothesis testing.
  • NEVER require pixel-perfect input for logic puzzles; strictly use Grid Snapping or large, forgiving hitboxes.
  • NEVER allow undetected Soft-Locks (unsolvable states); strictly notify the player or provide immediate backtracking.
  • NEVER hide the rules of the world; strictly ensure visual feedback is instant and unambiguous (e.g., powered wires must glow).
  • NEVER skip the Non-Verbal Tutorial phase; strictly introduce mechanics in isolation before combining them.

Grid Logic & State

  • NEVER use floating-point numbers (Vector2) for grid coordinates; strictly use Vector2i to prevent precision drift.
  • NEVER use _process() for grid-state or win-condition validation; strictly trigger checks only when a piece moves.
  • NEVER rely on the SceneTree structure as the source of truth; strictly maintain grid data in a separate script/dictionary.
  • NEVER modify a Dictionary or Array size while iterating over it; strictly use a copy or a separate queue for modifications.
  • NEVER calculate heavy recursive solvers in _process(); strictly cache results or use threaded workers for solve-checks.
  • NEVER ignore diagonal rules in pathfinding; strictly configure AStarGrid2D.diagonal_mode correctly.

Architecture & Performance

  • NEVER program custom command history queues manually; strictly use Godot's built-in UndoRedo system for reliability.
  • NEVER intermingle "do" and "undo" logic in the same function; strictly maintain separation for predictable rollbacks.
  • NEVER use exact floating-point equality (==); strictly use is_equal_approx() for spatial constraints.
  • NEVER use load() for resetting large rooms dynamically; strictly use ResourceLoader.load_threaded_request().
  • NEVER leave Tween objects unreferenced; strictly kill active tweens before starting new movement on the same object.

🛠 Expert Components (scripts/)

Original Expert Patterns

  • command_undo_redo.gd - Professional-grade Command Pattern for non-destructive state reversal and experimentation.
  • grid_manager.gd - Decoupled grid logic data structure for raycast-free move validation (Sokoban/Match-3).

Modular Components


Core Loop

  1. Observation: Player assesses the level layout and mechanics.
  2. Experimentation: Player interacts with elements (push, pull, toggle).
  3. Feedback: Game reacts (door opens, laser blocked).
  4. Epiphany: Player understands the logic ("Aha!" moment).
  5. Execution: Player executes the solution to advance.

Skill Chain

PhaseSkillsPurpose
1. Interactiongodot-input-handling, raycastingClicking, dragging, grid movement
2. Logiccommand-pattern, state-managementUndo/Redo, tracking level state
3. Feedbackgodot-tweening, juiceVisual confirmation of valid moves
4. Progressiongodot-save-load-systems, level-designUnlocking levels, tracking stars/score
5. Polishui-minimalismNon-intrusive HUD

Architecture Overview

1. Command Pattern (Undo System)

Essential for puzzle games. Never punish testing.

gdscript
# command.gd
class_name Command extends RefCounted

func execute() -> void: pass
func undo() -> void: pass

# level_manager.gd
var history: Array[Command] = []
var history_index: int = -1

func commit_command(cmd: Command) -> void:
    # Clear redo history if diverging
    if history_index < history.size() - 1:
        history = history.slice(0, history_index + 1)
        
    cmd.execute()
    history.append(cmd)
    history_index += 1

func undo() -> void:
    if history_index >= 0:
        history[history_index].undo()
        history_index -= 1

2. Grid System (TileMap vs Custom)

For grid-based puzzles (Sokoban), a custom data structure is often better than just reading physics.

gdscript
# grid_manager.gd
var grid_size: Vector2i = Vector2i(16, 16)
var objects: Dictionary = {} # Vector2i -> Node

func move_object(obj: Node, direction: Vector2i) -> bool:
    var start_pos = grid_pos(obj.position)
    var target_pos = start_pos + direction
    
    if is_wall(target_pos):
        return false
        
    if objects.has(target_pos):
        # Handle pushing logic here
        return false
        
    # Execute move
    objects.erase(start_pos)
    objects[target_pos] = obj
    tween_movement(obj, target_pos)
    return true

Key Mechanics Implementation

Win Condition Checking

Check victory state after every move.

gdscript
func check_win_condition() -> void:
    for target in targets:
        if not is_satisfied(target):
            return
    
    level_complete.emit()
    save_progress()

Non-Verbal Tutorials

Teach mechanics through level design, not text.

  1. Isolation: Level 1 introduces only the new mechanic in a safe room.
  2. Reinforcement: Level 2 requires using it to solve a trivial problem.
  3. Combination: Level 3 combines it with previous mechanics.

Common Pitfalls

  1. Strictness: Requiring pixel-perfect input for logic puzzles. Fix: Use grid snapping or forgiving hitboxes.
  2. Dead Ends: Allowing the player to get into an unsolvable state without realizing it. Fix: Auto-detect failure or provide a prominent "Reset" button.
  3. Obscurity: Hiding the rules. Fix: Visual feedback must be instant and clear (e.g., a wire lights up when connected).

Godot-Specific Tips

  • Tweens: Use create_tween() for all grid movements. It feels much better than instant snapping.
  • Custom Resources: Store level data (layout, starting positions) in .tres files for easy editing in the Inspector.
  • Signals: Use signals like state_changed to update UI/Visuals decoupled from the logic.

🚀 Elite Technical Implementations (Batch 09)

1. Level-Editor Serialization Pattern

For puzzle games with custom editors, avoid using .tscn at runtime. Instead, use FileAccess and JSON to serialize grid data into compact, human-readable files in the user:// directory.

gdscript
class_name LevelSerializer extends Node

const LEVEL_DIR := "user://levels/"

## Serializes the grid state into a JSON file.
static func save_level(level_name: String, grid_data: Dictionary) -> void:
    var path := LEVEL_DIR + level_name + ".json"
    var file := FileAccess.open(path, FileAccess.WRITE)
    
    if file:
        file.store_string(JSON.stringify(grid_data, "\t"))
        file.close()
        print("Level saved successfully!")

## Deserializes a JSON file back into a Dictionary.
static func load_level(level_name: String) -> Dictionary:
    var path := LEVEL_DIR + level_name + ".json"
    var file := FileAccess.open(path, FileAccess.READ)
    
    if file:
        var json_string := file.get_as_text()
        var parsed_data = JSON.parse_string(json_string)
        if parsed_data is Dictionary:
            return parsed_data as Dictionary
    return {}

2. Hint-Systems (A* Solvers)

Use AStarGrid2D to provide logical hints. It is optimized for uniform grids and supports Jump Point Search (JPS) via jumping_enabled to drastically speed up pathfinding on large puzzle layouts.

gdscript
class_name PuzzleHintSystem extends Node

var _astar_grid: AStarGrid2D

func _ready() -> void:
    _astar_grid = AStarGrid2D.new()
    _astar_grid.region = Rect2i(0, 0, 32, 32)
    _astar_grid.cell_size = Vector2(1, 1)
    _astar_grid.diagonal_mode = AStarGrid2D.DIAGONAL_MODE_NEVER
    _astar_grid.jumping_enabled = true 
    _astar_grid.update()

## Queries the solver for the next logical step.
func get_next_hint_step(player_pos: Vector2i, goal_pos: Vector2i) -> Vector2i:
    var path := _astar_grid.get_id_path(player_pos, goal_pos)
    if path.size() > 1:
        return path[1] # Return next step in sequence
    return player_pos

3. State-Snapshot Pattern (Instant Resets)

Avoid reload_current_scene() for resets to prevent frame drops and UI flickering. Instead, capture the initial positions of all pieces into a Dictionary and restore them instantly.

gdscript
class_name StateSnapshotManager extends Node

signal state_restored()
var _initial_state_snapshot: Dictionary[NodePath, Vector2] = {}

## Capture initial positions of all puzzle pieces.
func capture_initial_state() -> void:
    var pieces = get_tree().get_nodes_in_group("puzzle_pieces")
    for piece in pieces:
        if piece is Node2D:
            _initial_state_snapshot[piece.get_path()] = piece.global_position

## Instantly restore pieces to their original state.
func reset_to_snapshot() -> void:
    for node_path in _initial_state_snapshot.keys():
        var piece = get_node_or_null(node_path) as Node2D
        if piece:
            piece.global_position = _initial_state_snapshot[node_path]
    state_restored.emit()

Archivos incluidos

El modelo los lee según los necesita mientras la habilidad está cargada. Son archivos de solo lectura y nunca se ejecutan.

Preguntas frecuentes

¿Qué hace la habilidad de IA Godot Genre Puzzle?

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 logic puzzles, physics puzzles, or match-3 games. Trigger keywords: puzzle_game, undo_system, command_pattern, grid_logic, non_verbal_tutorial, state_management.

¿Por qué usar Godot Genre Puzzle en TypingMind?

Porque la instalas una vez y la usas con cualquier modelo. Godot Genre Puzzle está escrita en Markdown, no en código específico de un proveedor, por lo que la misma habilidad funciona con GPT-5, Claude, Gemini, Grok o un modelo local, y puedes cambiar de modelo en mitad del chat sin que deje de funcionar. TypingMind utiliza tus propias claves API, de modo que pagas directamente a los proveedores en lugar de pagar una suscripción por puesto, y tus habilidades y chats permanecen en tu propio almacenamiento.

¿Cómo instalo Godot Genre Puzzle en TypingMind?

Abre Plugins → Habilidades → Instalar desde GitHub en TypingMind y pega https://github.com/bgrenat/godot-game-dev-studio/tree/main/skills/godot-genre-puzzle. TypingMind lee el archivo SKILL.md de esa carpeta, empaqueta los archivos de la carpeta e instala el conjunto como una habilidad que puedes activar en cada chat.

¿Qué modelos de IA pueden usar Godot Genre Puzzle?

Cualquier modelo que conectes en TypingMind. Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que GPT, Claude, Gemini, Grok y los modelos locales pueden cargar esta habilidad cuando una solicitud se corresponda con ella.

¿Con cuántos modelos de IA puedo usar Godot Genre Puzzle?

Con tantos como quieras. Siempre que un modelo admita habilidades, puedes usar Godot Genre Puzzle con él: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama y muchos más, todos en TypingMind con tus propias claves API.

¿Es gratuita la habilidad de IA Godot Genre Puzzle?

Sí. bgrenat la ha publicado en GitHub bajo la licencia LGPL-3.0. Solo pagas a tu proveedor de IA por los tokens que utilizas.

¿Qué son las habilidades de IA?

Una habilidad de IA es un conjunto de instrucciones reutilizables que enseña a un modelo de IA a realizar una tarea concreta. Sigue el formato abierto Agent Skills: un archivo SKILL.md con un nombre y una descripción, además de los scripts, plantillas o archivos de referencia que pueda necesitar el modelo. El modelo solo lee las instrucciones cuando tu solicitud se corresponde con la habilidad, por lo que una habilidad instalada no supone ningún coste hasta que se utiliza.

¿En qué se diferencian las habilidades de IA de los plugins o los servidores MCP?

Un plugin o un servidor MCP proporciona al modelo nuevas herramientas que puede invocar: código que se ejecuta en algún lugar y devuelve un resultado. En cambio, una habilidad de IA aporta conocimientos y procedimientos al modelo: cómo abordar una tarea, qué pasos seguir y qué se considera un buen resultado. Las habilidades son instrucciones en Markdown, por lo que no necesitan servidor, clave API ni entorno de ejecución, y funcionan con cualquier modelo.

Ver el directorio

Crea ya tu propio espacio de trabajo con IA

Suscríbete a nuestro boletín para recibir avisos sobre nuevas funciones y próximos sorteos 👇