[Library] luaFortune: Libraries for producal generation.

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
Rishavs
Party member
Posts: 103
Joined: Sat Oct 17, 2009 5:29 am
Contact:

Re: [Library] luaFortune: Libraries for producal generation.

Post by Rishavs »

Sorry for the thread necromancy, but I need some help with the procedural map generation as done in Amit's article.
I am pretty newb so need some handholding.

I have generated a points field and created a vrornoi diagram around it, using this library.

What next?
I understand that I need to define faces as objects now (made up of vertices and having ids).
How can I create an object for each face ?
The polygons seems to have arbitrary number of corners (some have 4 others have 9)


Then i need to find neighbors.
How do I do that?
can someone give me a rough flow to follow?
Attachments
Untitled.png
Untitled.png (150.35 KiB) Viewed 2259 times
User avatar
TheRedRaccoon
Prole
Posts: 12
Joined: Sun Feb 21, 2016 6:55 pm

Re: [Library] luaFortune: Libraries for producal generation.

Post by TheRedRaccoon »

This article should explain it rather efficiently.

http://www-cs-students.stanford.edu/~am ... eneration/
User avatar
Rishavs
Party member
Posts: 103
Joined: Sat Oct 17, 2009 5:29 am
Contact:

Re: [Library] luaFortune: Libraries for producal generation.

Post by Rishavs »

Hi

Thats the same article by Amit I am (and apparantly half the gamedevs) following.
But i am not sure how to do the next step.

I need to generate a list of neighbors for each polygon. No idea of achieving that. :/
User avatar
pgimeno
Party member
Posts: 3549
Joined: Sun Oct 18, 2015 2:58 pm

Re: [Library] luaFortune: Libraries for producal generation.

Post by pgimeno »

Maybe you can take a look at this one instead?

https://www.love2d.org/forums/viewtopic ... 26#p171426
I have added some new stuff: polygon detection, neighborhood calculation. See attached the new demo.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 78 guests