3.6 Common Lisp Hex grid library ================================ This project is related to *Note cl-rebonoise:: and also a part of my interest in turn-based strategy games based on hexagonal grids. Another point in common is that it is also based on Amit Patel's 'Implementation of Hex Grids' (1). [images/cl-hexgrid] The project uses Sketch (2) for an interactive example of what can be done: • Draw hex grids of different shapes and sizes. • Show and convert different coordinate systems. • Draw a line between hexes. It can be loaded using Quicklisp (3): * (ql:quickload "cl-hexgrid-examples") To load "cl-hexgrid-examples": Load 1 ASDF system: cl-hexgrid-examples ; Loading "cl-hexgrid-examples" .................................................. [package cl-hexgrid].............................. [package cl-hexgrid-examples].. ("cl-hexgrid-examples") There are still some missing things, considering the reference guide, but while I think I will eventually get to them, they were outside my initial scope (e.g., visibility calculation). On the other hand, I have added a couple of small additions, like an initial conversion to the coordinate system used in D&D's World of Greyhawk (4). The source can be found at Codeberg (5). ---------- Footnotes ---------- (1) Amit Patel's 'Implementation of Hex Grids' (https://www.redblobgames.com/grids/hexagons/implementation.html) (2) Sketch (https://github.com/vydd/sketch/tree/master) (3) Quicklisp (https://www.quicklisp.org/beta/) (4) World of Greyhawk (https://www.greyhawkonline.com/greyhawkwiki/Greyhawk) (5) Codeberg (https://codeberg.org/fsm/cl-hexgrid)