I recently participated in the Global Game Jam, and made a game called Macca Masquerade with my brother! We had a really ambitious game idea, so we only finished a short demo of it for the GGJ.
For the next few weeks, I worked on various bug fixes and improvements to the game. We're still working hard on making it all public-facing, but for now, we have enough updates to share for version 0.6 that's available below on itchio.
💾 Download and play the game here:
To start off, I was still doing some bug fixes and scaling up the week after the GGJ. I started by reformatting a lot of our enemy movement and attack code logic so we could scale it up for multiple types of battles. I also fixed the diagonal movement on the enemy and the spawn points of the player's attack squares too.
Then I did some other bug fixes and updating code to make use of variables more. This included updating the random range for the enemy to use variables so we could change it per battle instead of it being set across all of them. And I updated the charsets to use the mask variable so we could dynamically change those in accordance with the Mask Menu more seamlessly.I also updated the dialogue choices so that on the character select screen, it shows the choices on the right. This way, it's less in the way and you can also now view Kali's dialogue at the same time as the choices.
Then I worked a bit on showing the enemy's attack range visually with squares, like you can see for the player's movement and attacks. I started with just the close ranged abilities since the code mirrored what we set up for the attack range.
Then I updated the code to use the enemy's ranged attack variable to determine where the spaces should draw. So it draws them as long as they're within the grid.
I spent awhile after that working on the Mask Menu. After about half a day, I got everything functioning. You can hover over masks and the information shows up to compare to your currently equipped mask. They only appear after you've collected that mask, otherwise they're a shadow that you can't equip. You can choose to equip masks and when you do, it changes which one is displayed on Kali and the stats at the bottom.
Then I added the Mask Menu to the Battle so you could access it instead of just replenishing MP at the Mask Cabinet. I had to update some of our code to ensure transferring between maps worked seamlessly. This meant saving the player and enemy positions because you'd return to the map mid-battle after visiting the Mask Menu.
Then from there, I decided to add the game loop for the rest of the characters so I could better test out the masks. There were a few weird bugs of things not resetting properly with a second battle, but I fixed most of them and was able to make a general progression that could set us up for when we add these extra characters.
I also optimized some of our code to reuse instances for each character. For example, a sound effect plays when the enemy attacks, so I'm using the enemy character's name instead of hard coding that each time. I also updated how the enemy's charset appears on the battle map using this code.
A small sidetrack I did was update my NW.js and PixiJs files because I was reading that it can improve the performance of your games if you do that. So I was able to actually get Archeia's tool working in a side project, but I decided I wouldn't need to add it back to this project since we were so far along. This did mean that I updated my RPG Maker core files and the project's files to match. I think it helped make the performance a bit better, so it was probably good to do this!
Using the same logic as the Mask Menu, I updated the Battles to show attacks upon hovering so it'd be easier to know what the attacks are without committing.
I fixed a bug where Kali's mask wouldn't show up, then I added keyboard controls to the battle screen. It was a lot harder than I thought it would be to show the current keys based on the keybinds. But now it shows the icon of the currently assigned key. I didn't test with controllers yet, but hoping that works well.
Once I had the keys visible, it was pretty easy to get it working. I just set up my own Conditional Branches to detect which key you pressed, and from there, it loads some Common Events. I did have to recreate the hovering/clicking from the buttons in here though. And the "Tab" key wasn't in a regular Conditional Branch, so I had to use code for that one.
After that, I added keyboard support to the challenger selection screen. This one was a little more involved because I had to code a whole new input system that checks which character you're currently on and which one is to the left and right of it.
I was having some weird bugs at first where the button displays would randomly disappear or appear and it wasn't consistent when it was happening. I finally tested just adding an additional wait after I turned a switch off, and that's all it took to fix it! I spent about an hour trying to debug it with various other fixes, but was glad that's all it was.
Previously, some of the inputs in the keybind menu were showing up as text like "(Enter)" or "(PageDwn)" and I wanted them to show actual keyboard keys. So I went into the rmmz_core.js to edit some of those keys to new codes (e.g., "confirm" in addition to the default "ok"). And then I added a Common Event that essentially checks if that new keycode was triggered, and if it was, then it converts it to the equivalent input. This way, it would show the intended key in the menu, but still function the same if I wanted to use those other keys for quick navigation.
Then I started adding keyboard controls to the mask equipment menu. This includes moving left, right, up, and down (including moving over locked gaps). It also highlights them when they're selected.
This one was a bit more complex than the character select screen because you can move in more directions than 2. And then I only really want the player to be able to see the masks if they have them unlocked. So it ended up being a lot of nested if statements to check for conditions. I had to copy a lot of events which wasn't ideal, but I couldn't figure out a more efficient method. So basically, I had to code that if you press a direction key, it checks if the closest mask is unlocked, and if it isn't, then it checks the next one, and then if both of those are false, it plays an error sound and doesn't move.
From there, I wanted to really fix up the button mapping in the controller rebind menu. I was having a bug where my PS5 controller would default to some weirder controls like square being confirm and x being cancel. My Xbox controller was plug-and-play, but PS5 wasn't so easy. I usually use the Gamepad tester site to figure out which buttons apply to which numbers, but for PS5, it didn't match what was actually the case in RPG Maker because of differing NW.js versions. It was mainly that square, X, and O were scrambled from the website, so I had to remap them.
It led me down a whole path of developing my own Gamepad mapping plugin so I could safely change those without editing the rmmz_core.js plugin, and then I added plugin parameters so I could edit them straight in the editor.
From there, I had to update up the visuals in the VisuStella plugins. This is the piece I was forgetting during my troubleshooting. First, in the Core Engine, I had to use button icons for which buttons were associated with OK, Cancel, etc., then I had to update the Options Core to show those specific button icons for the new button numbers that I discovered.
Then I updated the Message Core replacement codes to display the gamepad buttons if a gamepad is plugged in and a button was pressed.
After that, I went through to just test where the game was at and found some critical bugs that came up after all of the recent additions I made. It was a struggle at first because I didn't know where the bug came from, but it was causing all waits to basically freeze the game. I researched a bit and found out it was due to how I had my common events set up, so it was some interruptions with the interpreter. I eventually called the first common event after the mask menu differently through a script instead of the built-in event command and it was able to fix it. It was a long couple of hours of troubleshooting, but I was relieved when I fixed it!
And that's it for this time! I made a lot of updates on my own throughout these weeks, but we did end up meeting on voice chat a couple of days to finish it out. So I'm splitting this blog post up into multiple parts since it's already getting a bit long. I'm looking forward to sharing the final game once we finish it!
























No comments:
Post a Comment