Closed ManevilleF closed 3 months ago
Added a storage optimized HexagonalMap utilizing some tricks to be able to store hex maps in a 2d vector instead on having to rely on hashmaps.
HexagonalMap
See https://www.redblobgames.com/grids/hexagons/#map-storage
This implementation only supports:
storage.
This can be useful for large hexagon shaped maps, as well as for chunk based maps, chunking would usually be of hexagonal shape.
The benchmarks are mind blowing, On a 300 range (271k hexagons) the result goes from 11.145 ms to 775.89 µs it's more than 10x faster
11.145 ms
775.89 µs
Work done
Added a storage optimized
HexagonalMap
utilizing some tricks to be able to store hex maps in a 2d vector instead on having to rely on hashmaps.Usage
This implementation only supports:
storage.
This can be useful for large hexagon shaped maps, as well as for chunk based maps, chunking would usually be of hexagonal shape.
TODO