Gravity for side scrolling game - Mario like clone | Sololearn: Learn to code for FREE!
+ 2

Gravity for side scrolling game - Mario like clone

I'm trying to code for gravity in python with pygame to create a Mario clone...I think the values for x has to be placed in a quadratic formula to solve for y that changes with the speed of movement, so when stationary, x won't change. I'll have to have some sort of loop because if x is 0, y can't change, right? I'm so list right now. If there's an easier way to do this, let me knos.

9th Mar 2017, 4:20 AM
Brandyn Powell
Brandyn Powell - avatar
1 Answer
+ 5
Here is a nice tutorial in processing about applying an ascending force to an object. You can apply the same concepts to your python script. Another set of tutorials in processing using vectors to apply forces to an object.
9th Mar 2017, 1:11 PM
seamiki - avatar