Skip to main content
updated project URL as codeplex is going offline soon, moved raw URL into a text link, fixed typos, added code markdown, removed edit break
Source Link
Pikalek
  • 13.4k
  • 5
  • 49
  • 54

I have just postdposted a library of hex-grid utilites on CodePlexhex-grid utilities.com here: https://hexgridutilities.codeplex.com/ The

The library includes path-finding (using A-* a la Eric Lippert) and includes utilitesutilities for automated conversion between jagged (termed User) cordinatescoordinates and non-jagged (termed Canonical) coordinates. The path-findingnfinding algorithm allows the step cost for each node to vary both with the entry hex and te traversed hex-side (though the example provided is simpler). Also, elevated field-of-view using shadow-casting is provided, [edit: words removed].

IntMatrix2DIntMatrix2D and IntVector2DIntVector2D are [edit: homogeneous]homogeneous integer implementations of affine2D Graphics Vector and Matrix. The final divide by 2 on the vector applications is to re-normalize the vectors; this could be buried in the IntMatrix2DIntMatrix2D implementation, but then the reason for the 7th argument to the IntMatrix2DIntMatrix2D constructors is less obvious. Note the combined caching and lazy-evaluation of non-current formulations.

The code library mentioned above provides a similarly elegant mechanism for hex-picking (iei.e. identifying the hex selected with a mouse click).

In Canonicalcanonical coordinates, the 6 cardinal direction-vectors are (1,0), (0,1), (1,1) and their inverses for all hexagons, without the assymmetryasymmetry of jagged coordintescoordinates.

I have just postd a library of hex-grid utilites on CodePlex.com here: https://hexgridutilities.codeplex.com/ The library includes path-finding (using A-* a la Eric Lippert) and includes utilites for automated conversion between jagged (termed User) cordinates and non-jagged (termed Canonical) coordinates. The path-findingn algorithm allows the step cost for each node to vary both with the entry hex and te traversed hex-side (though the example provided is simpler). Also, elevated field-of-view using shadow-casting is provided, [edit: words removed].

IntMatrix2D and IntVector2D are [edit: homogeneous] integer implementations of affine2D Graphics Vector and Matrix. The final divide by 2 on the vector applications is to re-normalize the vectors; this could be buried in the IntMatrix2D implementation, but then the reason for the 7th argument to the IntMatrix2D constructors is less obvious. Note the combined caching and lazy-evaluation of non-current formulations.

The code library mentioned above provides a similarly elegant mechanism for hex-picking (ie identifying the hex selected with a mouse click).

In Canonical coordinates, the 6 cardinal direction-vectors are (1,0), (0,1), (1,1) and their inverses for all hexagons, without the assymmetry of jagged coordintes.

I have just posted a library of hex-grid utilities.

The library includes path-finding (using A-* a la Eric Lippert) and includes utilities for automated conversion between jagged (termed User) coordinates and non-jagged (termed Canonical) coordinates. The path-finding algorithm allows the step cost for each node to vary both with the entry hex and te traversed hex-side (though the example provided is simpler). Also, elevated field-of-view using shadow-casting is provided, [edit: words removed].

IntMatrix2D and IntVector2D are homogeneous integer implementations of affine2D Graphics Vector and Matrix. The final divide by 2 on the vector applications is to re-normalize the vectors; this could be buried in the IntMatrix2D implementation, but then the reason for the 7th argument to the IntMatrix2D constructors is less obvious. Note the combined caching and lazy-evaluation of non-current formulations.

The code library mentioned above provides a similarly elegant mechanism for hex-picking (i.e. identifying the hex selected with a mouse click).

In canonical coordinates, the 6 cardinal direction-vectors are (1,0), (0,1), (1,1) and their inverses for all hexagons, without the asymmetry of jagged coordinates.

deleted 9 characters in body
Source Link

I have just postd a library of hex-grid utilites on CodePlex.com here: https://hexgridutilities.codeplex.com/ The library includes path-finding (using A-* a la Eric Lippert) and includes utilites for automated conversion between jagged (termed User) cordinates and non-jagged (termed Canonical) coordinates. The path-findingn algorithm allows the step cost for each node to vary both with the entry hex and te traversed hex-side (though the example provided is simpler). Also, elevated field-of-view using shadow-casting is provided, though without any sample code[edit: words removed].

I have just postd a library of hex-grid utilites on CodePlex.com here: https://hexgridutilities.codeplex.com/ The library includes path-finding (using A-* a la Eric Lippert) and includes utilites for automated conversion between jagged (termed User) cordinates and non-jagged (termed Canonical) coordinates. The path-findingn algorithm allows the step cost for each node to vary both with the entry hex and te traversed hex-side (though the example provided is simpler). Also, elevated field-of-view using shadow-casting is provided, though without any sample code.

I have just postd a library of hex-grid utilites on CodePlex.com here: https://hexgridutilities.codeplex.com/ The library includes path-finding (using A-* a la Eric Lippert) and includes utilites for automated conversion between jagged (termed User) cordinates and non-jagged (termed Canonical) coordinates. The path-findingn algorithm allows the step cost for each node to vary both with the entry hex and te traversed hex-side (though the example provided is simpler). Also, elevated field-of-view using shadow-casting is provided, [edit: words removed].

Noted that IntVector2D and IntMatrix2D are homogeneous implementations
Source Link

IntMatrix2D and IntVector2D are [edit: homogeneous] integer implementations of affine 2Daffine2D Graphics Vector and Matrix. The final divide by 2 on the vector applications is to re-normalize the vectors; this could be buried in the IntMatrix2D implementation, but then the reason for the 7th argument to the IntMatrix2D constructors is less obvious. Note the combined caching and lazy-evaluation of non-current formulations.

IntMatrix2D and IntVector2D are integer implementations of affine 2D Graphics Vector and Matrix. The final divide by 2 on the vector applications is to re-normalize the vectors; this could be buried in the IntMatrix2D implementation, but then the reason for the 7th argument to the IntMatrix2D constructors is less obvious. Note the combined caching and lazy-evaluation of non-current formulations.

IntMatrix2D and IntVector2D are [edit: homogeneous] integer implementations of affine2D Graphics Vector and Matrix. The final divide by 2 on the vector applications is to re-normalize the vectors; this could be buried in the IntMatrix2D implementation, but then the reason for the 7th argument to the IntMatrix2D constructors is less obvious. Note the combined caching and lazy-evaluation of non-current formulations.

added 168 characters in body
Source Link
Loading
Added code sample with documentation
Source Link
Loading
Added code sample with documentation
Source Link
Loading
Source Link
Loading