|
physics
Ok, so here's the deal. I'm just messing around with pyGame, which is a collection of methods and things to use for writing games.
I'm just getting into it so I just wanted to make something that draws a ball and then makes it fall with "real physics action"(TM).
So, I got it to draw the ball and looked up the formula
d = 1/2(a t*t)
in english: distance equals one half of the quantity accelleration multiplied by time squared.
That crazy gallileo...
anyway, the thing I realized after much confusion was that my numbers weren't floats, so they were rounding, no good.
Then I realized further that this equation produces results in meters per second. I was displaying it however in pixels per second.
You will likely see the problem with this. The ball starts out travelling just a little too slow and then it goes way too fast. A little too fast is justifiable because I make no account for air resistance but it's way too fast.
So the question is, how many pixels are in a meter? And further, is this actually going to fix my problem do you think?
Thanks in advance.
|