change the DoMove to
Code:
Left := Round(X); // what is this +2 , same with +1 so it seems,no + not work
Top := Round(Y); // what is this ?
cause you set +4 already in OnCollision, this means if you set X+2 here it means you test Left(wich is X) later with Left+2+4 instead of Left+4
EDIT: meh stupid me, it should also work if you remove the +5, -8 it is only good if you have a sprite wich has transperant borders to match power of two, means a 24x56 sprite in a 32x64 texture
so you would have to set all +/- to +4 and -4 to make the sprite collision correctly without space between tile and character
Bookmarks