Godot
This is a seedling 🌱 planted on Fri Oct 27, 2023
Jump to:

Introduction to Godot

Godot is an open-source 3D and 2D game engine. Official page

Reasons to use Godot

Reasons NOT to use Godot

All of this page is for Godot 4.1+

GDScript recipes

Quick animation by tweening properties

Fading out an enemy sprite:

func hide_enemy():
	var tween = get_tree().create_tween()
	tween.tween_property(enemy_sprite, "self_modulate", Color(1,1,1,0), 0.5)
	await tween.finished
	enemy_sprite.visible = false

Common workflows

Quick n' dirty animated 3D character

Scene node organisation:

Base character scene (character.tscn) scene tree screenshot

Extended player character scene scene tree screenshot

Scripting

All variables here referencing scene nodes are @onready'd

Visuals are updated by getting the movement/velocity direction and using a look_at:

visuals.look_at(direction)

I often have to flip the character model towards negative Z so the look_at works, though there's some optional parameters for the function that might make it work with positive Zs as well.


Backlinks:

  • Indie game development
  • Garden tending manual

  • about · posts · garden · home