Live data from Hacker News

Hexagonal Grids (2013)

redblobgames.com

31–40 of 77 posts

Re: Hexagonal Grids (2013)

#31
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…

> Hexagonal grids give you precise measurements in exactly 6 directions.

Square grids give you precise measurements in exactly 4.

> 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

If you approximate sqrt(3) as 1.75, then hex grids give you pretty darn accurate measurements in 12 directions, including 3 pairs of directions that are orthogonal.

(If square grids have an advantage here, it's that the quantum of measurement the same on each axis of each orthogonal pair, 1 on one axis and 1.5 on the other; whereas each orthogonal pair on a hex grids has one axis with quantum 1 and one with quantum 1.75.)

> 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.

The equivalent loose approximation on a hex grid would seem to be long direction minus 1/4 short direction, which doesn't seem any harder.

Re: Hexagonal Grids (2013)

#32
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 like octagonal grids. Sure, you have to have your game in hyperbolic space, but you can have accurate movement in 8 directions. Your players will just have to deal with parallel lines diverging, there being unique things like pseudocycles, horocycles, circles with a circumference that grows exponentially with increasing radius, etc. Sadly such geometry isn't supported by any tabletop software I'm familiar with, and…

A HyperRogue fan? If not definitely check it out. I don't see why that kind of program couldn't be adapted for digital tabletop games.

Re: Hexagonal Grids (2013)

#34
An added challenge is to efficiently construct hex grids by hand——quickly, at the expense of accuracy. I didn’t have access to a printer early in the pandemic, but wanted to put together maps for a tabletop rpg. This is a clever solution: http://www.rdwarf.com/users/wwonko/hex/irregular/ It has the added benefit of being easy to remember

Re: Hexagonal Grids (2013)

#35
post #32

Earlier quoted context omitted.

I like octagonal grids. Sure, you have to have your game in hyperbolic space, but you can have accurate movement in 8 directions. Your players will just have to deal with parallel lines diverging, there being unique things like pseudocycles, horocycles, circles with a circumference that grows exponentially with increasing radius, etc. Sadly such geometry isn't supported by any tabletop software I'm familiar with, and…

A HyperRogue fan? If not definitely check it out. I don't see why that kind of program couldn't be adapted for digital tabletop games.

Hyperbolica devlog: https://www.youtube.com/playlist?list=PLh9DXIT3m6N4qJK9GKQB3...

Re: Hexagonal Grids (2013)

#37
And if you want something cool to do with this, try implementing Gliński's variant of chess.

It’s something I’m dabbling in, but no doubt an order of magnitude more difficult to implement than orthodox chess.

The idea of indexing by cubes is so obvious once you discover it, but maybe not as easy to intuit. Same goes for the data structures.

Re: Hexagonal Grids (2013)

#38
A surprise to be on HN!

Tech notes for the curious:

I started the page in 2013 based on notes I had been collecting for ~20 years before that. I update this reference page as I come up with better visualizations and explanations. The last major update was in 2018 when I rewrote it from using d3.js to using vue.js. It greatly reduced the amount of code I was writing, and also let me make the page more interactive. I then added lots more (doubled coordinates, links to papers, axes legends, diagonal directions, side by side comparisons) and improved most of the existing sections. In 2019 the changes were minor, rewriting the map storage section and improving performance. In 2020 I improved the cube/hex animation, the pixel-to-hex section, and added Rust sample code. There's lots more I could add to the page[1] but I don't have any specific plans for when I'll get around to it.

The page is svg- and js-heavy. I prerender the diagrams on the server (try loading it without js!). Then using IntersectionObserver on each section of the page, I swap the static diagrams and text with interactive versions. This improves load times somewhat, because almost no JS has to run on page load.

For printability I process the page with xsltproc, extract all the links, and turn them into footnotes. Try print preview on the page to see these. Unfortunately the diagrams are broken when printing in Chrome (it works in Firefox) so I need to investigate.

[1]: https://www.notion.so/redblobgames/f8bc2f44fba94607afa9c0671...

Post reply on HN