This week I worked on two mechanics: getting healing items and switching party members. I figured this would fit in one week since I wanted this to be done with a single menu screen. However, the amount of programming and design work ended up being far more than I thought. In hindsight, I should've split this up into two separate weeks. The mechanics ended up working great, though.
Click 'Read more' to read more.
Chests and potions were decently easy to do. Get close to a chest, press X to open it, and add a potion to an ItemHandler, stored in the PartyHandler object to carry it through different scenes.
The Party Menu can be summoned by pressing Y. Creating this ended up being the real challenge of the week. This menu is completely reliant on the PartyHandler and its internal stats tracker, since it has to show which characters are currently slotted as well as their stats. On top of that, it doesn't need to just show things, it also needs to change them, requiring multiple selections and button presses. It was a hefty bit of UX and UI work to get this menu to feel right. The tiniest change or incorrect implementation would end up immediately ruining the entire experience. Needless to say, I learned a lot, and also had a lot of headaches over it.
There are still a few things necessary to make this menu feel completely juicy, but the interaction is fully intact. I'll still need:
The code itself is pretty long, and slightly messy. There are a lot of if statements: the UI elements for the party members are pulled out of the PartyHandler and its stats tracking component. Two giant methods with 9 if statements each for each character. That makes for a giant script, but since If statements are not very costly, the menu ends up working very smoothly. New characters are also simple to add: just copypaste the elements and rename them. For the vertical slice, however, I'm probably sticking to these 9 characters, potentially even cutting some of them if players find them unappealing.
Next week, I'm taking a break from programming to focus on adding visuals to the level, such as backgrounds and maybe some player animations.