My avatar. Arnaught A pride flag.

Making a Game in Godot - Day 1

November 16, 2023 | Tags: programming gamedev godot


I make games sometimes. You can see some of the games I’ve made on my Itch profile. Mainly, I use Pico8 and Unity. Pico8 is really fun to use, and I particularly like it for participating in LOWREZJAM (I’ve done so twice so far), but Unity makes it pretty easy to create more complex things pretty quickly. With the Unity pricing change earlier this year, I figured that I might as well learn Godot.

(There’s also another reason. The last time I used Unity was for Linux Game Jam 2023 back in June. (Here’s the game and the devlogs). I got a late start, and on the second to last day I ended up breaking my Unity setup somehow. I had to compile the game on someone else’s computer. I never ended up figuring out what broke.)

This isn’t for a game jam but I’m going to plan out my goals are and post them in these devlogs, as well as cataloging things I’ve learned and problems I’ve faced. There’s not going to be a deadline on this, and I’m definitely not going to post a devlog every day.

My Plan #

The project I’ve decided to work on is a Suika Game clone. (I sure do love making clones of games!) Suika Game (or Watermelon Game) is a falling block (ball?) puzzle game where you drop fruits and merge them into larger fruits.

What I want to include in this project:

I watched a stream of some Suika Game clones recently, and some of them had some interesting mechanics. Suika Shapes has different shapes, and a mode called Speed Suika which lets you charge up to drop your shapes faster. Cosmic Collapse is a space themed Suika clone that has a missile powerup which lets you destroy a shape. (Cosmic Collapse is also made in Pico8, which is very impressive!) I’m thinking about adding some powerups to my version, and both of those would be interesting to have.

What I Have So Far #

Making the main mechanic is pretty simple. The physics engine does most of the work. The fruit is just a RigidBody2D and the box is a StaticBody2D. When the mouse is clicked, a fruit is dropped into the box. When two fruits of the same size collide, both fruits are destroyed, and a new larger fruit is spawned in their place.

Signals are really nice. They make it a lot easier to push data upwards in the tree. When the fruit collide, a signal is sent to the top level to handle spawning in the new fruit.

Rigidbodies really don’t like to be moved manually. I had the fruit following the mouse, but I kept running into an issue where fruit would jump to the right after dropping (sometimes missing the box entirely). I ended up having a separate indicator for where the fruit is dropped from. When the mouse is clicked a new fruit is spawned where the indicator is, and the indicator is made invisible.

The next things I’m planning to work on are:

A Couple More Thoughts on Godot #

The Godot editor is a lot more lightweight and faster to load than the Unity editor. It was also fairly easier to install, with it being in both the Fedora repos and Flathub. I’m using the Flatpak version for now.

Editing the scripts in Godot is nice. It has some code completion, but no hover in the editor. You can get code completion and hover working with VS Code pretty easily. With the godot-tools VS Code plugin, you can use Godot’s language server in VS Code. For some reason, the Godot editor has the language server running on port 6005 but godot-tools looks on port 6008, so it wasn’t working until I changed one of them. (I’m glad I figured this out, because I was missing my vim bindings). Godot by default doesn’t reload scripts that were edited externally, instead prompting you if you want to reload. There’s an option in the editor to change this to automatically reload.