How to use hexagon Tiled map?



  • Hi guys,

    I can use flixel.tile.FlxTilemap and flixel.addons.tile.FlxTilemapExt to draw a map whose orientation is orthogonal.
    But it seems like not support hexagonal map?

    Is there any way to use hexagon map edit by Tiled Map Editor?
    Or how to write my own Tilemap class, any tutorial or document or sample code?

    Thanks,
    DCChuang



  • It's a bit more more complex, but I once made a hexagon map by looping through the map like you would if you were inserting enemy/item sprites, but instead inserted hexagon-shaped FlxSprites. The trick is, every other row, you add an offset equal to half of the tile width.


Log in to reply