Frage

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

War es hilfreich?

Lösung

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

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top