SFML community forums
General => SFML projects => Topic started by: Jonny on January 16, 2017, 10:39:11 pm
-
As part of a game I've been working on I've adapted a library for generating voronoi cells to work with sfml:
(https://puu.sh/toGfF/7a9e91b112.png)
The original source, and the person who gets all the credit for the smart stuff can be found here: https://github.com/mdally/Voronoi
and the branch with the mods for SFML can be found here: https://github.com/JonnyPtn/Voronoi/tree/sfVoronoi
At the time of writing it's working on Windows, Linux and MacOS. Because I can't cmake too well, there's two CMakeLists.txt - one for the lib in the root folder, and one for an example app in the "examples" folder.
Currently it's only the example app using SFML, and the internals still remain pretty much untouched, but I'll be modifying it to use more SFML stuff for the internals too.
-
Neat! :)
What are you gonna use it for in your game?
-
I'm currently using it for a little exploration game I'm making with procedurally generated islands. Instead of combining the traditional tile layout with a heightmap, I use the voronoi polygons to make the shape a bit more random:
(https://puu.sh/tl5zs/5409f245cd.png)
-
aah! so this is the magic behind Picassoesque visuals. very cool!