Hello!

@Tuomo_T has answered your first question, weâ€™ve picked an arbitrary velocity, as our units of distance in this case are pixels, so really, thereâ€™s no real need to adhere to realistic values (9.8 m/s^2, for instance).

As for your second question::

We are updating our position in each iteration of the game loop (the while loop). We can think of this as a per-frame update, so really, our velocity is actually in pixels/frame. Since we are updating position each frame, we apply the change in velocity for a single frame.

Think of it in terms of real-life units. If youâ€™re running at 1m/sec, each second, youâ€™d add 1m to your position, wouldnâ€™t you?

So each frame, we add the velocity for that given frame. So weâ€™re not actually mixing units, but rather you could think of it this way: weâ€™re applying the update for this frame, so the current frame â€ścancelsâ€ť out that unit of frames in the denominator for the velocity.

Updating the velocity works the same way. Velocity changes each frame, and the acceleration is a rate of change in units of (pixels/frame)/frame. So the update to velocity constitutes a change in the velocityâ€™s number of pixels/frame each frame. So since weâ€™re updating the velocity for the given frame, that /frame denominator is â€ścancelled outâ€ť by the current frame.

And for your last question, thatâ€™s correct. Velocity has a constant acceleration applied to it. This is how objects fall in real life - their velocity changes at a constant rate of 9.8m/s per second. So each second, they are now falling 9.8m/s faster than they were the previous second.

This is why itâ€™s so dangerous to jump from extreme heights. If we fell at a constant rate, weâ€™d safely float to the groundâ€¦ but this isnâ€™t the case. We actually accelerate, and the higher we are, the more time we have to accumulate a more and more dangerous velocity before weâ€¦ PLOP!