pixelart
vectors
gdscript
2D
godot 3D
helper methods
global scope
https://docs.godotengine.org/en/stable/classes/class_@globalscope.html#methods
print
randi() % 50
(random number 0-49)printerr
deg_to_rad
(convert degrees to radians)ease
node
get_node
get_children
get_parent
queue_free
print_tree
get_viewport
wayland
To enable Wayland support currently:
- Run Godot on the command line with --display-driver wayland (note that such argument is not passed between instances, e.g. from the project manager to the editor or from the editor to running the game).
- For the editor, enable the run/platforms/linuxbsd/prefer_wayland editor setting (again, this will only affect the editor, not the game).
- For the game, set the display/display_server/driver.linux project setting to wayland.
vim mode
https://github.com/joshnajera/godot-vim
Alternatively, you can just use vim itself with the godot lsp.
lsp
You can use godot as an LSP server for gdscript. It works smoothly with neovim's lsp client and probably most others.
nvim_lsp.gdscript.setup {
on_attach = on_attach,
capabilities = capabilities
}
misc tips
PhysicsBody
- Kinematic: Control movement with our own code.
- Rigid: Control with physics engine.
- Static: Objects that wont be moved (but can be collided with.)