I recommend checking this thread out:
The thread contains a .capx of an engine from MMF2 that somebody created (Made by Damizean if I'm not mistaken), that Candescence ported over to C2, but it had performance issues, but shows that a Sonic game with loops and momentum is possible. You will just have to use all your optimising know-how and make it from scratch. You could look into the .capx and dissect it, turn parts on and off and figure out how it works, then you could begin making your very own engine!
OR , You could use the built in platform behaviour to make a basic momentum/physics engine. It's quite simple and doesn't involve nearly as much math and collision detection as making it from scratch. If you know how to figure out the angle of the ground below, you could make the platform behaviour "Set angle of gravity" to the grounds angle, which would make you stick to the ground no matter what angle
I would go into this more but man there's so much to talk about, I highly recommend checking out the .capx above and observing and changing it around to see how it works.