-
tiles
i got a tilebased map from a 2d-array
the thing is, should i put my character in the array aswell so i can detect collisions etc. this is my first time i'm using a tile based map. if you didnt get understand me just ask and i'll try to explain further.
thanks i advance
-
I'd say no. Just have your 'character' as a seperate entity, so you can draw him over the map, then redraw that portion of the map later and your character in a new position.
Create a class with an x,y and your image for the character, and compare the x,y of the character to the map.
-
I will second that.
As Eibro said, just create a class for your character, and then test the x and y position with your map array. You dont want to be editing the map array all the time.