SFGC
Don’t forget that in Sonic alike controller, the difficult part is not physics itself but selecting the correct reference frame and surface attachment rules. Although some would implement this somehow like this:
velocity.x = input * speed
velocity.y += gravity
move_and_slide()
(So in this context, the character would moving good in flat ground, but in slopes, there will be serious problems of the character moving upon them, because the character is still behaving like it is in world space).The problem with my previous approach, is that if I understand your posts correctly, Sonic-style controller usually needs to think in surface-space instead of world space. So the implementation becomes much cumbersome, because instead you have the logic of move horizontally and then apply gravity downward, you have the following logic which applies for surface-space, namely find the current surface normal, then calculate the tangent of that surface, then move along the tangent, then project velocity onto the surface and finally apply gravity.
Not sure if my suggestions are helpful.
Alex