I use a spreadsheet to figure this out but my calculations are different than Tileds.
What’s the formula for computing the total pixel size height and width of a hexagon map?
Thanks.
I use a spreadsheet to figure this out but my calculations are different than Tileds.
What’s the formula for computing the total pixel size height and width of a hexagon map?
Thanks.
The best reference may be the source code:
The RenderParams
class is a small helper class that computes the columnWidth
and rowHeight
from the map parameters (if you follow the link, you can scroll a bit up to see this class).
To get at these calculations I basically just drew the hex grid on a piece of paper and determined the width/height added by each column/row of tiles, plus any extra space due to the staggering (only when stagger axis is longer than one tile) and hex shape.
Thanks this is helpful.