Something wicked this way comes.
What could it be? Why, a Greg RPG devlog, of course! Welcome! It has been a while. Let's get straight to business!
On January 2nd, I created the game project. I use Godot Engine, by the way. Version 4, beta 10 as of writing this. I like it very much, the engine. A total doofus like me can make something that looks totally normal to an outside viewer! Only I know how screwed up the code is on the inside.
Basically the first thing I did was start making a save and load system. I have done this twice before now, so it was pretty easy. Initially I used Godot's PoolByteArrays and the FileAccess.store_buffer() to save things, but luckily I realised what kind of nonsense that is a few days after and now I use store_var(). (Admittedly, the var I am storing is returned from var2bytes().) The save data is all in a nice single dictionary.
I made sure to keep systems in autoloads separate. I used to have a big GLOBAL autoload that did everything, but now I have multiple smaller ones.
More about code architecture, I have started to properly utilise classes and inheritance (even though they're kind of broken in this beta?). What a liberating thing to do! And how good I feel about myself. Good.
On Tuesday, I did not do as much. I added screen shake functionality to the camera, for some reason. HA! You can already see why you shouldn't trust me with making a game. Screen shake? On the second day of development? When you don't even have a proper character controller? Actually, the controller was added on this day as well. And also the first sprites for Greg, the player character. Take a look at him:
Don't stare into those eyes for too long. Moving on!
Wednesday. I copied over the music system from... uuh, I mean, I wrote it just then. Yeah. It was easy to convert to Godot 4, though it took a while until I understood the new Signals and Callables. And a brand new dialogue system, too. It does not technically write the letters one by one in code anymore, it uses a tween. So I can't really add that iconic RPG babbling sound to it, but I don't think I'm missing out on much.
This dialogue system, among other things, relies on a "character system". All possible Characters are in an exported Array in the DAT autoload for easy modifying in the editor and access from anywhere. Characters are Resources that store their name, portrait picture, their stats should they be encountered in a battle, and some other things.
The font that the game uses was generated using "Pixel font converter", an online tool for turning drawn letter tilesets into .ttf files. The game's resolution is only 160 by 120, which makes the text really small. I hope it's at least readable, though I assume many people might have issues with it. The resolution leaves me no space to implement an "easy to read" font option, either.
Thursday. Level transition functions were added, though there are no Nodes made yet that could call them. There is no "Main" node in this game of which scenes could be children, I only remove the last Node that is the Child of the Root and replace it. This actually caused an issue with saving and loading data, which uses string keys, which use the scene's name in them. The scene's name was not reliable... So I fixed it by adding await get_tree().process_frame
before readding the new scene. That line is also the solution to a million other problems, unfortunately. Alas, that is Godot for you. Me. You might be smarter and not run into these issues.
Thursday was also the beginning of OverworldCharacter Nodes, which are NPCs. I had already made this system before, just reimplemented it with slightly cleaner code. Here:
Did you notice how they don't clump up while chasing the player? I coded that in specifically. Still very proud of it. I was done working on NPCs on January 7th.
The next thing to do, starting on Saturday, was the battle screen. A very basic RPG battle system, attack - use item - use skill type, attacks in turns, nothing out of the ordinary. I worked on it until today evening, which was when I started writing this devlog and the Greg game document. Here is a demonstration of its current state:
(The background ambience in the video is from Dwarf Fortress, which I had open and generating a world. I got in 3962 years. It'll be a treat reading its history!)
It needs a bunch more work, but the base is strong. All the members of the battle are of the BattleActor class, which have a Character resource attached to them, which they use for stats management (levels, health, that kind of stuff). They have a cooldown before they act, and other actors wait when one of them is acting (So the turns aren't team based - when one's cooldown runs out, they act, be they enemy or ally.)
BattleActor can do various on any other BattleActor. In the video you can see Mail Man feed Greg some stuff (which makes him faster, did you notice?), and then attack him, even though they are on the same team. Enemies do not have any behaviour yet, will get to it soon. Things like the health change when an actor attacks another are packaged into a BattlePayload resource, which stores a bunch of stuff like that, and is interpreted by the actor on the other end of the attack, or item.
This system, or the idea of it, is, again, nothing new, but the implementation is much more swag than last time.
The battle interface uses Godot's Control nodes, which were surprisingly cooperative this time. Only keyboard controls are available anywhere in the game (move with arrows, confirm with z, deny with x). I wonder if this is another accessibility issue? Tell me about it.
This is it for the devlog, though! And, do tell me about things. What would you like to see more of? Or less of? Give me all your thoughts. I will try to get something playable up as soon as possible. Maybe tomorrow 🙏
I was told I should/could start adding music that I finish to the site as well. I do like shoving my music down people's throats, so this sounds good to me. Uhuh.
I realised there might not be any way for you to actually contact me. I think there are links on the main page? Try those. I don't know. I must take my leave.
Goodbye.