mapeditor / tiled

Flexible level editor
https://www.mapeditor.org/
Other
11.26k stars 1.76k forks source link

Add Hexagonal Isometric projection #1508

Open bjorn opened 7 years ago

bjorn commented 7 years ago

Currently Tiled supports Hexagonal maps with offset coordinates. There are other possible coordinate systems, and one of them is Axial coordinates. This can actually be used already in Tiled using the Isometric projection, as illustrated by Galdred on the forum:

eb9adb437a2e4d7da9b1553d2082848c033a063e

This issue is about adding a new "Hexagonal (Isometric)" or "Hexagonal (Axial)" (not sure about the best name) projection that derives from the IsometricRenderer and performs things like grid rendering and mouse picking correctly for hexagonal tiles.

Hopefully we can re-use the existing hexagonal map related properties, though their names would be a bit confusing (whether the hexagons are flat topped or pointy topped depends on the "stagger axis" property, and there is no staggering axis when using axial coordinates). The property could be renamed to "Hexagon Orientation" with values being either Horizontal / Vertical or Flat Topped / Pointy Topped.

eishiya commented 3 years ago

Popping in to say that renaming the stagger axis property to "Hexagon orientation" would make it easier to understand in general in my opinion, even if this projection isn't added. For the values, I think "Flat Top"/"Pointy Top" would be easy to understand, and concise.

bjorn commented 3 years ago

@eishiya True, though the stagger axis property also applies to staggered isometric maps, where "flat top" and "pointy top" make no sense.

eishiya commented 3 years ago

Aye, but I think it would be nice to see some intuitive naming, even if it's the same property under the hood.

Of course, support for axial coordinates would be even better xP