HexGrid 1.0.1 Scripts 4.5 Community
Submitted by user davidboivinbambi; MIT; 2026-11-04
HexGrid is a module for hexagonal grids whose logic does not depend on the visual. Display the grid with a TileMapLayer, Polygon2D nodes, _draw() or 3D, or use it without any visual (server, AI, tests).
Features:
- HexCoords: axial and cube coordinates, distance, neighbors, range, ring, spiral, line, map shapes (hexagon, parallelogram, triangles, rectangle), and conversions to the four offset layouts of a TileMapLayer (Stacked and Stacked Offset, pointy or flat top).
- HexGrid: a Resource that stores one value of any type per cell, can be saved as a .tres file, and emits a cell_changed signal to keep the visual up to date.
- Pathfinding: breadth-first search, Dijkstra with a movement budget, greedy best-first search and A*, with a cost function per unit type.
- HexLayout: conversions between cells and pixel positions.
The repository includes five example scenes sharing one script (flat and pointy top, perspective), with unit selection, movement area, range and paths, plus a user guide and a technical guide in English and French.
Installation: the download only contains addons/hex_grid/. No plugin to enable: the classes are available as soon as Godot has imported the folder.
View files Download Submit an issue Recent Edits