[SDL] Sprite, collision with tiles
Salvatore Di Fazio
salvatore.difazio at gmail.com
Sat Sep 2 12:45:39 PDT 2006
I need a function thet understands when a sprite collides with a tile.
I made something that uses the position of the sprite in relationship
with the tile (ex: NumTileInMap = SpriteXPixel + (SpriteYPixel *
That works fine when the sprite is in the bottom or in the left of the
tile but it dosen't work fine when the sprite is at the top and in the
right of the tile.
Besides I need to check if the sprite collides with a tile when it's
in the middle of two tiles.
Thanx a lot
More information about the SDL