I some time ago tried to do a 2D platforming game. Kind of like Mario, except that it would include all other features like double jump, wall jump, sliding, one-way platforms, rail-like ramps, gliding etc.
The problem is that you usually want a very specific and precise movement for this kind of games, so it could not be physics-driven.
What I ended up doing is an easy to extend framework for that kind of movement. You can take a look at my github page (Bear in mind, though, that it is a little out dated right now).
It’s core element is the CharacterController2D component, which is my own version of the built-in CharacterController just for 2D and made with raycasting. That component is then used by the PlayerMovement abstract class to control the movement.
PlayerMovement is abstract because you usually will want to override its default behaviour to implement your own. In the code is an example of a movement type for a character named JoanaMovement.
Joana, for instance, does not get accelerated when falling, that is, she always falls at the same speed. She can also dash infinitelly and, after jumping twice (her maximum amount of jumps) she can glide to fall even slower.
Joana is only an example of the wide variaty of combinations and behaviours available with the Framework.
The Framework is still not finished, as I would like to add more features, but it now covers the basics.








