Ciro Durán A Live Archive

RootPump Postmortem

RootPump gameplay video, as delivered in Caracas Game Jam 2023

Another Caracas Game Jam done, another game done, another postmortem. I was about to choose PICO-8 again, but I had a sudden realisation and I went with a tool I’ve wanted to use for quite a while: Godot Engine. Godot has become popular in the Global Game Jam as an alternative to the quite notorious Unity and Unreal Engine. It’s an open source project, so that has attracted a particular gamedev audience. RootPump (Global Game Jam entry) was this year’s result, and the experience allowed me to form some opinions on Godot. Source code in GitHub.

To start using Godot you need to download the release in their downloads page, version 3.5 stable is the most recent as of this post. I knew that Godot scripting was written in GDScript, very similar to Python, but it also offered C#. I am well familiarised with C# so I went with Godot’s option that supports it. I had Visual Studio Code already installed, so I added the extensions godot-tools and C# Tools for Godot to aid in my process. During the event, I cloned Godot’s source code repo and this allowed me to navigate its code from my project and answer many questions.

Godot’s official documentation is pretty useful. It contains a programming reference, and it also has articles that help implementing some of the things you have in mind. However, official docs programming reference only includes GDScript. But the C# interface is well documented in code, so it’s just a matter of generating it to have a reference just as good as GDScript’s, and paulloz has had the courtesy to generate this documentation. This was key to understand the engine and the differences with GDScript. I’d like to see this documentation incorporated in the official docs if they keep maintaining this interface.

I conceived RootPump as a rhythm game, in which the roots of a plant grow according to how the player keeps the rhythm of a song. Ideally the gameplay would involve just one button. I decided that I’d draw the graphics with whatever 2D API that Godot gave me (which I didn’t know at the time), and that I wuold also use the interface to play some audio (I did not know it either).

It was a nice surprise to find a system to compose scene which is quite familiar to me: in Godot a scene is a file that contains a tree of nodes Node2D. This way you can get any node from a path string (e.g. “Thing1/Thing2” gets the node called Thing2 which is nested in Thing1). It’s possible to attach a script to a node, and that’s how you write code for that node. That was my development cycle: use the editor only to add some basic nodes, layout UI elements on screen, etc. and then I spent the majority of time writing code in VSCode, coming back to editor to test the changes.

Godot has a nice math library (Math2f) with quite a few gamedev-specific routines, so I spent very little reimplementing functionality I usually need. If you know what to do, everything is at hand. Godot also offers Signals to communicate between nodes (Signals is a popular implementation of the Observable pattern). This is part of Node2D, so it’s very easy to use. However, when I implemented the game I wrote a few things that weren’t Node2D, so I could not use it properly.

Godot’s input system is okay. There is an abstract map of actions, each action is associated with a number of buttons (or keys, or controller action). Then in code you test that action.

Godot also has a plugin system that augments the editor functionality. I only had the chance to try one plugin, git for source versioning. It’s a nice plugin, offering a graphical interface for git, but nothing that TortoiseGit doesn’t offer already.

Another nice surprise was to find a very good audio interface. It’s possible to have several audio channels (Audio Buses, in Godot’s parlance). You can apply several sound effects separately to each audio bus. Godot also includes a section that describes how to synchronise audio with your game which saved me a lot of time. I made the music with Ableton Live, but I really dropped the ball here, I went with the most basic stuff. Once I finished the music, I exported the 3 stems to MP3 separately, and you can hear it simultaneously played. I look forward to explore more audio in Godot.

I finally learned how to make builds of my game. Until then I had just tested stuff in editor. Godot has export templates, one for each platform you can target (Windows, Mac, Web, etc.) This is a separate download that’s initiated from within the editor. I had considered initially to make RootPump for Windows, but I definitely tried building for Web. Sadly, the game gets stuck 3 seconds into the song, probably because of my audio setup. I think you need to be a lot more careful when writing a game for the Web, and it’s worth exploring without the pressure of a game jam. Thanks to Edmundo I also tested the build on Mac: it works fine, except that the build asks permissions to use the microphone. This is apparently hardwired in the current version of Godot.

I definitely did not have enough time to implement the minimum I was expecting to write by the end of the event. I’ve got a tree that grows, a pulse that moves according to certain rhythm, and a mechanism to check whether the player is following the rhythm. However, both mechanisms are not connected. I would have like that the player had a way to control the pulse’s direction, so maybe I’d have needed an analog stick to control the pulse.

At the end, I felt that the limitations were strictly about time, and I feel that the tool worked with me, and not against me. I would probably pick Godot again for a future project.