Hacker News new | past | comments | ask | show | jobs | submit login

Very cool! This reminds me of Amit P's polygonal map generation project, which you should look at if you're interested in this kind of stuff. http://www-cs-students.stanford.edu/~amitp/game-programming/...



The OP actually cites that project as the method they use for initial polygon generation, and tells everyone to go read it.


If you want to lose a few weeks hacking away at something kind of fun, then turn around and try to implement the Fortune's Algorithm[1] Voronoi region/Delauney Triangulation method that underlies Amit's map generator.

Somewhere I have a WinForms app I built a while back that animates the process and draws everything out step by step.

[1] https://en.wikipedia.org/wiki/Fortune%27s_algorithm


This is actually what I did in my first internship -- generating Delaunay triangulations (or more often, tetrahedralizations) of points, and then adjusting the underlying sets of points to help ensure that the corresponding Voronoi cells have good properties (generally reasonable surface area to volume ratios).

We didn't use Fortune's for historical reasons (the first versions of the code were in Fortran 77, and written well before he published his paper). Instead we generated triangulations and then flipped edges until they were Delaunay, and then used the corresponding Voronoi diagram. It turns out that flipping edges to produce a nicer triangulation is reasonable in two dimensions, but intractable in 3D and up.


He's done great projects. http://www.redblobgames.com - he writes here too.


Wanted to post this too. That guy is brilliant, and so is OP. I love this stuff.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: