Logo: Scene Hierarchy Design

Scene Hierarchy Design

Organisatioun
SummerEngine
scene-hierarchy-design

Structure scenes by access pattern: asset vs live hierarchies, wrapper nodes, sub-scenes, path-agnostic code.

Iwwersiicht

EditeurSummerEngine
Repositorysummer
Skill-Nummscene-hierarchy-design
Stären
91
Forks
8
Matgeliwwert Dateien
1
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 1 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    SummerEngine huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Scene Hierarchy Design an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/SummerEngine/summer/tree/main/library/skills/scene-hierarchy-design
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/SummerEngine/summer.git /tmp/summer
mkdir -p .claude/skills
cp -r /tmp/summer/library/skills/scene-hierarchy-design .claude/skills/scene-hierarchy-design
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Scene Hierarchy Design an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Scene Hierarchy Design automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Scene Hierarchy Design net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Scene Hierarchy Design for Summer Engine (Data-Oriented Principles)

Outcome

Scenes in Summer Engine that are organized by access pattern, not by accident: clear separation between reusable asset scenes (.tscn prefabs) and the live node tree, wrapper grouping where whole subtrees are operated on together, flat siblings where type-wide queries dominate, and gameplay logic that does not depend on deep fragile node paths.

When to Use

  • Structuring a new scene (level, character, prop cluster, UI screen) from scratch.
  • Reorganizing a scene that has grown ad hoc (long chains, duplicate setups, hard-to-delete clusters).
  • Deciding whether a setup belongs inline or as a separate sub-scene.
  • Reviewing whether existing scenes match the dominant operations the game performs on them (spawn/despawn clusters, iterate all of a type, move single nodes).

Do not use this for shader/material work, asset import mechanics, or gameplay tuning — it is purely about hierarchy shape.

Core Principle (translated)

Sander Mertens' ECS article evaluates hierarchies on two axes and both translate directly:

  1. Usability: two hierarchy kinds must compose. Asset hierarchies (inheritance, variations, property overrides → .tscn sub-scenes and scene inheritance) and scene hierarchies (live parent-child relations → the node tree). A scene that repeatedly rebuilds the same inline cluster is missing its asset hierarchy; an asset scene nobody instantiates is dead weight.
  2. Performance: match structure to dominant access patterns. Group nodes stored/operated together under one parent (subtree operations become one operation); keep nodes queried independently as flat siblings. There is no universally optimal depth — analyze usage before picking one.
  3. Hierarchy-agnostic logic. The article's hybrid design keeps application code independent of storage; the Summer translation is: scripts and agents should not hardcode deep paths. Use groups, signals, and exported NodePath references instead of long ancestor chains.

Summer Engine Integration

Scene hierarchy features from the article map onto Summer MCP tools as follows:

Feature (article)Summer Engine tool
Instantiate assetssummer_instantiate_scene
Recursively despawnsummer_remove_node on the wrapper parent (removes the subtree)
Reparent childrensummer_remove_node + summer_add_node/summer_instantiate_scene under the new parent
Iterate the live hierarchysummer_get_scene_tree (always read before mutating)
Lookup by namedescriptive, unique node names resolved from summer_get_scene_tree

Recommended scene shape — group by operation, name by role:

