This is my code for a platformer, feel free to use it for your games. It doesn't have all the physic but it works.
Credits to Me