Hex PlanetHex Planet

August 03, 2012

This is the prototype of what eventually became Planet Minesweeper. This was an experiment to see if I could tile a planet with only hexes, for an idea for a strategy game.

Even though this is mathematically impossible, I didn't let that stop me. There's a clever way to do it if you sneak a few pentagons in there. (See if you can spot a few in the screenshot). Also I'm pretty happy with the way the hexagons are constructed, notice that there's just under 2 triangles per hexagon on average. This lets me get away with drawing huge planets even on a first gen iPad.

Hexplanet Prototype

I also wrote up a little Hex Planet White Paper if you're interested in the technical details. It includes a description of a pretty good way to generate random continents, too, and some other ideas to extend this to a civ-type strategy game.

I posted this prototype online a while ago, well before I started working on Planet Minesweeper. But recently I moved the code to github. You can find it here: Hexplanet Proto on Github.

The repo includes a prebuilt exe for windows. It shouldn't be too hard to build on Linux or Mac, I just haven't had a chance to clean up the build files. Also, I've cleaned up a lot of the drawing code for Planet Minesweeper, and ported it to ES2, I will backport that to the proto eventually.

I still get occasional emails asking about making a civ-type game using this. I still want to do that eventually, and maybe I will, but I've got a few other project planned before I even start thinking about that. But if anyone out there wants to use this and thinks this code might help, go for it! I'd love to play it.


<< Back to all Blog Posts

Sign up to receive news, updates and promo codes!

Mailings are infrequent (fewer than once a month).

Copyright © 2016-2020 Tapnik