Accessibility
A lot of work has gone into the game since my last update here. I won't cover it all in this post, but I'll try to detail some more of it in the coming weeks.
For now I want to talk about accessibility. And by that, I mean creating a game that's accessible and enjoyable to people of all kinds of gaming backgrounds and varying skill-levels.
This is no easy task. Creating a game that requires a lot of skill, familiarity and practice to be enjoyable is a much simpler task. It reminds me of a quote from Angus Young of AC/DC fame (at least I think he said it :-/). He said (and I'm paraphrasing), "the simplest guitar riffs are the most difficult to write".
I think that something similar could be applied to game dev.
Licky Lizard
Licky Lizard is a game that has a deceptively steep learning-curve. I think that a lot of people are surprised by how difficult it is when they first play it. This is probably at least partly due to the games presentation. Players see a cute, colourful cartoon character, and maybe assume that it's a game aimed at just kids. And for that reason it's super easy to play. I don't know though, that's just me theorising.
Whatever the reason, after having people test the game at various events like Eirtakon and DubLudo, I realised that I could do a lot more to aid new players. To make a good first impression.
One of the things a lot of new players had difficulty with was accurately targeting platforms with Licky's tongue/grapple hook, by pointing the controller's right analogue stick.
Other players have pointed out that when I play the game, I almost always point the crosshairs directly up and very rarely (if ever) move it elsewhere. Some suggested that for that reason the game didn't need the aiming at all. That the grapple should always shoot directly up. But that's not an entirely suitable solution - sometimes there isn't a platform directly above you (this game is procedurally-generated after all). Sometimes the player will want to target pickups, like health and rocks. Other times the'll want to throw those rocks at specific, breakable platforms.
Alina came up with a great idea: to add an auto-aim feature. So that the grapple would automatically target platforms. But which platforms? And what about the pickups and rocks. That's the tricky part.
Auto-aim
First I added a new pizza slice-shaped collider trigger to the player character. This is used to detect all candidates - potential targets for the grapple hook. It's radius is determined by the range of the grapple hook.
We then have to decide which of these is the "optimal" target.
A ray is cast from the player character to each of the candidates. If the ray does not reach the candidate, then we know that the player character does not have direct line-of-sight on the candidate, and so it can be ruled out.
In Figure 1 these ray casts are illustrated by the black lines emanating from Licky towards each target within the detection collider.
I've used the following heuristic to determine which of the remaining candidates should be chosen as the optimal one.
Heuristic = |dy| - (|dx| / 2)
The candidate with the highest resulting value is selected as the "optimal" - the one that the grapple hook will be aimed at.
Let me explain the reasoning behind the formula above.
As previously mentioned, when I played the game, the ideal target was often the one directly above. So that's the thinking behind the |dx| component of the formula - the distance between the player character to the target on the x-axis.
But why isn't that enough? Why not just choose the target closest to the player character on the x-axis? Why consider the y-axis at all?
One of the tricks/skills that's core to the game, is one I call "the wrap-around". (Hey, stop laughing!) This is basically when you fire your grapple hook at the bottom of a platform, and then immediately move to the left or right in order to swing around the platform and land on top.
If the player doesn't swing around, they'll most likely collide with the bottom of the platform and lose all momentum. It then becomes much more difficult to swing around and land on top.
Grappling to a platform that's very close to you gives you very little momentum. It also gives gives you very little time to swing before you collide with that platform. For this reason it's almost always a better idea to grapple to a platform that's further away. And the goal of the game is to climb as high as possible before the lava catches you, so grappling to the highest platform isn't a bad place to start.
So that's where the |dy| component of the formula comes in.
What the resulting heuristic provides is a target that is both high and central, relative to the player character.
Highlighting
The next thing needed was to provide the player with a visual cue, so that they know what to expect from the auto-aim. Because not allowing the player to know where their grapple hook is going to fire at any given time would just be bad design.
Options
Lastly, I decided to retain the option to manually aim. The right analogue stick can be pushed at any time, and the original crosshairs will appear.
Because like I said previously, sometimes the player will still want to aim at specific pickups or platforms. And plus, some players really like that extra level of control.
I think that there will still be an advantage to using the manual aim, and that if the player is skilled they would generally score higher. No matter how good the auto-aim is it will never be able to read the player's mind. I like the idea that there will still be a natural separation in score between players using auto-aim and those using manual. But having the auto-aim there will make it much easier for new players to get accustomed to the game.
Collateral
One other unforeseen advantage to adding the auto-aim is that it frees up the player's right thumb. They no longer need to use the right analogue stick, which means that they can instead use the face buttons. This means that X can be used for jump, as is traditionally the case in platformers.
So that's pretty much it. I hope you found all this interesting. I'll have some posts in the coming weeks, so be sure to check back soon.
~John