Re:Hexagonal Grids
by vortico on Sunday June 25, 2017 @07:47AM
(#14629617)
I remember using this article to create this dumb game! https://andrewbelt.name/hexgame/ Hexagons have a lot of neat geometrical properties like their tight packing and symmetry, yet their ability to be indexed easily with two coordinates.
Re:Hexagonal Grids
by mysterydip on Sunday June 25, 2017 @07:24AM
(#14629570)
What's nice about hex grids is it's actually easy to implement as a regular 2D array by just using simple "if odd add 1" type math to traversing/displaying. This article was immensely helpful to me finally wrapping my head around their implementation.
And man it gets hard on maps where there's only one hex between regions. Long protracted battles. Like real life, I suppose.
https://gamedev.stackexchange.com/a/68271
https://en.wikipedia.org/wiki/Truncated_square_tiling
(not the author, just a guy who bought his book)