Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Implementation of Hex Grids (redblobgames.com)
174 points by qzervaas on May 13, 2015 | hide | past | favorite | 15 comments


Don't skip the absolute awesome "main page" where everything is extensively explained with interactive javascript samples.

http://www.redblobgames.com/grids/hexagons/


Yes, this page is a must.

Also, this problem has some relevance outside of games: http://vincentwoo.com/2013/03/08/above-and-beyond-the-affirm...


I built my first iOS game[1] last year using Amit's original hexagon guide. This new guide would have been useful too. Still makes for good reading now.

[1] http://hexiledgame.com


nice game. An annoying bug though, most of the times when the game is interrupted (by receiving a phonecall, or simply clicking the home button then opening again) nothing is clickable anymore and you have to kill it and re-run in order to get it to work again.


Thanks. That issue only started with iOS 8.3, still trying to track down the cause. Very frustrating, since the app hasn't been updated since before 8.3.


As a solid state physicist for me the axial coordinates are tho most straightforward. I'm tempted to do design a game level on the hyperbolic plane, there are more exotic tilings there [1]. Designing textures for it would be quite a challenge. I think there are some simple graphics puzzle games already on the hyperbolic plane.

[1] https://en.wikipedia.org/wiki/Octagonal_tiling


Have you seen HyperRogue? http://www.roguetemple.com/z/hyper/


Yeah, played that and really liked the concept. I didn't really like the gameplay itself though. I wonder how a Heroes III bottle would look like on the hyperbolic plane.


Its one of my favourite games on the Pandora at the moment, really mind-bending way to while away the idle moments...


Writing a hex libary has been on my todo-list for a while. Just writing the code, while useful for experts, is not enough though, you need documentation and examples. Making people understand how hex'es work is a noble task, but most ppl just want to be productive and create their dream game, without having to speed years in school first.


Engineers have been doing this since the 1950s with a data structure called the Finite Element Mesh, ar arbitrary shaped computation grid.


I've started implementing a Hexagon Grid based on this source of informaion if you are interested:

https://github.com/adam-arold/hexameter

I've also used axial coordinates. Most of the features are working but some advanced ones are not yet complete.



I've been thinking about how to model hex-grids in the context of building a online version/solver for Tantrix http://www.tantrix.com/


Wow, this blog is a great resource. Thank you.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: