Opens an external site in a new window
Pride Month Hold my hand 🫱🏾‍🫲🏼
RODNEY LAB
  • Home
  • Plus +
  • Newsletter
  • Links
  • Profile
RODNEY LAB
  • Home
  • Plus +
  • Newsletter
  • Links

Trying Godot 4: Free & Open‑source Video GameDev 🕹️ # Trying Godot 4: Free & Open-source Video GameDev 🕹️ #

blurry low resolution placeholder image Trying Godot 4
  1. Home Rodney Lab Home
  2. Blog Posts Rodney Lab Blog Posts
  3. Gaming Gaming Blog Posts
<PREVIOUS POST
NEXT POST >
LATEST POST >>

Trying Godot 4: Free & Open‑source Video GameDev 🕹️ #

Published: 2 years ago
6 minute read
Gunning Fog Index: 7.5
Content by Rodney
blurry low resolution placeholder image Author Image: Rodney from Rodney Lab
SHARE:

🤖 Trying Godot 4 #

I have been hearing a lot of good things about Godot for game development, and thought it would be a good time to try it out and write a post on trying Godot 4. Godot is a full-featured game engine like Unity or Unreal. The biggest difference it that it is free and open-source software (FOSS). You need to look no further than the 3D modelling and editing Blender toolset to see how community driven development creates software on a par with proprietary alternatives.

FOSS advancements can track user needs. Studios adopting Godot, instead of building and maintaining their own in-house engine, leverage on community contributions. Further, they provide Godot improvements, useful for their own games, and then share those improvements back to the community.

There are already successful Godot games available on Steam, such as Brotato , Ex-Zodiac  (in early access at time of writing), and Halls of Torment .

EX-ZODIAC Early Access Launch

In the rest of this post, we take a closer look at why you might choose Godot and also see some video and website resources for starting out with Godot.

🤔 Why Godot? #

In short:

  • Godot has batteries included; it is a full-featured and intuitive game engine helping you churn out your game quicker,
  • it is FOSS, so you do not have to pay to use Godot or pay royalties on games you create with it; and
  • it is popular - it keeps improving with community contributions, and you can find quality learning resources.

My first impression was that Godot is lightweight. I loved that you could download, install and start coding far quicker than other engines which have gigantic downloads. Despite that, Godot is still powerful. Not only is Godot powerful, but the user interface, is snappy and intuitive.

Finally, here, I would say the flexibility in code language for the game logic is another strength. The easiest way to code, is to use GDScript, which looks like Python. However, if you need performance, you can use GDExtension which lets you code in C, C++ or, thanks to a donation from Microsoft , C#. Language support does not end there though; community projects also add support for Rust, Swift, Zig and Go as well as other languages .

🏅 Official Godot Getting Started Guide #

The official tutorial is well-written and provides a direct route for getting you up-to-speed on the Godot engine. If you want to get a feel for Godot before diving in though, first try the Brackeys How to make a Video Game video tutorial (mentioned further down). You can then loop back and learn more fundamentals once you have a better idea of whether it is something that will suit you.

blurry low resolution placeholder image Trying Godot 4: Screen capture shows a game window with a grey background.  Towards the bottom left is a the Godot icon (a pixelated robot head in blue).  The icon is tilted to you one side.
Trying Godot 4: Initial, Instancing Tutorial
  • The official guide starts with an Introduction , giving you an overview of Godot’s capabilities.
  • You then jump onto some Godot concepts , before moving onto the Instancing Tutorial, which provides a first look at Godot Code.
  • The guide wraps up with creating a 2D  and then, 3D Godot game , before you are let loose to build that game idea you have had running through your mind for months!

🏞️ Godot Design: Scenes, Nodes and Signals #

blurry low resolution placeholder image Trying Godot 4: a 2D platform style game view with a blue background in three bands, becoming deeper blue as you descend. The foreground features brown and grey stone platforms.  The player character has a knight sprite, and you can see coins, a bottle, a tree, and a rope bridge.  Text to left and centre of the view reads "Space to jump".
Trying Godot 4: Godot Engine Scene Composition

Godot promotes an Object-oriented Programming (OOP) approach to games architecture, which contrasts to the Entity Component System (ECS) used by Bevy, for example.

Godot Scenes are game elements, such as collectable coins, a moving platform or even a player.

