Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How To Make A Platformer Help
- SparklyGems
-
5 posts
How To Make A Platformer Help
I need help with a game I am making (not published yet) its a platformer and I want to know how to jump and also jump 'n run.
ever time I do I end up floating in air
ever time I do I end up floating in air
- deck26
-
1000+ posts
How To Make A Platformer Help
So how are you moving in a y direction?
The best method for something like that is to have a y-velocity and in a loop you change y by y-velocity. If y-velocity is 0 you're not moving vertically, if it's positive you're moving up and if negative you're moving down. Then add gravity by changing y-velocity by a negative constant on each pass of the loop. That means when you're jumping you gradually slow down and then accelerate towards the ground.
The best method for something like that is to have a y-velocity and in a loop you change y by y-velocity. If y-velocity is 0 you're not moving vertically, if it's positive you're moving up and if negative you're moving down. Then add gravity by changing y-velocity by a negative constant on each pass of the loop. That means when you're jumping you gradually slow down and then accelerate towards the ground.
- SparklyGems
-
5 posts
How To Make A Platformer Help
Can you post a picture of that in a script? It would really help because I just sounds a bit confusing the way you say it.
Last edited by SparklyGems (Feb. 15, 2016 16:35:55)
- deck26
-
1000+ posts
How To Make A Platformer Help
https://scratch.mit.edu/projects/67727504/ gives you all you need
- SparklyGems
-
5 posts
How To Make A Platformer Help
https://scratch.mit.edu/projects/67727504/ gives you all you needthanks I will do that now
- Discussion Forums
- » Help with Scripts
-
» How To Make A Platformer Help