Godot — Free “Core” AddOn For Gaming

Samuel Asher Rivello
3 min readJul 8, 2024

--

Video

  • Introduction to the Godot Core Add-on Library
  • Overview of the project structure and setup
  • Demonstrating unit testing in Godot

Godot Core Add-on Library

Hello and welcome to this video series on Godot! We’re going to be looking at a core add-on library that I’ve created and released as a plugin. My name is Samuel Asher Rello, and I have over 20 years of game development experience, with the last decade focused mostly on the Unity game engine. I love exploring other engines like Godot, and that’s what we’ll be diving into today.

My mission is to educate and entertain with interactive gaming technology. I’ve shipped titles for various platforms, particularly with Unity. In addition to development, I’ve also done extensive teaching, both online and in person at universities, as well as releasing on-demand courses. While these courses are Unity-focused, many principles carry directly over to Godot, especially those related to architecture and unit testing.

In this series, I will discuss my MVC framework, which I have ported over to the Godot engine, and delve into unit testing within Godot. As I learn and share more about Godot, I will update everything on this Godot portfolio hub, including articles, repos, tips, and all videos on the subject.

Project Structure and Setup

Today, we are looking at the core library available on GitHub. This library provides essential functionality and serves as a foundation for other add-ons, such as a Singleton alternative and a mini MVC framework for Godot. One of the challenges in the Godot community is the lack of built-in dependency management for plugins. Unlike Unity’s package manager system, Godot’s AssetLib does not support dependencies between add-ons efficiently. To address this, I designed the RMC core library to be copied and pasted directly into your project.

To get started, clone the repository from GitHub and import it into Godot. In the project window, enable the plugins for both GDUnit 4 and the RMC core library. This setup allows for further development and functionality on top of these libraries.

The core library includes various utilities and examples to help you get started. For instance, the logger system provides enhanced logging capabilities, allowing you to turn logging on and off on a per-class basis. This approach is more powerful than simple console log statements scattered throughout your project.

Demonstrating Unit Testing in Godot

One of the key components of this core library is its integration with GDUnit for unit testing. Unit tests are essential for ensuring the reliability and scalability of your code. By following test-driven development (TDD) principles, you can create robust and maintainable projects.

After enabling the GDUnit plugin, you can run tests directly from the Godot editor. The plugin scans your project for compatible tests and displays the results in the GDUnit console. This setup allows you to validate that your code works as intended and to catch any issues early in the development process.

For example, the core library includes tests for various utilities, such as file access. Each test makes specific assertions about the expected behavior of the code. If a test fails, it indicates a potential issue that needs to be addressed. This automated testing process provides confidence in your code’s functionality and helps prevent regressions.

Resources

🦜 Contact

📜 Articles

🛜 Downloads

--

--

Samuel Asher Rivello

Game Developer & Instructor - Unity Certified. 20+ years of game dev XP. Available For Remote Hire. http://www.SamuelAsherRivello.com