Scenes might be composed of multiple Godot built-in Nodes. Nodes are OOP objects providing some logic or behaviour. For example, the collectable coin scenes have:

  • a 2D collider node (used to detect that the player character has walked into the coin),
  • an AudioStreamPlayer node to play a sound effect when the coin is picked up; and
  • one each of an AnimationSprite and AnimationPlayer node.

Scenes are combined into a Scene Trees: the game scene includes collectable coin and player scenes in its scene tree.

Signals: Communicating between Remote Scenes #

Signals provide a convenient interface communicating between scenes at different levels of the game. There are built-in signals, triggered when a button is pressed, but you can also create your own. For example, you could create a lava scene with an on_body_entered signal, emitted when the player falls into the lava. Now, the score readout, life count and other independent components just need to listen for that signal to update themselves. No need to poll on every game tick to check if they need to update.

🧩 Composition is Still Possible #

ECS designs favour composition over inheritance, making certain common relationships easier to code. Godot allows for composition, adding custom components to a class. This is a little beyond the scope of this post, though the How You Can Easily Make Your Code Simpler in Godot 4 video provides an excellent explanation with great examples .

🖥️ Coding your Godot Game #

I mentioned above, that GDScript is a good choice if you want to get going quickly and other languages, available via GDExtension can provide more performant alternatives where that is most important.

Trying Godot 4: GDScript #

GDScript looks a lot like Python. In fact, earlier versions of Godot supported coding in Python, though Python was replaced by GDScript to address Python for game development shortcomings. GDScript is quite intuitive and supports static types. Here is an example, in case you are curious to see some code:

    
1 extends Node2D
2
3 const SPEED := 60
4
5 var direction: int = 1
6
7 @onready var ray_cast_right = $RayCastRight
8 @onready var ray_cast_left = $RayCastLeft
9
10
11 # Called every frame. 'delta' is the elapsed time since the previous frame.
12 func _process(delta):
13 if ray_cast_right.is_colliding():
14 direction = -1
15 if ray_cast_left.is_colliding():
16 direction = 1
17 position.x += direction * SPEED * delta

This code moves a monster back and forth between two walls. Here:

  • _process is the in-built function run on every frame for our scene. Engine function names begin with an underscore.
  • const SPEED := 60 creates the constant property, inferring its type to be integer from the value provided. The typing is optional, and the statement could be written const SPEED = 60 for dynamic typing.
  • var direction: int = 1 uses an explicit static type. Godot would throw up an error if we later tried to assign a string, for example, to direction.
  • Learning GDScript #

The Brackeys have a broad-strokes overview of GDScript, in a one-hour video . This is a different video to the Godot introduction from the same creator, mentioned further down. Some, older, content on YouTube covers GDScript for Godot 3. Godot 4 was released over a year ago now, and is stable, so you will probably want to focus on Godot 4 for any new games you create.

Trying Godot 4: GDExtension for Rust, Swift, C++, C#, Zig and more… #

When you need performance, GDExtension will probably be your best bet. GDExtension lets you compile a shared library using third-party C bindings. Shared libraries are compiled independently of the game, but still can be called from your game code. Because GDExtension creates shared libraries, you can use the same library in different games, or distribute it, without having to compile with the engine’s source code.

You target a particular Godot engine version when you write GDExtension. If you target 4.2 (latest version at time of writing), you get to use the latest Godot features and your code will be compatible with future Godot Engine versions. That said, your Godot 4.2 targeted GDExtension library might not work with Godot Engine 4.1 and earlier versions.

Watch the 6 Programming Languages in 1 Godot Game! Trying out GDExtension!  video to get a better fell for how this works.

GDExtension Tutorials #

For tutorials see:

  • Godot’s official Godot C++ GDExtension tutorial ;
  • the godot-rust book , which takes you through setting up your first Rust GDExtension game; or
  • the SwiftGodot tutorial .

📼 Free Video Tutorials #

blurry low resolution placeholder image Trying Godot 4: Screen capture shows game being edited in Godot Engine.  A panel on the left shows the Godot scene tree with a root Game node and child GameManager, TileMap, Player nodes.  Right of that, occupying most of the screen is a 2D platform style game view with a blue background in three bands, becoming deeper blue as you descend. The foreground features stone platforms, trees and coins.
Trying Godot 4: 2D Platform Game Tutorial

