Many games use a set of square tiles for pathfinding and grid snapping. This grid is not a very good approximation of real life, and can be replaced with a hexagonal grid which may be more visually appealing or help gameplay. The main problem with this is that some easy pathfinding functions in GM, etc. only support square tiles.
With this in mind, and considering making a tactics game using hexagonal tiles, I created a DLL for pathfinding in a hexagonal grid. The basics were done in three days. In another two days, I mananged to improve it to the point where I cannot improve its speed any more without significant effort.For my convenience, and as an aid to others, I have compiled an extension for GM.Screenshot:Links:Direct DownloadGMC Topic (Please comment here)Data Dump:Hexes [G3D]
Posted by Gamer3D on Aug. 6, 2008, 11:53 a.m.
I don't see how hexagonal cells have any real benefits, considering that I imagine they'll be slower than using a square grid?
No, they are not slower. They are acutally faster (only 6 neighbors instead of 8).
You can't draw horizontal lines with hexagons though.
Using 8 implies you're using a more hexagon based system. Grid should imply lack of diagonals, because maybe the squares don't want to play octogon for once
Well I don't have a use for it :/
I couldn't come up with a better name for hexagons than "grid". Horizontal lines are made by repeated up and down movements.