This project is read-only.
Project Description
Jemgine.Hex implements a subdivideable hexagonal grid for XNA projects. Jemgine.Hex makes it easy to create hexagonal grids in vertical and horizontal orientations and to do mouse picking on them. It's written in C#.

All source is for XNA 4.0, but the library itself will compile against XNA 3.1 if it's references are changed. The demo project will not.

The HexDemo project contains examples of
*Rendering hexagonal grids
*Generating a series of subdivided grids
*Detecting the tile under the mouse of several subdivision levels

In the Demo, press 1, 2, or 3 to generate different subdivision.
The demo may run slow; it uses a very in-efficient rendering method.

If you want to use Jemgine.Hex without XNA, all you need to do is replace XNA's Vector2 with an alternate 2d vector implementation. Unfortunately, you'll have to write your own code to draw hexes.

A simple 2-level AlternateOrientation subdivision.

A more complex 4-level AlternateOrientation subdivision.

Vertical hexes subdivided using DivideByThree.

Horizontal hexes subdivided using DivideByThree.

Last edited Aug 22, 2010 at 4:57 AM by Blecki, version 5