Here are some free tutorials you can access on YouTube to get going with Godot. The first two, shorter ones assume a little previous programming knowledge.

  • The Brackeys (known for Unity content) have recently started putting out Godot 4 content. Create a 2D platform game in the How to make a Video Game - Godot Beginner Tutorial . Around 80 minutes.
  • Create a rogue-like shoot-em-up in the same vein as Brotato and Halls of Torrent in the Your First 2D GAME From Zero with GODOT 4!  video from GDQuest. Just over two hours.
  • Build a 3D Godot 4 Platformer in the 3D for coding beginners  series. Creator has a background in eduction and targets all levels including coding novices. 11 videos, 5 hours in total.

If plan to work offline, remember to check the video descriptions for game asset downloads needed to complete the tutorials.

🗳 Poll #

Which full-featured Game Engine do you most want to use next?
Voting reveals latest results.

🏁 Where Next? #

If you are looking for a roadmap for getting going on Godot my two cents it to try these steps in this order:

  1. the Brackeys How to make a Video Game - Godot Beginner Tutorial video, for an overview of Godot building your own game in under two hours without having to get too concerned with the details;
  2. the official Godot tutorial to learn some fundamentals in more detail; and
  3. the Brackeys GDScript tutorial.
  4. Please enable JavaScript to watch the video 📼

    Trying Godot 4: 2D Platform Game I built in Brackeys Tutorial

    From there, you can explore a path taking in Godot aspects best suited for the game you want to work on, including the other resources listed above.

    🙌🏽 Trying Godot 4: Wrapping Up #

    In this trying Godot 4 post, we took a look through some resources for getting started with Godot. In particular, I talked about:

    • why you might choose Godot;
    • Godot options for coding language, including GDScript, C++, C#, Rust and Swift; and
    • some Godot 4 tutorials.

    I hope you found this useful. I would love to hear from you, if you are also new to Godot video game development. Were there other resources you found useful? Also, let me know what kind of game you are working on!

    🙏🏽 Trying Godot 4: Feedback #

    If you have found this post useful, see links below for further related content on this site. Let me know if there are any ways I can improve on it. I hope you will use the code or starter in your own projects. Be sure to share your work on X, giving me a mention, so I can see what you did. Finally, be sure to let me know ideas for other short videos you would like to see. Read on to find ways to get in touch, further below. If you have found this post useful, even though you can only afford even a tiny contribution, please consider supporting me through Buy me a Coffee.

    blurry low resolution placeholder image ask Rodney X (formerly Twitter) avatar

    Rodney

    @askRodney

    Just dropped a new post on getting started with Godot 4 and GDScript.

    Includes tutorials, Godot games, why consider Godot and how to learn about using GDExtension to bring C, C++, Rust, Swift or other languages to your game.

    Hope you find it useful!

    https://t.co/HzoeB3338z

    — Rodney (@askRodney) June 26, 2024

    Finally, feel free to share the post on your social media accounts for all your followers who will find it useful. As well as leaving a comment below, you can get in touch via @askRodney on X (previously Twitter) and also, join the #rodney  Element Matrix room. Also, see further ways to get in touch with Rodney Lab. I post regularly on Game Dev as well as Rust and C++ (among other topics). Also, subscribe to the newsletter to keep up-to-date with our latest projects.

Thanks for reading this post. I hope you found it valuable. Please get in touch with your feedback and suggestions for posts you would like to see. Read more about me …

blurry low resolution placeholder image Rodney from Rodney Lab
TAGS:
RUSTC++GAMING

Reposts:

Reposts

  • Dylan </closingtags.com> profile avatar
Reposts provided by Mastodon & X via Webmentions.

Related Posts

blurry low resolution placeholder image Godot Rust CI: Handy GDScript & Rust GitHub Actions 🎬

Godot Rust CI: Handy GDScript & Rust GitHub Actions 🎬

rust
gaming
<PREVIOUS POST
NEXT POST >
LATEST POST >>

Leave a comment …

Your information will be handled in line with our Privacy Policy .

Ask for more

1 Nov 2022 — Astro Server-Side Rendering: Edge Search Site
3 Oct 2022 — Svelte eCommerce Site: SvelteKit Snipcart Storefront
1 Sept 2022 — Get Started with SvelteKit Headless WordPress

Copyright © 2020 – 2025 Rodney Johnson. All Rights Reserved. Please read important copyright and intellectual property information.

  • Home
  • Profile
  • Plus +
  • Newsletter
  • Contact
  • Links
  • Terms of Use
  • Privacy Policy
We use cookies  to enhance visitors’ experience. Please click the “Options” button to make your choice.  Learn more here.