Hexagen Lua Library (Hexagonal Grid Generation)

I wrote this because I wanted to generate a Settlers of Catan board without manually writing down all the coordinates for hexes, and the intersections between hexes.

Hexagen allows you to generate a hexagonal grid with legs of any length. It also includes A* so you can implement pathfinding through the grid.

Hexagen creates both the hexagonal grid, and the grid between hexes. Both of these grids are linked, although you can only pathfind across one at a time.

I've uploaded my entire test gamemode if you need to play around with the settings or see how to use it.

https://github.com/Wigguno/Hexagen

https://github.com/Wigguno/Hexagen/blob/master/game/dota_addons/hexagen/scripts/vscripts/hexagen.lua?ts=4

some screenshots:
http://i.imgur.com/fy4h1Ci.jpg
http://i.imgur.com/yqYCS8o.jpg
http://i.imgur.com/hpr6ryz.jpg

Comments

  • edited September 2015 Posts: 188

    Cool! Though Can't figure out dota 2 project I would use it on. :D

  • lol 6 player checkers? xD

  • Posts: 14

    Does it mean it is possbile to make boardgame style custom game? Like Heroes V? xD

    enter image description here

    Looking for a modd team for this project: War of Kingdoms Let's make it happen!

  • @HelluVa: I don't see why not. Creating turn-based system would be quite easy. Translating predetermined grid to vectors is what this lib seems to do.

  • edited November 2015 Posts: 14

    Turn based RPG Boardgame in Dota2 can also be nice. :)) Roll a dice, move, fight, do a quest etc. Dungeons and Dragons style.

    enter image description here

    Looking for a modd team for this project: War of Kingdoms Let's make it happen!