First, move the line where you draw the player:
Before the line:
So that the player is drawn right after checking the collisions.
In this collision code, there are two parts that stop the jumping with "yspeed = 0"
Before that line, insert:
This will place the player back on a whole tile again after a jump.
In your main loop, you are setting the buffer, "SetBuffer BackBuffer()" I don't know if it matters much, but it can be moved before the loop.
DrawImage gfxplayer,playerx,playery;,frmplayer
Before the line:
If JoyY()=-1 And ladderpresent=1 Then ;up if a ladder is present
So that the player is drawn right after checking the collisions.
In this collision code, there are two parts that stop the jumping with "yspeed = 0"
Before that line, insert:
playery=playery / 8 * 8
This will place the player back on a whole tile again after a jump.
In your main loop, you are setting the buffer, "SetBuffer BackBuffer()" I don't know if it matters much, but it can be moved before the loop.