I have a few different things to update on today!
Firstly I did some polish to the control popups. I also started thinking about what new levels to work on next, and added couple of new gameplay mechanics for those.
Control icon combinationThe game's directional inputs are entirely separate from each other - that is to say, as far as the gameplay is concerned, there's a LEFT, RIGHT, DOWN and UP input that are essentially unrelated.
Each of these inputs can be bound to whatever key or button the player chooses. When displaying these inputs on the screen, we get the binding for, say, the RIGHT input, which might tell us that it's bound to KEY_RIGHT on the Keyboard device. Or maybe it tells us that it's bound to the INPUT_LS_RIGHT button* (moving the Left Stick to the Right) on a Controller device.
(*it's not a button obviously - it's a control stick - but the act of moving it to the right is a binary on/off action so it's treated the same as a button.)
We then ask the relevant input device what icon to display for INPUT_LS_RIGHT, which returns "$keyRight;" for the Keyboard or "$xboxLSRight;" for the Controller. These are IDs for a custom font character that will be displayed.
Here's an example showing that you can do a downwards kick by pressing RIGHT, DOWN and KICK. First, the Keyboard version:
This seems to be a reasonable way of displaying this input on a keyboard. However, if we do the same for the Controller:
The way the RIGHT and DOWN inputs are displayed with separate icons feels really awkward. Even if the game is reading the inputs separately, as far as the player's concerned it's a single input - moving the stick diagonally.
I added a new system to provide combinations of icons. In this case, after getting the bindings for RIGHT and DOWN, instead of asking the Controller device for the icon for each separate binding, a new function is used where both bindings are provided at the same time. If two compatible bindings are provided then a single combined icon can be returned. If the bindings are not compatible then the two separate icons will be returned and displayed as before.
In this example, the Controller device knows that INPUT_LS_RIGHT and INPUT_LS_DOWN can be combined into a single icon - "$xboxLSDownRight;".
This now looks much more natural!
By default for controllers, the directional inputs are bound to both the Left Stick and the dpad, but the Left Stick is the binding that's displayed in these situations. It's possible for the player to rebind the controls only to the dpad, in which case the dpad will be displayed in the control popup, where it's also combined into a single diagonal icon:
And, if for some reason the player chose to make their life difficult by binding RIGHT to moving the Right Stick to the left, and DOWN to moving the Right Stick upwards, the icons for those bindings are combined too:
Control Popup animation polishI gave the control popup some smoother animations when appearing, and made the 'tail' of the thought bubble animate.
I also made the colour of the bubble slightly blue - I feel like it makes the white text more readable.
Powerup PlantsPowerups are normally spawned from hitting blocks. These produce a single powerup, and that's it. In some cases though, I want to be able to give the player access to unlimited powerups. An easy example would be a level that's designed to teach the player how to use a certain powerup - such as the fire leaf - and requires that the player uses it to progress. If they took damage and lost the powerup, they'd be unable to continue.
One solution would be to design the level in a way that prevents the player from being hurt, but this would be very limiting. Instead, I've added these plants that will spawn the relevant powerup if the player doesn't have it. So they can take damage and always go back to find another powerup.
Volcanic Rock BlocksFinally, I'm trying out a new type of block that can only be destroyed using Fire Leilani (or bombs/explosions...).
I've been resistant to add this for a while - my issue is that it maybe feels too artificial or obvious as an obstacle. If you see it, you know that you need the fire powerup to destroy it, so there's not much thought that goes into that. My initial instinct was also that this takes away from the player's ability to play in multiple different ways as there's a single solution to the problem.
However, I'm no longer sure why I was so against it
Firstly, I'm allowing bombs/explosions to destroy the blocks too, which provides the possibility of alternate ways to destroy the blocks without needing the fire powerup (although I can still avoid this by not including bombs or missiles in the level). Secondly, depending on the level design there's no need for the player to feel funnelled into a single solution to progressing - maybe these blocks are in the way, and can only be destroyed by Fire Leilani, but there could still be alternate routes through the level that end up at the same place.
The advantages of adding this block type are being able to explicitly create a need for the player to use the fire powerup. Previously the bubble has felt much more useful - floating allows Leilani to cross gaps, and also offers protection from being hurt. On the other hand fire has mostly only allowed Leilani to do what she could already do, but faster.
Sprinkling some fire-Leilani-specific shortcuts or secrets throughout levels should give the player some incentive to use both powerups. And for harder levels / challenges, it's a clear indicator that the player is expected to be able to make use of fire Leilani's abilities.