Legend
- β»οΈ Workflow
- π οΈ Tool
- π¦ Asset or Library
- β Guides
- π¨ Pattern
- π₯ Hot Tip
- β Official Docs
- π₯ Are you a Unity refugee?
- β Unity3D to Godot Experience
- π₯ in Godot everything is a Scene or Node (Scene = a group of Nodes)
- π Scene = π€ Scene
- π GameObject = π€ Scene
- π Component = π€ Node
- π Prefab = π€ Scene
- π Prefab instance = π€ Scene instance
- π Resource = π€ Resource (raw asset: 3d model, image, sound ...)
- π¨ To start, just have a parent Main Node, and attach your Scenes to it.
- ...and
main.tscnandmain.gd
- ...and
- π₯ 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!
- π¨
$"%PauseButton"using unique names 1:40+- Awesome if paths are getting too long.
- π₯ 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 onready var _run_button := $Thing/Container/RunButton as Buttononready var _run_button := find_node('RunButton')
- π¨ Alternative:
get_node("/root/main") - π¨ Alternative:
find_node("/root/main") - π¨ Alternative:
onready var _run_button := $Thing/Container/RunButton as Button - π¨ Alternative:
onready var _run_button := find_node('RunButton') %can be used if "unique name" is turned on in the navigator. It's a cachedfind_node()
- π¨
- π’ Create
- π¨ Instantiate (... in
main.gdorscreen_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_enteredandarea_entered!)- Ex:
area_enemyβ‘οΈcollision_shape_3d - Set
area_enemyβ‘οΈMonitorableto OFF if you want to only emit signals, not auto-interact with other collision shapes. body_enteredπCharacterBody3DorRigidBody3D....area_enteredπArea3D
- Ex:
- Vector3 can
look_at()and has useful constantsVector3.ZERO,Vector3.UP - Nodes have both
positionandglobal_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
deltato 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
