Sugui web

Creating a small puzzle RPG to experiment with godot-rust

These 2-3 last weeks, I have been using what I could of my free time to experiment with godot-rust.

My experience using the library

Using godot-rust has been a nice experience for me, although I got blocked with some things at first. I got blocked on issues like these:

But thankfully, the library is well documented. There is a section about how to start with a blank project, and then you can simply go iterating through there. Then you can catch up with the issues I commented above easily, if you know how to search and read.

Something that works totally different from GDScript or C#, is that nodes don't get a script attached. Instead, in your Rust code, you declare a struct with some annotations and behaviour, and then a completely new node type is created in the Godot editor! This felt a bit weird to me at first, but then I thought it's more or less the same as a node that has a script attached. You write your own nodes with their own behaviour, instead of Godot nodes having scripts attached to extend their behaviour.

Once I got more comfortable with the library, I felt I could do things almost as fast as if I was using GDScript. Having a proper type system to work with feels so nice. With GDScript, I got so disgusted every time I had to use the language.

The game

I wanted to do a small project with the library, so I got inspiration by the game Tower of the Sorcerer. This is a game that at first glance seems like a traditional roguelike. But the difference is that it's all deterministic, and you need to careful use your resources and optimize your HP to get as far as you can in your adventure!

This is a really simplified version of the game, with less things to have in account, and a single floor. Your objective is to kill the devil... and make a soup with them 🤭. No, really, this last part is just funny because for the assets pack that I used for the sprites, it happened to be a character that looks so similar to Marcille, from Dungeon Meshi, so I used it for the game.

I warn you that the game is really difficult! The steps I took to do a good level design were basically, place things a bit randomly (at my own criteria), and then balance:

And just iterating like this is how I get a more-or-less balanced experience! But I made it difficult enough so I think there is only one way to beat it. If I get inspired I could do another post with the solution, for those who want to play the game but can't beat it.

The link to the game is here, is only playable in browser!