This week, I HEAVILY cleaned up the structure of the battle sequence from last week. Like, I think both tuesday and wednesday were dedicated to cleaning that mess up. This includes:
-Making the layout locations local, rather than set globally via the obj_fight_handler (so now i can just tell the game where to put the box, and it’ll put all of the bells and whistles around it automatically)
-Making a script that automatically parses a given degree value and returns a sin value from a specified min/max range. For example, if I have a degree value that is constantly looping through 0 to 360, I can send that value through the script scr_get_sin_value(degreeValue, -5, 5), and it’ll take the degree value and return a value between -5 and 5, depending on where it is on the curve! This really helped shorten the code and make it more readable.
-Expanding the state-based style of game development to the major components within the battle sequence. Originally, it was just the players that could be in different states, but now the textbox, battlebox, and megadog can be in different states as well! This lets me do things like offset the text within the textbox depending on what type of text it is displaying, whether or not the text scrolls or is displayed immediately, whether the battlebox is entering or being idle, etc…
-Fixing a few things. The page numbers from last week were being displayed incorrectly, the damage numbers from last week would only display 20, and the options at the bottom would persist in their highlighted selected state even after attacking. That’s all fixed.
In addition to doing that whole cleaning nonsense, I added in megadog’s health bar, made the damage numbers more dynamic, added in the battlebox for the players to dodge in, and most prominently, added in megadog’s first attack! He sheds fur on you.