Legend
- β»οΈ Workflow
- π οΈ Tool
- π¦ Asset or Library
- β Guides
- π¨ Pattern
- π₯ Hot Tip
- β Official Guide
- βββ 3D Workflow. 100% DO THIS! DO THIS! βββ
- Other beginner guides
- π₯ Are you a Unity refugee?
- π₯ in Godot everything is a Node or a Scene (a group of Nodes)
- Scene = Scene
- GameObject = Node (or Scene!)
- Component = Node (or Scene!)
- Prefab = Scene
- Prefab instance = Scene instance
- π¨ To start, just have a parent Main Node, and attach your Scenes to it.
- ...and
main.tscn
andmain.gd
- ...and
- π οΈ Convert Unity scenes to Godot scenes
- Experiences: 1 2 3
- β»οΈ Improved theme
- π₯ in Godot everything is a Node or a Scene (a group of Nodes)
- π₯ New stuff in 4!
- π¦ Feature Demos
- π¦ GDQuest Feature Demos
- π₯ Built-in: Depth of Field, AA, GI, AO,
- Demos / Setup - Preview Video
- Motion blur is currently camera only. Issue
- π₯ Using the cross platform godot shaders
- π¦ Godot Shaders
- π¦ More Godot Shaders
- β»οΈ Overview
- π₯ Avoid massive scenes. Split into many scenes!
- π¨ Use Right Click β‘οΈ Save Branch as Scene. Branch will become an instance of the new scene!
- Each scene is a seperate file: will eliminate conflicts.
- "I am working on X scene today"
- π¨ Use the
/actors/
and/skins/
pattern to break up scenes even more.
- π¨ Use Right Click β‘οΈ Save Branch as Scene. Branch will become an instance of the new scene!
- π¨ Use Merge from Scene for complex visual merges. Similar to Unity merge
- π¦ Improved git
- π₯ Avoid massive scenes. Split into many scenes!
- β»οΈ Direct Blender integration (no export!)
- You can just use blender! Alternative: Godot Shader Editor
- π οΈ Effects
- π οΈ Texture generation
- β»οΈ Animation tweens
- π¦ https://github.com/GDQuest/
- π¦ https://github.com/godot-extended-libraries
- β»οΈ https://www.youtube.com/watch?v=Hl0OZj7qszg
- β»οΈ https://godotextra.com/5-addons-for-increased-productivity-in-godot/
- π¦ Awesome Godot
- Topic on Github
- β Core API
- β From Godot 3 to 4
- π¨ Utils
- π¦ Automated Exports
- π¦ Steam API
- π OS App code. Loaded first. Can
execute()
kill()
alert()
- For tool development!
- π¨ Open in web browser
OS.shell_open("https://godotengine.org")
- π SceneTree Manages all Scenes / Nodes. Default main loop.
- π¨
get_tree()
get the SceneTree - β¬οΈ See below! β¬οΈ
- π¨
- π SceneTree Manages all Scenes / Nodes. Default main loop.
- π¨
get_tree()
get the SceneTree - π¨ Change scene
get_tree().change_scene_to_file("res://path/to/scene.tscn")
- π¨
- π Find
- π¨
$
is shorthand forget_node()
$AnimatedSprite2D.play()
is the same asget_node("AnimatedSprite2D").play()
- π₯ Go deep:
$screen_gameplay/hud/score
- β»οΈ Click and drag from outline to code to insert path!
- π¨ Deep paths getting long? Alias (
$"%PauseButton"
) using unique in-scene ID 1:40+
- π₯ Prevent errors with
if $thing: $thing.do_it()
- Loop through all nodes in group
for node in get_tree().get_nodes_in_group('enemy'):
Video
- π¨ Alternative:
get_node("/root/main")
- π¨
- π’ Create
- π¨ Instantiate (... in
main.gd
orscreen_gameplay.gd
.. whatever)@export var enemy_scene: PackedScene = load("res://entity/enemy_purple.tscn")
var enemy = enemy_scene.instantiate()
add_child(enemy)
- π¨ Instantiate (... in
- β Remove
- π¨ Delete node
queue_free()
- π¨ Clear child nodes
for child in get_parent().get_children().kill(child)
- π¨ Delete node
- CharacterBody3D High level player-controlled entity.
move_and_slide()
Engine will smooth out collisions.is_on_floor()
- RigidBody3D High level physics-controlled entity.
- π₯ Layers & Masks save you from writing physics "collision check" code. (Default: all 1 layer)
- Layers: Which layer(s) a node / scene is on.
- Masks: Which layer(s) a node / scene will detect.
- π₯ Add signals to a CollisionShape3D: Make it a child of Area3D (Respond to
body_entered
andarea_entered
!)- Ex:
area_enemy
β‘οΈcollision_shape_3d
- Set
area_enemy
β‘οΈMonitorable
to OFF if you want to only emit signals, not auto-interact with other collision shapes. body_entered
πCharacterBody3D
orRigidBody3D
....area_entered
πArea3D
- Ex:
- Vector3 can
look_at()
and has useful constantsVector3.ZERO
,Vector3.UP
- Nodes have both
position
andglobal_position
- Nodes have both
_physics_process(delta):
and_process(delta):
_physics_process(delta):
runs at 60 fps always._process(delta):
runs as often as possible (framerate).- use the
delta
to move things at a consistent rate in either function.
- Dot Product (compare the angle between two vectors)
- Useful for detecting if 3D character is on top/front/bottom of enemy or platform.
if Vector3.UP.dot(collision.get_normal()) > 0.1: enemy.die()
- Useful for detecting if 3D character is on top/front/bottom of enemy or platform.
- π₯ Will always be overlayed on top of the 3D. Go to "2D view" to preview.
- Build a "screen":
Node3D
β‘οΈControl
β‘οΈLabel
- Threaded resource loading - can load up to ten times faster!
- ResourceLoader
ResourceLoader.load_threaded_request("res://scene.tscn","",true)
var thing = ResourceLoader.load_threaded_get("res://scene.tscn")
- ResourceLoader
- π οΈ Presentations in Godot