Skip to content

joeld42/hexplanet

Repository files navigation

hexplanet

HexPlanet Demo

By Joel Davis -- [email protected]

This is a demo of a technique to tile a spherical planet with hex tiles, for example for use in a strategy game.

Hex Planet Screenshot

The demo includes a white paper about how the tiling works and source code for the demo. It's released under a BSD style license, so feel free to use any of this in your own projects.

Please read the HexPlanet White Paper for a technical description of the technique. The PDF is also included in the git repo.


This is an initial prototype that I made quite a few years ago to play with the idea of building a hex grid on a spherical planet. It's kind of a prototype, proof-of-concept thing.

Some of this code eventually became Planet Minesweeper, even though I rewrote most of the rendering for that, the drawing code in this example is pretty inefficient. One day I will backport those changes from Planet Minesweeper to this example.

Planet Minesweeper

Building the code

I'm including the last build of this for windows, I don't have a windows box set up anymore to build it. It shouldn't be too hard to build somewhere else, everything used in here is pretty portable, I just haven't set up build files and stuff yet. If you do this, please let me know.

I'd love to see a Civ-type game built like this, maybe one day I'll get around to building one myself.

You can use this code for whatever use you want, if you make something cool with it I'd love to hear about it!

About

Hex Planet Demo/Example

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published