{"id":679,"date":"2025-12-08T08:46:52","date_gmt":"2025-12-08T08:46:52","guid":{"rendered":"https:\/\/blog.lerk.ing\/?page_id=679"},"modified":"2025-12-08T19:06:07","modified_gmt":"2025-12-08T19:06:07","slug":"godot-core-nodes","status":"publish","type":"page","link":"https:\/\/blog.lerk.ing\/index.php\/codingpirates\/godot-game-engine\/godot-core-nodes\/","title":{"rendered":"Godot nodes"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">I will here, give an overview of the core nodes in Godot and how and when to use them.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Core Nodes<\/strong>\n<ul class=\"wp-block-list\">\n<li><strong>Node<\/strong> - This is used for non-visual data (game manager, inventory system, music manager, load\/save system etc.)<\/li>\n\n\n\n<li><strong>Node2D<\/strong> - Used for a 2D object, that should be rendered on screen (position, rotation, scale etc.)<\/li>\n\n\n\n<li><strong>Node3D<\/strong> - Used when you need a 3D object rendered (position, rotation, scale etc.)<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>2D Visual Nodes<\/strong>\n<ul class=\"wp-block-list\">\n<li><strong>Sprite2D<\/strong> - Use this for displaying a single static 2D texture (player graphics, pickup icon, enemy graphic etc.)<\/li>\n\n\n\n<li><strong>TileMap<\/strong> - Used when you do a tile based game i.e. a 2D platformer.<\/li>\n\n\n\n<li><strong>ParallaxBackground \/ ParallaxLayer<\/strong> - Used for multi layered scrolling background graphics.<\/li>\n\n\n\n<li><strong>CanvasGroup<\/strong> - Used for grouping (opacity, fading nodes together etc.)<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>2D Physics Nodes<\/strong>\n<ul class=\"wp-block-list\">\n<li><strong>CollisionShape2D \/ CollisionPolygon2D<\/strong> - Use to define collision for any 2D physics body.<\/li>\n\n\n\n<li><strong>Area2D<\/strong> - Use for detecting overlap, entering\/leaving zones (Pickup triggers, damage areas, detecting zones etc.)<\/li>\n\n\n\n<li><strong>StaticBody2D<\/strong> - Use for solid walls, ground, immovable objects.<\/li>\n\n\n\n<li><strong>RigidBody2D<\/strong> - Use with objects affected by real physics simulation (Falling crates, rolling rocks etc.)<\/li>\n\n\n\n<li><strong>CharacterBody2D<\/strong> - Use with player or AI characters with <strong>kinematic movement<\/strong>. Supports move_and_slide() style movement.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>3D Visual Nodes<\/strong>\n<ul class=\"wp-block-list\">\n<li><strong>MeshInstance3D<\/strong> - Use when: Displaying a 3D mesh\/model.<\/li>\n\n\n\n<li><strong>MultiMeshInstance3D<\/strong> - Use when: Rendering <strong>many<\/strong> identical objects efficiently (e.g., trees, bullets).<\/li>\n\n\n\n<li><strong>Camera3D<\/strong> - Use when: You need a 3D camera.<\/li>\n\n\n\n<li><strong>AnimationPlayer \/ AnimationTree<\/strong> - Use when: Creating cutscenes, model animations, blend trees.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>3D PHYSICS NODES<\/strong>\n<ul class=\"wp-block-list\">\n<li><strong>CollisionShape3D \/ CollisionMesh<\/strong> - Defines collisions.<\/li>\n\n\n\n<li><strong>Area3D<\/strong> - Trigger zones, detection spheres.<\/li>\n\n\n\n<li><strong>StaticBody3D<\/strong> - Immovable walls, floors.<\/li>\n\n\n\n<li><strong>RigidBody3D<\/strong> - Real physics simulation objects.<\/li>\n\n\n\n<li><strong>CharacterBody3D<\/strong> - 3D counterpart to CharacterBody2D.<br>Perfect for 3D player and enemies.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>UI (Control) NODES<\/strong> - Everything UI-related inherits from <strong>Control<\/strong>.\n<ul class=\"wp-block-list\">\n<li><strong>Control (base class)<\/strong> - Use when: Making any UI element.<\/li>\n\n\n\n<li><strong>Button \/ TextureButton<\/strong> - Clickable UI elements.<\/li>\n\n\n\n<li><strong>Label<\/strong> - Text display.<\/li>\n\n\n\n<li><strong>LineEdit \/ TextEdit<\/strong> - Single-line or multi-line text input.<\/li>\n\n\n\n<li><strong>Panel \/ NinePatchRect<\/strong> - Box backgrounds and panels.<\/li>\n\n\n\n<li><strong>MarginContainer \/ HBoxContainer \/ VBoxContainer \/ GridContainer<\/strong> - Use when: You want responsive layout without manual positioning.<\/li>\n\n\n\n<li><strong>ScrollContainer<\/strong> - Scrollable content.<\/li>\n\n\n\n<li><strong>CanvasLayer<\/strong> - Use for <strong>HUDs<\/strong> and UI that must stay fixed to the screen.<\/li>\n\n\n\n<li><strong>Window<\/strong> - Popup windows, dialogs, draggable panels.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>AUDIO NODES<\/strong>\n<ul class=\"wp-block-list\">\n<li><strong>AudioStreamPlayer<\/strong> - 2D or UI-sound playback.<\/li>\n\n\n\n<li><strong>AudioStreamPlayer2D<\/strong> - Positional audio in 2D.<\/li>\n\n\n\n<li><strong>AudioStreamPlayer3D<\/strong> - Positional audio in 3D.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>UTILITY &amp; LOGIC NODES<\/strong>\n<ul class=\"wp-block-list\">\n<li><strong>Timer<\/strong> - Use when you need repeated or delayed actions (cooldowns, spawn intervals, animation delays etc.)<\/li>\n\n\n\n<li><strong>AnimationPlayer<\/strong> - Animate properties, movement, UI, sprites.<\/li>\n\n\n\n<li><strong>Tween<\/strong> (SceneTreeTween) - Use for smooth property transitions (movement, fade, scale).<\/li>\n\n\n\n<li><strong>HTTPRequest<\/strong> - For online APIs, downloads, uploading.<\/li>\n\n\n\n<li><strong>NavigationRegion2D \/ NavigationAgent2D<\/strong> - 2D pathfinding.<\/li>\n\n\n\n<li><strong>NavigationRegion3D \/ NavigationAgent3D<\/strong> - 3D pathfinding.<\/li>\n\n\n\n<li><strong>Particles2D \/ GPUParticles2D<\/strong> - Fire, smoke, snow, sparks in 2D.<\/li>\n\n\n\n<li><strong>GPUParticles3D<\/strong> - Same in 3D.<\/li>\n\n\n\n<li><strong>RayCast2D \/ RayCast3D<\/strong> - Line-based detection: visibility, bullets, ground checking.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>WORKFLOW NODES<\/strong>\n<ul class=\"wp-block-list\">\n<li><strong>SceneTree<\/strong> - Not a node you place, but: Use to change scenes, access globals, pause game, find nodes.<\/li>\n\n\n\n<li><strong>Marker2D \/ Marker3D<\/strong> - Invisible transform markers. Use for spawn points, path markers, waypoints.<\/li>\n\n\n\n<li><strong>Path2D \/ PathFollow2D<\/strong> - Moving enemies along curves (enemy paths etc.)<\/li>\n\n\n\n<li><strong>Path3D \/ PathFollow3D<\/strong> - Same in 3D.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Which nodes you should ALWAYS know<\/strong> (the top 20)<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">If you know these, you can make almost any game:<\/p>\n\n\n\n<p class=\"has-large-font-size wp-block-paragraph\"><strong>2D Game Essentials<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u00bb <strong>Node2D<\/strong> - 2D objects.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u00bb <strong>Sprite2D \/ AnimatedSprite2D<\/strong> - 2D textures.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u00bb <strong>CharacterBody2D<\/strong> - move_and_slide() style movement.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u00bb <strong>CollisionShape2D<\/strong> - Define collision.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u00bb <strong>Area2D<\/strong> - Overlap detection.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u00bb <strong>Timer<\/strong> - Intervals and delays.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u00bb <strong>AnimationPlayer<\/strong> - Animation.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u00bb <strong>RayCast2D<\/strong> - Line-based detection.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u00bb <strong>TileMap<\/strong> - Tile based games.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u00bb <strong>Camera2D<\/strong> - Camera.<\/p>\n\n\n\n<p class=\"has-large-font-size wp-block-paragraph\"><strong>UI Essentials<\/strong><\/p>\n\n\n\n<div class=\"wp-block-group is-vertical is-layout-flex wp-container-core-group-is-layout-831b2db5 wp-block-group-is-layout-flex\">\n<p class=\"wp-block-paragraph\">\u00bb <strong>Control<\/strong> - UI elements.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u00bb <strong>Button<\/strong> - UI button.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u00bb <strong>Label<\/strong> - UI label.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u00bb <strong>HBoxContainer \/ VBoxContainer<\/strong>. Horizontal\/vertical UI containers (groups)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u00bb <strong>Panel<\/strong> - UI panels.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u00bb <strong>CanvasLayer<\/strong> - HUD.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u00bb <strong>TextureRect<\/strong> - UI texture.<\/p>\n<\/div>\n\n\n\n<p class=\"has-large-font-size wp-block-paragraph\"><strong>Logic Essentials<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u00bb <strong>Node<\/strong> - Non visible systems.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u00bb <strong>Tween<\/strong> - Smooth transitions.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u00bb <strong>AudioStreamPlayer<\/strong> - Sound.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u00bb <strong>SceneTree<\/strong> - Change scenes etc.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n<div class=\"wp-block-post-author\"><div class=\"wp-block-post-author__avatar\"><img alt='' src='https:\/\/secure.gravatar.com\/avatar\/ea6dfb9dc4a5852f1a3635e4cb2c81deba1b9e5a2fec2c492f0abd9df8882821?s=48&#038;d=mm&#038;r=g' srcset='https:\/\/secure.gravatar.com\/avatar\/ea6dfb9dc4a5852f1a3635e4cb2c81deba1b9e5a2fec2c492f0abd9df8882821?s=96&#038;d=mm&#038;r=g 2x' class='avatar avatar-48 photo' height='48' width='48' \/><\/div><div class=\"wp-block-post-author__content\"><p class=\"wp-block-post-author__name\">Jan Lerking<\/p><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>I will here, give an overview of the core nodes in Godot and how and when to use them. Which nodes you should ALWAYS know (the top 20) If you know these, you can make almost any game: 2D Game Essentials \u00bb Node2D &#8211; 2D objects. \u00bb Sprite2D \/ AnimatedSprite2D &#8211; 2D textures. \u00bb CharacterBody2D [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":675,"menu_order":2,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-679","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/blog.lerk.ing\/index.php\/wp-json\/wp\/v2\/pages\/679","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.lerk.ing\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/blog.lerk.ing\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/blog.lerk.ing\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.lerk.ing\/index.php\/wp-json\/wp\/v2\/comments?post=679"}],"version-history":[{"count":17,"href":"https:\/\/blog.lerk.ing\/index.php\/wp-json\/wp\/v2\/pages\/679\/revisions"}],"predecessor-version":[{"id":711,"href":"https:\/\/blog.lerk.ing\/index.php\/wp-json\/wp\/v2\/pages\/679\/revisions\/711"}],"up":[{"embeddable":true,"href":"https:\/\/blog.lerk.ing\/index.php\/wp-json\/wp\/v2\/pages\/675"}],"wp:attachment":[{"href":"https:\/\/blog.lerk.ing\/index.php\/wp-json\/wp\/v2\/media?parent=679"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}