Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Voronoi Generator  (Read 4267 times)

0 Members and 1 Guest are viewing this topic.

Jonny

  • Full Member
  • ***
  • Posts: 114
    • View Profile
    • Email
Voronoi Generator
« 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:



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.
« Last Edit: January 17, 2017, 02:56:37 pm by Jonny »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: Voronoi Generator
« Reply #1 on: January 17, 2017, 12:46:09 pm »
Neat! :)

What are you gonna use it for in your game?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Jonny

  • Full Member
  • ***
  • Posts: 114
    • View Profile
    • Email
Re: Voronoi Generator
« Reply #2 on: January 17, 2017, 02:55:22 pm »
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:

« Last Edit: January 17, 2017, 02:57:56 pm by Jonny »

mpeg3

  • Newbie
  • *
  • Posts: 13
  • gdinit@github
    • View Profile
Re: Voronoi Generator
« Reply #3 on: January 17, 2017, 08:26:58 pm »
aah! so this is the magic behind Picassoesque visuals. very cool!

 

anything