I don't understand...
How do they move?the main character, other animations, any enemies and the movement don't work in this fashion
Do they have free movement within the 32x32 cell? either way, the way I suggested will work.
Your array for your map, say for example it's 10x10 - the fact that your sprites are all 32x32 is not important at this stage.
[pascal]
-0123456789
0XXXXXXXXXX
1X X
2X X XX X X
3X XX X
4X X XX X X
5X XX X
6X X XX X X
7X X XX X X
8X X
9XXXXXXXXXX[/pascal]
say your sprite starts with a left-top of 32x32 a right-top of 63x32, a left-bottom of 32x63 and a right-bottom of 63x63
this would equate to all four points being in the grid cell 1x1
now if you wanted to move diagonally to the right by a couple of pixels,
34x34 65x34
34x65 65x65
the bottom-right pixels when translated to the grid are in 2x2 which is obstructed.. so he can't move that way.
Does this explain what I'm on about? or did you understand before and I don't understand the problem?
Bookmarks