
<aside>
💡
Resolutions describes the layers of hexagons the game’s map is built on, and the data structures it entails
</aside>
- Layers of Hexagons
- Tile/hex
- chunk
- a symmetrical area of tiles/hexes
- contains the units, structures, etc. that are inside of the chunk in terms of their tile
- map
- the entire map, in the shape of a hexagon of course, made up of chunks
Code examples
Trying to get a unit at a specified coordinate
game_state.map.unit_at(hex);
- uses resolutions (lower res, higher res) to find the unit from inside the chunk
- resolutions describes the layers of encapsulation
- in this case it’s map which encapsulates chunks which encapsulates tiles/hexes
- lower res goes up. So from tile/hex → chunk
- higher res goes down. So from chunk → tile/hex (center of chunk)
Drawing



https://excalidraw.com/#json=BGxrwa8HrsbWkpTMCvnCB,Nje2w0J4Uje3mpVUYjGnmA