So I made a hexagonal tilemap of ocean tiles and then picked a few tiles to be land. When I pick all adjacent tiles to the hexagon it usually works, but for tiles that are on certain columns it does not. Also, on these columns the tops and bottoms of tiles are missing.
It's hard to explain but here's a screenshot that should clear it up:
As you can see, on every other column the top and bottom of hexagons are missing, when all adjacent tiles are filled in to the centre tile it works fine for those columns without a bottom and top on hex, but when it's on the other column one of the adjacent tiles is displaced.
Any suggestions?
Code:
baseLayer.setCell((int)islands[currentTile].x , (int)islands[currentTile].y, landCell);
baseLayer.setCell((int)islands[currentTile].x + 1, (int)islands[currentTile].y + 1, landCell);
baseLayer.setCell((int)islands[currentTile].x + 1, (int)islands[currentTile].y, landCell);
baseLayer.setCell((int)islands[currentTile].x , (int)islands[currentTile].y - 1, landCell);
baseLayer.setCell((int)islands[currentTile].x - 1, (int)islands[currentTile].y, landCell);
baseLayer.setCell((int)islands[currentTile].x , (int)islands[currentTile].y + 1, landCell);
baseLayer.setCell((int)islands[currentTile].x - 1, (int)islands[currentTile].y + 1, landCell);