Hi this is my first post,
I'm having trouble with a platform game I've started,
Basically, I'm checking my players x and y positions against the tile one tile down in the tilemap, it works, he stands on any tile that is greater than 0, but as you can see from my pictures he is never actually directly aligned to the top of the tile, sometimes he is trouser deep sometimes even neck deep.
I'm not sure how to correct this, I've seen an example in another basic of using mod to position the player correctly. but I didn't really understand it
http://picpaste.com/prob1.png
http://picpaste.com/prob2.pngLOCAL x1,y1
x1 = (playerX-offsetX)/tilesize //Player X pos - screen offset (for scrolling screen) / size of tiles (32)
y1 = (playerY-offsetY)/tilesize+1
IF tilemap[x1][y1] > 0 //a 0 in the tile map means their isn't a tile
falling = 0 //player isn't falling
ELSE
falling = 1
playerY = playerY + gravity +playerYspd //move player downwads.
ENDIF