Godot Basics & Architecture

🤖 Godot Engine Architecture & Core Principles

Godot is unique among major modern engines because it pairs a friendly, scene-and-node object model at the gameplay layer with high-performance, data-driven Servers at the low level.


🏛️ The Two Architectural Layers

+-------------------------------------------------------------+
|                Gameplay Layer (SceneTree)                   |
|   Nodes, PackedScenes, Signals, GDScript, Inspector, UI     |
+-------------------------------------------------------------+
                              |
                     (Calls down via RIDs)
                              v
+-------------------------------------------------------------+
|                 Engine Core & Servers                       |
|   RenderingServer | PhysicsServer3D | NavigationServer3D    |
|   AudioServer     | TextServer      | DisplayServer         |
+-------------------------------------------------------------+
                              |
+-------------------------------------------------------------+
|             Hardware Abstraction (Vulkan / C++)             |
|          Vulkan RHI / OpenGL / Low-Level OS Threads         |
+-------------------------------------------------------------+

🌳 1. The Scene & Node System

Unlike Unreal's AActor + UActorComponent model or Unity's GameObject + MonoBehaviour ECS-hybrid, Godot uses pure node composition:

Core Base Node Types

Node Type Space / Purpose Common Examples
Node Logic only (no spatial transform) Timers, State Machines, Quests
Node2D 2D Transform (position, rotation, scale) Sprite2D, TileMapLayer, Area2D
Node3D 3D Transform (basis, quaternion, position) MeshInstance3D, Camera3D, CollisionShape3D
Control 2D GUI with anchor and container sizing Button, MarginContainer, Label

⚡ 2. The Low-Level Servers (The Systems Dev's Secret)

For a developer coming from C++, Unreal, or Odin, nodes can introduce overhead when you need to render 20,000 bullets or simulate thousands of collision particles.

Godot solves this through Servers. Nodes are actually just friendly high-level wrappers that communicate with these C++ servers using RIDs (Resource Identifiers):

  1. RenderingServer: Manages viewports, instances, meshes, materials, and lights. You can create and position 50,000 meshes directly through the RenderingServer without instancing a single MeshInstance3D node.
  2. PhysicsServer3D / PhysicsServer2D: Manages rigid bodies, kinematic bodies, shapes, and queries. Direct raycasts and physics calculations can be dispatched in batch without Node overhead.
  3. NavigationServer3D: The centralized pathfinding engine documented in Intro Into Navigation In Godot. It directly holds navigation polygons and computes paths asynchronously.
  4. AudioServer: Controls audio buses, sends, and DSP effects (similar to Unreal Submixes discussed in Compression).

Example: Direct RenderingServer Call (Zero-Node Overhead)

# Creating a mesh instance directly on the RenderingServer using an RID
var visual_server_rid: RID = RenderingServer.instance_create()
RenderingServer.instance_set_base(visual_server_rid, my_mesh_rid)
RenderingServer.instance_set_scenario(visual_server_rid, get_world_3d().scenario)
RenderingServer.instance_set_transform(visual_server_rid, Transform3D(Basis(), Vector3(10, 0, 0)))

🔄 3. Resources vs. Nodes (Data vs. Logic)

In Godot:

Examples of resources:


⚔️ Comparison: Godot vs Unreal Engine

Concept Godot 4 Unreal Engine 5
World Unit 1 Unit = 1 Meter 1 Unit = 1 Centimeter
Coordinate System Right-handed (Y is Up, -Z is Forward) Left-handed (Z is Up, X is Forward)
Entity Paradigm Tree of Nodes AActor + UActorComponent
Prefabs PackedScenes (.tscn) Blueprint Classes (.uasset)
Scripting GDScript, C#, GDExtension C++, Blueprints
Rendering Forward+ / Mobile / Compatibility Deferred (Default) / Forward
Tonemapper Linear (Default) / ACES ACES (Default) — see Environment
Input System InputMap (Actions & Events) Enhanced Input (IMC / IA) — see Input Mappings & Action Maps(Mainly UE5)