Reckfell key concepts
Entities, trees, levels, prefabs, resources and signals: their roles and relationships.
What a game contains
| Concept | Role | Example |
|---|---|---|
Entity | Hierarchy object with a name, parent, children and lifecycle | Character root |
Entity2D / Entity3D | Entity with a 2D / 3D transform | Positioned and rotated object |
| Specialized entity | Built-in engine behavior | Camera3D, CharacterBody3D, Button |
EntityTree | Active game tree | Current level and service objects |
Resource | Data referenced by objects | Material, sound or texture |
PackedEntity | Saved hierarchy used to create an instance | Loaded prefab |
An entity here is a hierarchical object with class inheritance and behavior. The name does not imply ECS: an entity is not merely a numeric ID for components processed by external systems.
Level, prefab and instance
A .rscene level usually assembles a playable space. A .rprefab is a reusable part: a character, item or UI. Both are PackedEntity resources; the original resource path determines the role. .rdata and .rbin store separately saved resource data in text and binary form.
An instance is a separate live hierarchy. Load() obtains its template; Instantiate() creates the instance; AddChild() attaches it. Moving an instance during play does not rewrite the original prefab. Resource data, such as a material, can still be shared across instances. For example, two Player.rprefab instances have separate Entity positions but can reference one Material. Moving one player does not move the other; editing their shared material can affect both.
Parent and Owner
A parent determines tree placement and the lifetime of attached children. Entity2D and Entity3D inherit parent transforms by default. Owner determines inclusion in a saved hierarchy: it must be an ancestor but need not be the immediate parent.
AddChild() assigns the parent without assigning Owner. When building and then saving a hierarchy in code, attach the object first and assign the intended ancestor as owner. Changing Owner does not reparent the object. Appearing in the runtime tree does not save an object automatically.
Script and signal
A script extends entity behavior. A signal notifies other objects that something happened. Call a method for a command addressed to a known object; use a signal to notify interested listeners. Subscriptions do not replay earlier events, so read initial state separately.
Execution order
On tree entry, a parent's _EnterTree() runs before its children's. _Ready() uses the opposite order: children before the parent. Readding the same entity does not repeat _Ready() by itself; use RequestReady() when needed. Detaching with RemoveChild() does not free it by itself: the object can be attached again.
Frame logic runs in _Process(), physics logic on _PhysicsProcess() ticks. Opening a document in the editor does not mean its Entities already execute gameplay code in the running game. QueueFree() schedules deletion of an entity and its children. A C# reference can remain after deletion; validate the object before using it again.
Continue by task: first project, prefabs, movement or UI.