← ClaudeAtlas

godot-scene-compositionlisted

Designing Godot scene trees - scenes as reusable components, instancing with PackedScene and instantiate, composition over inheritance, node ownership and the owner property, scene-unique names, editable children and inherited scenes, and how a node should reach its collaborators. Use when adding nodes or scenes, when a scene tree has grown deep and brittle, when deciding between an inherited scene and a component node, or when runtime-built subtrees fail to save or serialise.
ibrohim1234567881717/game-dev-ai-skills · ★ 0 · AI & Automation · score 71
Install: claude install-skill ibrohim1234567881717/game-dev-ai-skills
# Godot Scene Composition ## Purpose In Godot the scene is the unit of reuse, the unit of version control and the unit of instantiation all at once. A `.tscn` is a prefab, a component, a level and a UI panel depending on how you use it, and there is no separate prefab system to fall back on. That flexibility means the architecture of a Godot game *is* the shape of its scene trees. This skill covers how to shape them so that a feature can be moved, reused and deleted without a search-and-replace across node paths. ## When to use - Adding a new scene, or deciding whether something should be a scene at all. - A scene has grown past a screenful of nodes, or several scenes share a copy-pasted subtree. - Choosing between inheritance (an inherited scene, or `extends BaseEnemy`) and composition (a component node dropped into three unrelated scenes). - Nodes built at runtime do not appear when the scene is saved with `PackedScene.pack()`. - `$Path/To/Node` returns null after someone reorganised the tree. - Scene transitions crash with "Parent node is busy" or free a node mid-frame. ## When NOT to use - The syntax of a script attached to a node — `godot-gdscript-patterns`. - Communication topology between nodes once the tree shape is decided — `godot-signals-events`. - Data assets that are not nodes — `godot-resources-data`. - Control node layout inside a UI scene — `godot-ui-control-nodes`. ## Required context - **Major version.** `config_version` in `project.godot`. `