Hi i'm having problems with the 2d gravity in my 32x32 tile based platform game
when the player sprite falls onto first platform my collision code stops the player ok but as the player falls onto the
next platform down it does'nt stop until 2 pixels into the platform by the time the player sprite falls onto the
forth platform down it is half way through the platform
I assume this is to do with the the time it takes the program to loop. my code below
if Display(relativeTileX,relativeTileY)> 0
fall = 0
else
fall = 1
endif
if fall = 1 then spy = spy + 1 : sprite 10,spx,spy,10
spy being the player sprite y
I have based my game on the 2d tile scrolling tutorial by Mike Shah
but he dosent say anything about gravity in his tutorial
so my question is what is the best way to apply simple gravity to
a tile based game ?
thanks in advance
FIXED IT THANKS FOR YOUR HELP