Today I’ll talk about Ladders, Water and moving platforms. Apparently it takes some developers a long time to figure out something as simple as the humble ladder but it took an hour here.
However The Other Brothers ladders were designed with the following:
1. ladders can be any shape or size, and any angle.
2. ladders can rotate (anything can in my code base), and move.
3. ladders can pass through other ladders in an intricate network or ladder-soup.
But what about playability? How do you make something as boring as a climbable area, exciting?
1. player should be able to jump while on the ladder, and not catch it again until almost half a second has passed. This means there’s no point spamming jump to go up ladders faster, and the player is forced to think. This also allows you proper clearance from the ladder when doing risky jumps.
2. the ladder must allow player to pass through platforms. We solve this with some clever collision states.
3. the ladder must allow us to hang from it or attach to it at will, so we can run past it and ignore it or jump through it without a worry. This is solved by checking if the player is pushing up or down when your character passes a ladder.
Water is a similar system to the Climbable Area. Once the player enters, we want to change how you play.
There is no point in water being a sort of big climbable area so the only way you can swim is to tap jump. This makes a stroke upwards. You can swim normally left and right regardless. The physics are changed to make it suitably weighty.
Again, water isn’t limited to any specific shape or size, and you can even climb up a moving ladder into a pool of water (not that this makes any sense).
It’s important to get this right. We want moving, rotating, shifting and falling areas. We want it exciting, unpredictable and varied. This is solved by having a pin cushion concept. Whenever the player moves into a zone marked as platform, it becomes a child of that zone, and inherits the parent’s movements.
You may have guessed all 3 above concepts sit on something I call a Zone. A zone is a polygon mesh or mathematical shape which can define an area of importance. The work flow for this is really cool in unity, and artist friendly. We can tell them to be anything or do anything – even start up cut scene.
Cut scenes?! Yes the cat is out of the bag, there will be many full cool cut scenes to tell the story, but that is for another diary posting!