Reputation: 704
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
Upvotes: 0
Views: 646
Reputation: 704
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:
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
Upvotes: 1