Overview
While I largely work in embedded Linux systems, I like to dabble in game development when I have free time. In the wake of the Unity licensing change, there has been buzz about Godot, so I decided to check it out.
I have done a number of small projects with Unity, so I'll make comparisons relative to that.
Getting Started
Godot is portable and has no standard installer. I downloaded from https://godotengine.org/ and extracted to folder of my choice.
I started with Godot 4.2.1.
Initial learning from examples was slightly difficult due to breaking changes in Godot 4.
Starting from recent YouTube tutorials is the best bet.
Initial Tests
While proficient in C#, I decided to also try Godot Script.
2D Top-down Pixel-based
The first test was a standard 4-direction top-down 2D RPG / Zelta-style game.
Overview
Within the first day, I was able to:
import pre-made pixel-based assets and configure animations and animation trees.
create a character and follow camera
generate a multi-layer tilemap and set the z-order for enabling walking under or behind items.
Setup collisions along with tile-based collision properties.
Setup an NPC that wanders around the screen
Take-aways
The Tilemap and collision configuration feels right in Godot. I'm assuming that it was built-in from the start, while Unity was largely 3rd party components providing some level of support.
The "TileMap" tool is used for painting tiles onto the tilemap. It has numerous options for making the process quick and easy.
The "TileSet" tool allows configuration of tile properties. (e.g.
Paint > Physics Layer 0
to set collision areas. Painting 3 tile tall trees on the map border was a little challenging at first though, but I appreciated the default display transparency when on a specific layer.
I loved the easy means of setting collision boundary for specific tiles.
It's somewhat unrelated, but I wasn't familiar with itch.io. I ended up buying some assets from https://limezu.itch.io/. The price was hard to pass up for the "Modern" series.
More to come
I have barely scratched the surface, but feel like the fundamentals came more quickly than Unity.
I cannot share this project directly since I used 3rd party assets... perhaps I'll reduce / substitute assets with the same names in the future and provide instructions on what to pull in.
3D 3rd Person RPG-Style
Similarly, this test was the basics of a 3rd person RPG-style game with follow-cam.
Overview
First, the majority of the assets are free from https://kaylousberg.itch.io/. These are pretty high-quality assets for prototyping, complete with animations.
Largely, I followed YouTube videos and adapted slightly to fit my needs, accomplishing the following within a few days.
Idle, Walk, Run, Jump and Shoot animation tree
Camera Controller which allows move with W,A,S,D and follow cam with swivel via mouse input with natural feel.
Basic controls - run and jump
Basic test level with 3rd party assets and collision detection
Basic grappling hook... got stuck trying to draw the grapple line and the feel is wrong.
Take-Aways
Similar to 2D, it was pretty quick to pull together the basics for an interactive 3D environment.
I like the use of scenes for objects, but still get a bit lost in object organization and associated scripts. To me, it still feels a little more natural than prefab process and deeper hierarchies of Unity.
The available amount of free assets are outstanding.
I built the map as a separate scene object, keeping the top-level project simple.
TODO: imported assets and changes... the proper method?
More to Come
I have barely scratched the surface, but feel like the fundamentals came more quickly than Unity.
I cannot share this project directly since I used 3rd party assets... perhaps I'll reduce / substitute assets with the same names in the future and provide instructions on what to pull in.
I plan to work through more basic functionality and update the notes here as I go through. Following that, perhaps some end-to-end simple games.
Godot 3.x Example - Grapple
I was interested in the following example on YouTube: https://www.youtube.com/watch?v=jMTNsSjk4xI
Godot has a 3.x to 4 conversion built in. While it isn't perfect, it is helpful.
It mostly converted well; I made the following changes to get it to run.
# Since we want better collisions, we have to do a lil work
func collide_with_rigidbodies() -> void:
for index in get_slide_collision_count():
var collision := get_slide_collision(index)
if collision:
var collider = collision.get_collider()
if collider and collider is RigidBody3D:
collider.apply_central_impulse(
-collision.get_normal() * .05 * velocity.length()
)