Skip to content

Hexameter is a hexagonal grid library written in java. It supports rectangular shaped hexagonal grids, triangular shaped hexagonal grids and hexagon shaped hexagonal grids.

License

Notifications You must be signed in to change notification settings

mirrorshot/hexameter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hexameter

Hexameter is a hexagonal grid library. The motivation behind it is to have an optimized, simple and usable library for drawing hexagonal grids without being tied to any GUI framework. So it works on Android, SWT, Swing, you name it! It is 100% unit tested so you don't have to worry about something going wrong.

I'm open to suggestions, feel free to comment or to send me a message. Pull reqeusts are also welcome!

Possible grid layouts:

  • Hexagonal
  • Triangular
  • Rectangular
  • Trapezoid
  • Custom

Supported operations

  • Getting a hexagon by its grid coordinate
  • Getting a hexagon by its pixel coordinate
  • Getting the neighbors of a hexagon
  • Calculating the distance between two hexagons
  • Calculating the movement range from a hexagon
  • Pathfinding with obstacles

Miscallaneous operations

  • Adding/removing a Hexagon from the grid
  • Checking whether a Hexagon is on a grid or not
  • Supplying a custom storage object
  • Adding custom data to a Hexagon
  • Clearing all custom data from the HexagonalGrid
  • Getting a subset of Hexagons from the grid

Roadmap:

  • Field of view calculation with obstacles
  • Movement range with obstacles
  • Swing JPanel extension component

License

Hexameter is made available under the MIT License.

Credits

Thanks to Adam Arold for the big work Thanks to user georgeek This version by Daniele Brambilla

About

Hexameter is a hexagonal grid library written in java. It supports rectangular shaped hexagonal grids, triangular shaped hexagonal grids and hexagon shaped hexagonal grids.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%