Discuss Scratch

grewingh
Scratcher
8 posts

How do You make a platformer?

I wanna make a platformer. How?
when green flag clicked
ask [How do U make a platformer] and wait
answer [ I dunno]

Last edited by grewingh (Feb. 26, 2022 15:40:03)

scratcherboiz101
Scratcher
97 posts

How do You make a platformer?

Okay! Platformers are great games to make and I think that's a great way to enhance your coding skills. Simple platformers don't take much time, I can put a link from Griffpatch's YouTube tutorial: https://youtube.com/playlist?list=PLy4zsTUHwGJIATydhFeZa5pspLZR7yE__

I hope this helps!!

Happy Scratching!

Jay Christaldi
grewingh
Scratcher
8 posts

How do You make a platformer?

thanks!
helloworldbyeworld
Scratcher
1000+ posts

How do You make a platformer?

Platformers aren’t terribly hard. Here are the basic components of a platformer:

1. Velocity movement: two variables, x vel and y vel in which the x and y position keep changing by them.
2. Gravity: Keep changing y vel by a negative amount until it’s touching the ground, in which player will keep going up one pixel at a time (use a no screen refresh custom block for this) until it’s not touching the ground.
3. Jumping: to jump, set y vel to a positive amount, like 10.
4. Left/right movement: to accelerate right, change x vel by a positive amount, and vice versa for left acceleration.
5. X friction: Keep multiplying x vel by an amount between 0.5 (high friction) and 0.95 (low friction).

There are some more advanced features that you can implement, such as wall jumping, slopes, and breakable platforms, but I reccomend you starting with these general components of a velocity platformer.

Helloworldbyeworld | 1200+ posts
Have a great day

Powered by DjangoBB