Devlog #002: bUt iT wOrKeD iN eDiToR
Godot and I had our first fight this week. Don't worry, we made up and are friends again. Can't be mad at Godot for too long, it's just adorable. For someone who did game design most of their career, it's often hard to understand what's going wrong with code and even harder to figure out how to find what's wrong. I'm still learning how to properly debug, but I'm getting there.
I was really proud of myself to figure out how to load all my items at runtime instead of dragging them one-by-one into arrays, which is not only cumbersome but just an invitation for human error. The game already has over 40 consumables, technique items, and marbles... and we're only at version 0.0.3! I researched and found that I could load resources from folder paths and feed them into arrays. After some trial and error, I got it working and it was so fulfilling seeing the three empty arrays suddenly be full when I started the game. I was relieved that I didn't have to remember to drag the new resource in whenever I created a new technique or item. I kept working on features and was ready for this week's patch when I realized... none of that worked in the build.
Oh no
So. What do I do now?
I didn't know how to debug a build (I do know now but not a few days ago and running in circles, screaming). I started debugging very manually, like a peasant, literally drawing a black box on top of my shop scene and fill it with text that said how many items my random loot generator found. Spoiler alert: zero.
I started to throw signals into my loot generator script to spit out steps it would reach, steps 1 to 4 and learned that it didn't get past step 3. After a few more peasant-y signals, I learned that the loot generator didn't give any items because it didn't get any items to begin with, the array, the beautiful automatic loading of my resources, didn't work in the build.
BUT IT WORKED IN EDITOR! I yelled at the clouds. Well, the build didn't care.
After learning a bit more (thanks, people on Reddit!), it was brought to my attention that Godot changes some file names when building. Things like item.tres suddenly was item.tres.remap. No wonder my script couldn't find the files, they had different names. Easy fix, I thought and copied over two lines from a Github post and was sure that would fix it.
It didn't.
'BUT WHY' they yelled at the clouds. 'I TYPED IT LIKE THEY SAID!" The build didn't care.
I gave up trying to get it to run at run time and taught myself how to write an editor script which loaded all the files into the arrays for me. Boom. It worked, it loaded all the arrays. Now I just have to save and- arrays are empty. Ran the script again, arrays were beautifully full, hit play, empty.
I was losing my mind. Why was this SO DIFFICULT?! It was already past 10 pm, I had worked all day on this and gave up, went to bed with a grumpy face and hoped the problem would evaporate over night. It didn't... BUT... I figured out what the problem was. See, Godot doesn't like it when you fill an exposed array via code. I don't know why, but I couldn't get it to stick whenever I populate them via code. The item arrays were all still exposed from when I did it manually and everything I was doing with it since then was through code. So I un-exposed the arrays, put the script back into the game start script and lo and behold, it worked. Oof. That was... wow, I don't know. I sure hope I learned SOMETHING here. But I think I did:
- Godot renames files on export
- Godot does not want you to populate exposed arrays via code
- Editor scripts are pretty dang cool
Building Systems for Building Builds
So now with all these problems out of the way, I can talk about what I actually wanted to achieve this week. Soulblaze had a gameplay loop now and a little bit of all the base systems that I wanted: Enabling players to find and make builds. The most exciting thing about rogue-lites is that you have to adapt to what you have at your disposal per run and craft builds, potentially getting a super power, game-breaking, combination. Soulblaze didn't have that yet. Sure, there are some different animons you can catch, and different techniques you can teach them but it lacks combination power. So I added a few more techniques, tags, and a new upgrade system that lets you combine things because combining things is the secret sauce of "OH SHIT I DIDN'T PLAN FOR THIS, THIS IS AMAZING" (or... "OH SHIT THIS BREAKS THE GAME" but I can fix that, right??)
I build the fusion system. I love when games give you a use for duplicate items other than selling them for scrap. Hype Scape let you upgrade your weapon to the next level, every time you picked up the exact same weapon again. I loved that! Usually, you feel disappointed when finding a duplicate because you already had that, your loot was pointless, sell or discard, move on. But with this it was a moment of success, I got to enhance my weapon. Throne and Liberty handles it similarly, where you could enhance item traits by feeding your gear duplicate items with the same trait or unlocking new traits.
Soulblaze's techniques already had tags and you already found a bunch of flash drives (item that teach techniques). In Pokemon games, I would always end up having several of these TMs and just hoard them but don't need them, except for a few. This way, I could give them more meaning when you already had that technique. So, in the fusion screen, you can pick an animon and a technique and either upgrade it by feeding it an FD with an identical technique (so FD: Snap for the technique Snap, for example) and either increase its damage by 1 or reduce the cost by 1 (minimum 1) or you could transfer a tag from another technique to your technique. That way you can combine tags which can become very powerful!
This needs way more testing than I had time to do but I like it very much so far and it is promising! It's ready to patch and will be released tomorrow. I hope you have fun with it and tell me what you think.
Get Soulblaze
Soulblaze
a creature-collecting rogue-lite
Status | Prototype |
Author | Zein |
Genre | Strategy |
Tags | 2D, creature-collecting, Cute, Dice, Godot, Monsters, Roguelike, Roguelite, Singleplayer, Turn-based |
Languages | English |
More posts
- Patch Notes [0.0.6]1 day ago
- Patch Notes [0.0.5]8 days ago
- Devlog #003: Responsiveness11 days ago
- Patch Notes [0.0.4]22 days ago
- Patch Notes [0.0.3]27 days ago
- Patch Notes [0.0.2]36 days ago
- Devlog #001: Quirks40 days ago
- A Fresh Start43 days ago
Leave a comment
Log in with itch.io to leave a comment.