VBGamer |
|||||||||||||||||||||||||||||||||||||||||||||||||||||
RE: Free-Form vs Tile-by-tile Walking... SLotman (4 replies, 0 views) (2000-Jul-4) Of course it is possible! I use this kind of movement in all my tile-based games.
It's kinda simple:
First I store the sprite's coordinates in map coordinates - like x=1000; y=1000
then, I check 6 points in each sprite for collision detection - top left, top right,
bottom left, bottom right, middle top, middle down, middle left and middle right
(get each coordinate \ tile_size and check if it is in any "non-walkable" tile)
and this doesn't impact your game performance at all.
Sorry for my bad explanation, but my English is NOT that good....
Hope this helps....
|