Posted March 22, 2024 by PestoRavioli
Not a big update today. Yesterday was a long day at work; however, I was able to fit in a brief dev session after my 14 hour day. So I finally hit the point where I think I need to start creating documentation to go along with the dev work. I modified the battle system -- which previously only allowed a basic attack by the player -- to now include a basic attack from the enemy. It's a round robin style where it's based solely on 'agility' stats as to who goes first (well, I called it graceful and not agility).
Circling back to my point though. By introducing this, I somehow completely broke the entire battle system. Menu, randomness, etc. At the end of the day, because I have broken things out in to modular functions, I ended up calling some functions that after I modified things no longer called things in the proper order. It took a good hour to figure out how to fix it. I'm still not wholly convinced it's actually fixed correctly because of how exhausted I was when I was doing it. It was at that point that I decided I will eventually need to start creating docs detailing what functions/scripts exist, where they're used, what they do, what variables are used in them, and general details about my thoughts on each one. I know GB Studio has some of this built in, but I feel it'll work best if I have design documents created exactly how my brain works.
Anyhow, as I mentioned, the latest update introduced enemy attacks. The side with the higher 'gracefulness' stat attacks first in the round. I tested that the player getting to 0 HP will trigger text indicating they were defeated and (for now) goes back to the title screen. Maybe at some point I'll have it load the latest save. I need to figure that out. I'm not sure if I want a straight game over, load the latest save, give the option to restart the battle, etc. A lot of design decisions are left still. I'm definitely still just trying to get all of the major functionality working before I add to the world or implement additional components.