Git Product home page Git Product logo

hexplanet's Introduction

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!

hexplanet's People

Contributors

bstormweb avatar joeld42 avatar nedbrek avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.