World (Node3D)                  # scene root
├── Camera3D                    # unique to this scene → inline
├── DirectionalLight3D          # unique → inline
├── Level (Node3D)              # wrapper: geometry operated as one subtree
├── Props (Node3D)              # wrapper: spawn/despawn clusters together
│   ├── Crate_01 (instance of res://scenes/props/crate.tscn)
│   └── Barrel_01 (instance)
├── Enemies (Node3D)            # wrapper: recursive clear of all enemies
│   └── Grunt_01 (instance of res://scenes/enemies/grunt.tscn)
└── Player (instance of res://scenes/player.tscn)

Rules of thumb:

  • Wrapper node per operation boundary. If you ever need to "remove all enemies", "hide all props", or "rebuild the level", they share one parent; the operation becomes a single node op.
  • Sub-scene per reusable setup. Same cluster appearing twice or more → extract to its own .tscn and instantiate. One-offs (main camera, a level-specific light) stay inline.
  • Flat over deep. Every extra level of nesting adds path length and fragility. Prefer named sibling containers over long chains.
  • Unique descriptive names. The engine auto-renames duplicates (Node, Node2); that breaks name lookup. Name by role and index (Crate_01).
  • Never mix 2D under 3D (or vice versa) in one hierarchy.

Agent Procedure

Follow the canonical scene loop from the Summer MCP reference: route → orient → read rules → resolve scenePath → mutate → verify.

  1. Orient. summer_call {"op":"docs.plan"} to route the goal; summer_get_project_context; summer_call {"op":"summer_get_agent_playbook"}.
  2. Read before writing. summer_get_scene_tree on the exact res://...tscn. Never mutate blind, and never edit .tscn text while the engine is running — use the MCP tools.
  3. Pick the access pattern. For each planned cluster decide: operated as a subtree (→ wrapper parent), queried by type across the scene (→ flat siblings + group), or unique (→ inline under root container).
  4. Build asset hierarchies first. For reusable setups create the sub-scene (summer_create_scene / build inline then summer_save_scene(scenePath="res://main.tscn", path="res://scenes/<name>.tscn")), then bring them in with summer_instantiate_scene(scenePath="res://main.tscn", parent="./<Wrapper>", scene="res://scenes/<name>.tscn", name="<Role>_01").
  5. Add inline nodes with summer_add_node(parent="./<Wrapper>", type="...", name="...", scenePath="res://main.tscn"). Parent paths are relative with the ./ prefix (./, ./World/Props); never /World or bare World.
  6. Keep logic path-agnostic. When a script must reach another node, add it to a group or export a NodePath/signal connection (summer_connect_signal) rather than hardcoding ./World/Enemies/Grunt_01/Weapon.
  7. Every mutation names its target. Pass the exact scenePath to every add/set/remove/instantiate call. Dedicated mutation tools append one final save; use summer_save_scene only for save-as or an explicit flush.
  8. Verify. summer_get_script_errors, then summer_get_scene_tree again to confirm the intended shape; summer_screenshot (editor viewport) for visual confirmation; summer_play → summer_get_debugger_errors → summer_stop only when runtime behaviour matters.

Failure Modes

  • Deep fragile paths in scripts. Hardcoded ancestor chains break on any reorganization; this is the direct analogue of the article's warning against logic coupled to hierarchy storage. Use groups/signals/exported paths.
  • Inline duplication instead of sub-scenes. The same 5-node cluster rebuilt in three levels → edits must be made three times, and despawn/iteration must enumerate each copy. Extract the asset hierarchy.
  • Over-grouping. Wrapping every node in its own container adds depth without enabling any operation. Group only where a real subtree operation exists.
  • Duplicate/unnamed nodes. Auto-renamed Node2 nodes break lookup-by-name. Rename immediately after adding.
  • Wrong parent path. ./NonExistent fails; ensure the parent exists before adding children (read the tree first).
  • Copying a scene as a template without auditing transforms. Carried-over instances keep world-space offsets baked for the source level; re-zero or drop transform overrides per instance.
  • Direct .tscn edits while running. They get overwritten when the editor saves; always go through MCP scene tools.

Verification

  1. summer_get_scene_tree shows the intended wrapper structure with unique descriptive names and no auto-renamed nodes.
  2. Each repeated setup exists once as a .tscn and appears elsewhere only as instances.
  3. Deleting a wrapper parent (summer_remove_node) removes exactly its subtree — the recursive-despawn feature works.
  4. No script references a path deeper than one or two segments; group/signal/NodePath used instead.
  5. summer_get_script_errors and (if played) summer_get_debugger_errors are clean; summer_screenshot matches the intended layout.

From a shell

No Summer MCP tools in this session? Run each one as a command; when summer --version is missing or below 4.0, use npx -y summer-engine@latest in place of summer. Fields are flags in kebab-case (--scene-path res://main.tscn) or one --input '<json>', and summer ops describe <op> prints the exact input. The summer-cli skill has the rest.

In this skillCommand
docs.plansummer docs plan
summer_add_nodesummer engine add-node
summer_connect_signalsummer engine connect-signal
summer_create_scenesummer engine create-scene
summer_get_debugger_errorssummer engine get-debugger-errors
summer_get_project_contextsummer engine get-project-context
summer_get_scene_treesummer engine get-scene-tree
summer_get_script_errorssummer engine get-script-errors
summer_instantiate_scenesummer engine instantiate-scene
summer_playsummer engine play
summer_remove_nodesummer engine remove-node
summer_save_scenesummer engine save-scene
summer_screenshotsummer engine screenshot
summer_stopsummer engine stop
summer_get_agent_playbooksummer tool get-agent-playbook

Matgeliwwert Dateien

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Scene Hierarchy Design?

Structure scenes by access pattern: asset vs live hierarchies, wrapper nodes, sub-scenes, path-agnostic code.

Firwat Scene Hierarchy Design op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Scene Hierarchy Design besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Scene Hierarchy Design an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/SummerEngine/summer/tree/main/library/skills/scene-hierarchy-design an. TypingMind liest d'Datei SKILL.md, bëndelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Scene Hierarchy Design benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Scene Hierarchy Design benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Scene Hierarchy Design domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Scene Hierarchy Design gratis?

Jo. SummerEngine huet de Skill ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