1
\$\begingroup\$

Hi I want created map in Tiled program. How can I generator that 2D array with 0 - unwalkable 1 - walkable 2 - damageble

I suppose I must set it somehow, can someone tell me how to give me link so some tutorial ?

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

A common method is to have one special "Collison" layer. This is a layer which you don't draw in the game but which you use to place special tiles which say which parts of the map are walkable.

Another option is to use tile properties to set the walkability for each type of tile. This has the advantage that you can just map in a what-you-see-is-what-you-get style and don't have to bother with creating the collision map by hand. But unfortunately you now no longer can modify the collision map manually, so if you have some rare occasion where a usually blocking tile is supposed to be walkable or a usually walkable tile is supposed to be blocking, you can no longer do that.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .