- Home /
Drawing borders between an array of objects
I've been looking around for this anwser but i'm not quite sucessful wording it for google.
I want to draw mutually excluding 2d borders separating a serie of game objects from one another to do something like this:
Hence a few questions:
How to detect what objects are the closest to an object from an array of objects (to calculate the midpoint afterward this way)?
How would I proceed to fill those area with a transparent filter?
How to give the whole thing a smooth and round aspect.
Is there an asset that already does all or part of this? Vectrosity maybe?
It is for a Risk-like game, so objects won't move after startup. There is no need to find a way to optimize this calculation to be done on all frames.
English is not my main language so let me know if anything is unclear, I will gladly try to clarify my questions.
Answer by tanoshimi · Apr 14, 2015 at 10:16 PM
You're describing a Voronoi tessellation. There are several existing C# libraries that implement Voronoi and Delauney triangulations (a related structure) - try Google.
This is great. Thanks a lot! I now have an actual word to google. :)
I'd recommend Terrain Grid System as it comes with out-of-the box Voronoi tessellation functions and high-performance highlighting system (Delauney is great but it can't work with concave polygons).
Your answer
