This is cool. I recently wrote an A* pathfinding system for a hex based game. Choosing a good coordinate system 100% makes this easier.
Which one did you go for?
Hexagonal Grids (2013)
71–77 of 77 posts
Re: Hexagonal Grids (2013)
#72Earlier 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.
The biggest issue with adapting it to multiplayer (tabletop) games would be splitting the party. If the party splits, finding a path back together (without just backtracking) can become effectively impossible. Visualizing the spatial relationship between widely spaced points in hyperbolic space is also really hard.
Re: Hexagonal Grids (2013)
#73Earlier quoted context omitted.
I haven't seen the 1.75 approximation; I'll have to work that out on paper later.
No need. I got you fams sqrt(3) = 1.73205080757 https://duckduckgo.com/?q=sqrt+3&ia=calculator
Re: Hexagonal Grids (2013)
#74FWIW, 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.
Re: Hexagonal Grids (2013)
#75Earlier quoted context omitted.
> 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…
> 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. As promised in a sibling comment I would work it out on paper. By my path, using the 7/4 approximation for sqrt(3), the ratio between X and Y directions is 12:21 which is much harder to do in your head than the 3:2 that a square grid gives you. However, a simpler approximation o…
Well, yes, 4:7 is 12:21.
But I think 4:7 is a lot easier to do in your head than 12:21 (3:5 is a little easier, at the expense of being less accurate); not sure why you did all that work to make it more complicated when you started with a fraction that gave you the ratio in its simplest form.
Re: Hexagonal Grids (2013)
#76Earlier quoted context omitted.
Which one did you go for?
I went with what they call the "Axial coordinates". I think the alternative, "Cube coordinates", causes a lot of issues and confusion when writing game logic.
Re: Hexagonal Grids (2013)
#77I remember this page. I used it almost a decade ago when implementing a settlers of catan clone for that was going to be the main project for a class curriculum. I was a TA/RA at the time. It's a great page. It was invaluable to me.
Any chance you still have that project/curriculum? Would love to see it.
This was for BYU CS 340. If you search those on GitHub you can probably find some students' implementations. The whole class was about working as a group and design patterns.