Hacker News new | ask | show | jobs
by xvedejas 1966 days ago
How does one define a coordinate system on such a grid? I considered making a game with the same kind of grid (five squares meet at each corner) but I just couldn't figure out how to individually address each cell in a way which allows easily finding which other cell IDs must be neighbors.
3 comments

I have written a quite detailed explanation of this here: http://roguetemple.com/z/hyper/dev.php
I second this as a great resource! Your game HyperRogue was also a big inspiration for this game.
There is a teensy explanation on the about page: https://sokyokuban.com/#about

I'm sure the authors would also be more than happy to answer that question.

https://www.redblobgames.com/grids/hexagons/ is the goto resource for this, at least for hexagons
It is a great resource for Euclidean hexagons, but non-Euclidean tilings are a different thing. (He does a bit of spherical geometry in his other articles.)