One may argue that the main objective of the game is to successfully top out on climbing routes. As such, the action itself should feel cool to perform.
In the very early stages of prototyping, the player character topped out by simply reaching the edge and switching sides (from vertical to horizontal). That worked OK. The issue was that there was no transition or animation. This resulted in a pretty funny dance the character model did as it climbed the thin air until its feet touched the ground.
As amusing as that looked, it posed a clear problem. To solve it a few things needed to happen: First of all, there should be a way to detect a ‘top out’ (i.e. the end of a wall) and then transition smoothly from climbing to standing on top. All of this should also weave in some animation that covered that move.
Some quick research showed a few ways to solve this. Playing with colliders was an option, but the chosen approach was to shoot lasers. That sounds more fun than it was, but I’ll stick with it.
The concept was fairly straight forward: The top of the character’s head was given as the origin point of a ‘laser beam’ (raycast) measuring around 2 metres in the world scale. When the player climbs, the laser beam hits whatever the character has right in front of its forehead. So long as the laser hits a climbable wall, the character can keep moving upwards. This is very handy for a few things we will be working on later on (looking at you, ledge climbing). But for this instance, it was useful because the laser beam may simply hit nothing.
That’s the important bit. If the player is climbing and the laser beam on top of its head hits nothing then this must mean the player has reached a ‘top out’. This was step one.
Step two was figuring out what to do next. Initially the character started the topping out transition as soon as the laser beam hit nothing. That turned out to be a bad idea. Why, I hear you ask? The answer is that the player may not always want to top out a ledge. Sometimes the player may just want to traverse said ledge. Also it’s pretty annoying that you could top out without meaning to or even realising it. It must feel like an accomplishment after all.
Because of these reasons, the second iteration added a new condition: Once the character reached a top out position, upwards movement would be cancelled. That means that if the player reaches a ledge they feel it straight away as they stop moving upwards. Lateral and downwards movement is still possible - so there goes the solution to the traversing issue.
To actually top out, the player must indicate that’s what they want. And doing that is simple: All they have to do is to keep pressing the upwards command for 0.4 seconds. And there you go! Weave in some fancy animation, synchronise it with the physical location of the character and - Tada! All done. Now onto the next thing to sort out…
Comments