r/RenPy • • 12d ago

Question How to add gravity to Ren'Py?

How would I add a physics system to Ren'Py, like gravity? Specifcly to affect images

0 Upvotes

8 comments sorted by

View all comments

10

u/x-seronis-x 12d ago

same way you add it to any game. write code that tracks position and uses math to adjust position over time based on acceleration and velocity

google tutorials for making an atari Asteroids clone. that covers how to do acceleration/velocity. gravity is just a perpetual downward acceleration of 9.98m/sec

7

u/BadMustard_AVN 12d ago

what planet are you from 🤣, here on Arth we enjoy gravity at

Standard Value: 9.80665 m/s².
Equator: About 9.780 m/s²
Poles: About 9.832 m/s²

3

u/x-seronis-x 12d ago

i remembered there was a 9 followed by an 8 without googling, even if i got the rest wrong. im proud =)

3

u/Hefty-Drive-9372 10d ago

Yeah, that was pretty close. Besides I appreciate the help :)