I have a first version of my Blinks Mapping Library. For now it just deals with maintaining the map itself so there is no support for the complicated part of actually making every blink know about every other blink in a cluster (but this will come).
The API is not frozen in stone. Specially the position iteration functions that take a function pointer will most likely change (Doing it like I did is taking a lot of storage space), but the general idea is there.
How it works:
1 - You first need to determine what is the maximum width and height of the map you want to maintain. If you use the custom Blinklib and disable or tweak the maximum size off datagrams, you can easily have a 256 position map (16x16) whcih each position taking one byte.
2 - After you do that, then you use Get() and Set() functions to set positions in the map and get them.
What it does that makes it not a simple 2D map is that it accept negative coordinates without problems and automatically adjusts the map to make the best use of space in it possible. Also, it is Blink aware and although you usually only deal with x and y, internally it keeps track of axial coordinates which means there is a third implicit z coordinate that can be inferred from x and y. This, for example, allows it to know what 6 of the 8 neighbors a square has in 2d space are real neighbors in an hexagon.
With all of the above, operations like iterating through all neighbors of a specific position or up to n positions away from it is very efficient (as efficient as possible considering the memory limitations).
This is specially useful if you want to develop AIs hint hint