HubbleCommand.github.io

Personal blog, project documentation, and ramblings

Godot - Resources


tags: gamedev - godot

General practices

Return early in your functions to avoid needlessly nested code.

Long functions and code duplications should be extracted into other functions.

Node Overview

General design

Generally, use composition. This is even according to the official documentation!

Godot specific

Blurry sprites / textures

Fix blurry Sprites: use Nearest filtering mode (can set in Project -> Render -> Textures or on each node individually).

Depending on the hierarchy of your scene tree (i.e. nested viewports), you may need to set it to instanced nodes in your scene. Try to do this at the highet level possible.

Character controller-esque

State Machines

Design patterns are, in general, the more powerful tools in a SE’s toolbelt. This is because they solve common issues in easy and maintainable ways.

In game development, there’s a few you should know; State Machines, Decorator, Strategy. State machines in particular are very useful, and should be your go-to pattern.

Godot 3.2 documentation on the State Design Pattern

GDQuest tutorial on the pattern

Remote Android Debugging

To turn on Android debugging with logging, go to Debug -> Depploy with Remote Debug. See this video for more.

Theming

Theming is Godot’s system for doing UI skinning and standardizing your UI easily.

Official documentation

Some themes you can get and tesk

Scriptable Objects with Resources

Brackeys recently returned after quitting to start making Godot tutorial content.

Godot Resources documentation / tutorial

Good post on Resources best practices

Ironically, the first tip in this video is somewhat bad practice, and could be fixed with resources.

Inventory-like

Procedural Animation

Pixellation

Metadata

Many engines have a system of metadata.

However, it does appear a bit more powerful in Godot, as you can see here. Do note that this feels very much like a Godot-specific thing, and even then I don’t recommend using it this way. Using things like Groups is still, generally, better, especially when trying to query.

Shaders

Before working with shaders, you need to know more about matrices, or how the GPU actually draws to your screen.

The Transformation Matrix for 2D Games

Sample shader assets: GDQUest Shaders 2D Sprite Shaders Demo Post Process Ultimate Retro Shader Collection Grid Shader Tutorial Godot Retro CD ROM shader

Having fun learning about shaders!
byu/onsclom ingodot
I made a rolling log vertex displacement shader in Godot, a-la Animal Crossing! Link to source code in comments.
byu/lynndotpy ingodot

Compute shader

Variable rate shading (NVIDIA feature that changes the rate shading is calculated in different regions of the scene to increase performance)

Shader stuff for refraction

Motion Extraction

Light2D

Light doesn’t work the same at all as in 3D. See the paragraph after this image.

A quick video overview can be found here.

A custom lighting solution ca be found here, although it appears similar to the way the built-in system works.

Moddability

Generally a complex subject

Godot resource packs

ModIO Steam Workshop

However, something I recently found is that GDScript can be evaluated dynamically!!! Check this issue.

Play Services

Video overview here. Asset

Multiplayer

A good overview can be found here

W4 is a company that aims to improve the Godot ecosystem. Their two first major projects were integrating Console support, and multiplayer.

Hot update

https://www.reddit.com/r/godot/comments/1fhcsw3/tutorial_how_to_implement_a_hot_update_mechanism/