![]() ![]() ![]() A grid map will likely need additional storage for terrain, objects, units, etc. ![]() For offset coordinates, I’ll make a separate data structure Offset. Cube and axial are basically the same so I’m not going to bother implementing a separate axial system, and I’ll reuse Hex. For some games I want to show coordinates to the player, and those will probably not be cube, but instead axial or offset, so I’ll need a data structure for the player-visible coordinate system, as well as functions for converting back and forth.Since most of the algorithms work with cube coordinates, I’ll need a data structure for cube coordinates, along with algorithms that work with them.The first thing to think about is what the core concepts will be. Now let’s write a library to handle hex grids. The main page covers the theory for hex grid algorithms and math. The data structures and functions here implement the math and algorithms described on that page. Note: this article is a companion guide to my guide to hex grids. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |