Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Hexagonal Grids (redblobgames.com)
174 points by guiambros on June 24, 2017 | hide | past | favorite | 18 comments


I remember using this article to create this dumb game! https://andrewbelt.name/hexgame/ Hexagons have a lot of neat geometrical properties like their tight packing and symmetry, yet their ability to be indexed easily with two coordinates.


I made a Tiled library for Monkey X supporting hexes with the help of this article.


Well, that occupied way more time than I'd intended! Thanks!

And man it gets hard on maps where there's only one hex between regions. Long protracted battles. Like real life, I suppose.


That's incredibly fun. Have you considered making an Android/iPhone version?


No, but I probably should. Maybe I'll use a cheap web view app bundler so I don't have to port the code. I don't know much about that field.


Check out Influence by Teremok Games on Android. Nicely done hex-based strategy game, and one of the best Android games I've played period.


Wow. I need to close that right away :) (yeah, I work on Sundays, OK?)


Fun game and hilarious homepage!


What a fun game! Thank you!


This is amazing! Thanks


this game should exist on Android/iPhone



What's nice about hex grids is it's actually easy to implement as a regular 2D array by just using simple "if odd add 1" type math to traversing/displaying. This article was immensely helpful to me finally wrapping my head around their implementation.


The "cube coordinate system" described here with a redundant third coordinate is similar to the Bravais-Miller indexes used in crystallography for hexagonal and trigonal crystals https://en.wikipedia.org/wiki/Miller_index#Case_of_hexagonal...



I had a lot of fun working through this in the context of building mazes, e.g. http://weblog.jamisbuck.org/2015/11/28/upsilon-mazes.html

(not the author, just a guy who bought his book)


I love this post. I found it years ago and used it to make a toy game I always wanted to try. It's awesome.


Oh I love these articles. Greatly suggested.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: