Live data from Hacker News

Hexagonal Grids (2013)

redblobgames.com

11–20 of 77 posts

Re: Hexagonal Grids (2013)

#11
Ah, I wish I had come across this two weeks ago!

I've been doodling with Processing and was working on hexagonal Truchet tiles. (basically random tiles that have paths connecting to any random tiles next to it, with hexagons as tiles instead of squares)

I ended up having to figure out some of that stuff again, in particular the coordinate system inside each tile so that I could deal with integer coordinates and translate them into the right fraction of the radius.

It was fun to figure out what I needed, so I don't regret it :)

And I am also planning on doing something with cubes, so this page will come in handy.

Thanks for sharing! I love how it covers all aspects of the problem.

Result of the tiling: https://twitter.com/_timothee/status/1330315929641570304

Diagram of my coordinate system: https://twitter.com/_timothee/status/1327859098642046976

Re: Hexagonal Grids (2013)

#12
I almost never use bookmarks any more, but I’ve had this page bookmarked for the better part of a decade now and still refer to it at least once a year, and I don’t even work in game development.

Re: Hexagonal Grids (2013)

#15
FWIW, I strongly prefer square grids for tabletop games.

Hexagonal grids give you precise measurements in exactly 6 directions.

If you approximate sqrt(2) as 1.5 then square grids give you pretty darn accurate measurements in 8 directions, including 2 pairs of directions that are orthogonal, which is good for rectangular features like buildings.

Furthermore the distance between two points can be quickly calculated with (long-side + 1/2 short-side), which is doable in your head, unlike the distance calculation on a hex grid.

Lastly, if you divide the circle into a large number of slices and calculate the average error for path distance using hex or squares, among those slices, the average error (compared to pythogorean) is smaller with squares (obviously for small multiples of 6 and small multiples of 8 respectively, one or the other will be preferred).

Re: Hexagonal Grids (2013)

#18

Ah, I wish I had come across this two weeks ago! I've been doodling with Processing and was working on hexagonal Truchet tiles. (basically random tiles that have paths connecting to any random tiles next to it, with hexagons as tiles instead of squares) I ended up having to figure out some of that stuff again, in particular the coordinate system inside each tile so that I could deal with integer coordinates and trans…

Sweet! I love Truchet Tiles. (Did you know Truchet was a priest in the 18th century?[0]) I see that Apple's Motion has a Truchet tile generator[1], too.

[0] https://en.wikipedia.org/wiki/Sébastien_Truchet [1] https://support.apple.com/en-afri/guide/motion/motn5d6778a0/...

Re: Hexagonal Grids (2013)

#20
post #15

FWIW, I strongly prefer square grids for tabletop games. Hexagonal grids give you precise measurements in exactly 6 directions. If you approximate sqrt(2) as 1.5 then square grids give you pretty darn accurate measurements in 8 directions, including 2 pairs of directions that are orthogonal, which is good for rectangular features like buildings. Furthermore the distance between two points can be quickly calculated wi…

I always found the hex grid useful in Battletech as your facing has an impact on where you get hit and having 6 sides provides more potential combinations of facing.
Post reply on HN