0

Are there any concrete examples of code using hexagonal maps with cocos2d? Except of drawing them manually, of course. I have found out that Tiled map editor (java version) allows to create these maps. But how to work with such map? I also don't know how to prepare a image for drawing into a hexagonal cell

4

1 回答 1

1

My current solution is to draw manually. But I have found an interesting way to store this field into an usual 2d array. For examle:

enter image description here

where circles are hexagons.

I can store this map as:

0 1 0
1 0 1
0 1 0
1 0 1
0 1 0

于 2012-08-03T10:00:39.883 回答