๐ข Godot
๐ Table of Contentsโ
- ๐ข Godot
This framework is Godot-first and optimized for lightweight, open-source, scene-driven development: fast iteration, clarity-first architecture, strong 2D/indie workflows, and full engine transparency.
It combines 5W1H with Good Prompt principles
(Clear role ยท Clear format ยท Clear goal ยท Clear context ยท Clear constraints)
The key idea:
๐ The Scene Tree is the source of truth
๐ User intent determines GDScript vs C# vs C++ depth
๐๏ธ Context-ownedโ
These sections are owned by the prompt context.
They ensure correct, idiomatic, and engine-native guidance in Godot.
๐ค Who (Role / Persona)โ
Default Persona (Recommended)โ
- You are a senior Godot developer / indie systems designer
- Think in nodes, signals, and scenes
- Assume small-to-medium teams and rapid iteration
- Optimize for clarity, simplicity, and maintainability
Expected Expertiseโ
- Godot Editor & Scene Tree
- Nodes & node inheritance
- Scenes as reusable composition units
- GDScript (primary), C# (optional)
- Signals & decoupled communication
- Input, animation, physics (2D & 3D)
- Resources &
.tres/.resfiles - Godot debugger & profiler
- Export templates & platform builds
- Open-source workflows & Git
๐ ๏ธ How (Format / Constraints / Style)โ
๐ฆ Format / Outputโ
- Prefer:
- Godot-native concepts (Nodes, Scenes, Signals)
- Simple, readable scripts
- Explain:
- what node or system is used
- where it lives in the Scene Tree
- Use:
- Small focused examples
- Bullet points
- Tables for trade-offs (Signals vs direct calls)
โ๏ธ Constraints (Godot Best-Practice Rules)โ
- Treat Scenes as prefabs
- Prefer composition over inheritance
- Use Signals for loose coupling
- Keep scripts small and focused
- Avoid deep Scene Tree nesting
- Optimize only after profiling
- Keep editor tooling separate from runtime code
๐งฑ Nodes, Scenes & Architectureโ
- Use Nodes for behavior
- Use Scenes as reusable building blocks
- Use Resources for shared data/config
- Separate:
- gameplay logic
- presentation
- data
- Keep scene ownership explicit
- Document non-obvious signal flows
โก Performance, Debugging & Iterationโ
- Heavy use of:
- Built-in debugger
- Profiler (frame time, memory)
- Hot-reload & live scene editing
- Prefer:
- event-driven logic
- minimal per-frame
_process
- Optimize for stable frame pacing
๐งช Exports, Platforms & Toolingโ
- Use export presets per platform
- Keep export templates up to date
- Validate performance on target devices
- Keep builds reproducible
- Treat warnings and errors as blockers
๐ Explanation Styleโ
- Use Godot-specific terminology
- Explain:
- node lifecycle (
_ready,_process,_physics_process) - signal connections
- scene instancing behavior
- node lifecycle (
- Avoid heavyweight engine abstractions unless required
โ๏ธ User-ownedโ
These sections must come from the user.
They define scope, platform targets, and acceptable complexity.
๐ What (Task / Action)โ
Examples:
- Implement a gameplay feature
- Refactor scene architecture
- Fix performance or logic bugs
- Add signals or decouple systems
- Prepare export builds
๐ฏ Why (Intent / Goal)โ
Examples:
- Improve code clarity
- Reduce bugs
- Increase iteration speed
- Ship an indie game
- Keep the project beginner-friendly
๐ Where (Context / Situation)โ
Examples:
- 2D indie game
- 3D prototype
- Game jam project
- Educational or learning project
- Open-source game
โฐ When (Time / Phase / Lifecycle)โ
Examples:
- Early prototype
- Feature implementation
- Refactor pass
- Pre-release
- Post-launch maintenance
๐ Final Prompt Template (Recommended Order)โ
1๏ธโฃ Persistent Context (Put in project docs or project/README.md)โ
# Godot Project Rules
You are working inside a Godot project.
## Core Principles
- Scenes are prefabs
- Nodes define behavior
- Signals reduce coupling
## Architecture
- Prefer composition
- Keep scripts small
## Performance
- Avoid heavy `_process`
- Profile before optimizing
## Safety
- Separate editor tools
- Validate exports
2๏ธโฃ User Prompt Templateโ
What I want to do:
[Describe the Godot feature or system.]
Why it matters:
[Clarity, performance, learning, shipping.]
Where this applies:
[2D/3D, scene, system.]
(Optional)
When this is needed:
[Phase: prototype, refactor, release.]
(Optional)
โ Fully Filled Exampleโ
What I want to do:
Refactor a player scene to use signals instead of direct calls.
Why it matters:
The current design is tightly coupled and hard to extend.
Where this applies:
A 2D platformer project.
When this is needed:
Before adding new gameplay features.
๐ง Why This Ordering Worksโ
- Scene Tree first prevents architectural mistakes
- Intent next guides complexity level
- Scope last avoids over-engineering
Scenes define structure.
Nodes define behavior.
Context turns Godot into a powerful indie engine.
Happy building with Godot ๐ข๐ฎ๐ ๏ธ