Mythruna

Player's Corner => Gallery => Topic started by: pspeed on August 22, 2012, 02:08:26 PM



Title: Terrain analysis for town generation...
Post by: pspeed on August 22, 2012, 02:08:26 PM
I've been posting a lot of weird images lately as I get excited about the town generation progress.  I know some of the visuals really only make sense when you understand what is going on.

Here is a summary of my progress as of last night:
(http://i.imgur.com/sjhiI.png)

For easy zooming: http://i.imgur.com/sjhiI.png

As mentioned in the thread in the blog section, farms are the hardest things to place.  If I get that right then everything else is relatively easy.  So hopefully town generation progress will be more rapid now that so many of the the building blocks are in place.


Title: Re: Terrain analysis for town generation...
Post by: Michael on August 22, 2012, 03:17:32 PM
Really great! is this for the NPC's?


Title: Re: Terrain analysis for town generation...
Post by: pspeed on August 22, 2012, 04:21:52 PM
Really great! is this for the NPC's?

Yes, as said it's for town generation... as in the automatic town generation.


Title: Re: Terrain analysis for town generation...
Post by: ayoriceball on August 22, 2012, 05:24:16 PM
Would it be relatively easy to make it so that NPCs actually dig out the area for the farm, for founding settlements during gameplay?


Title: Re: Terrain analysis for town generation...
Post by: pspeed on August 22, 2012, 06:14:19 PM
Would it be relatively easy to make it so that NPCs actually dig out the area for the farm, for founding settlements during gameplay?

Yeah, that's always been the plan.  If the town or farm gets destroyed then the NPCs will have to rebuild it... or if a player has created a new town and assigned certain areas or hired NPCs to do certain jobs then they will build their places (including farms).

At least it's the plan.


Title: Re: Terrain analysis for town generation...
Post by: BenKenobiWan on August 23, 2012, 10:08:35 AM
By "the large region" in the pic, do you mean the roundest/squarest blue one?


Title: Re: Terrain analysis for town generation...
Post by: pspeed on August 23, 2012, 10:36:16 AM
By "the large region" in the pic, do you mean the roundest/squarest blue one?

The one that the "r" in "region" is almost touching.


(http://i.imgur.com/L7FwE.png)


Title: Re: Terrain analysis for town generation...
Post by: pspeed on August 23, 2012, 10:38:59 AM
While I'm doing screen caps...

Here is roughly where I was standing and looking:
(http://i.imgur.com/SNVxq.png)


Title: Re: Terrain analysis for town generation...
Post by: Ghelmaron on August 25, 2012, 09:12:37 AM
 I know some of the visuals really only make sense when you understand what is going on.


I'm not concerned if I do not understand, as long as you, Paul, understand what is going on  :D  ;)


Title: Re: Terrain analysis for town generation...
Post by: pspeed on August 25, 2012, 09:18:15 AM
 I know some of the visuals really only make sense when you understand what is going on.


I'm not concerned if I do not understand, as long as you, Paul, understand what is going on  :D  ;)

Sometimes I wonder. :)


Title: Re: Terrain analysis for town generation...
Post by: ahmadsal on August 26, 2012, 01:14:56 AM
 I know some of the visuals really only make sense when you understand what is going on.


I'm not concerned if I do not understand, as long as you, Paul, understand what is going on  :D  ;)

Sometimes I wonder. :)

hehe. Really interesting stuff going on! Keep up the good work. Pictures are always great, thanks.

I think its cool how you averaged "regions" together. I usually found that the hardest when setting up a town because hills usually get in the way too much.


Title: Re: Terrain analysis for town generation...
Post by: pspeed on August 26, 2012, 01:25:43 AM
 I know some of the visuals really only make sense when you understand what is going on.


I'm not concerned if I do not understand, as long as you, Paul, understand what is going on  :D  ;)

Sometimes I wonder. :)

hehe. Really interesting stuff going on! Keep up the good work. Pictures are always great, thanks.

I think its cool how you averaged "regions" together. I usually found that the hardest when setting up a town because hills usually get in the way too much.

I think the thing that surprised me most when I started doing this is how much flat land there is if you know what to look for.  One of the early tests I did was to wholesale clear the trees away from a 128x128 section... all trees and vegetation gone and it's pretty clear where the flat areas are.  The data analysis only confirmed it.

Town locations are selected based on a variety of criteria, one of which is relative flatness of the land... this helps.  In some cases a farm can be done in one huge plot without merging much of anything except the really tiny bumps.  But I've manually placed towns on mountain tops, etc. and it somehow still manages to find farm space.

In fact, I found the farms kind of boring after a while so I retweaked the parameters since these pictures.  The algorithm now is even less likely to merge clumps and so most farms end up getting made of 3 or more mid to large size areas... and yet still some towns manage to find a big swath of contiguous land.

For example, once the parameters were tweaked the town in these pictures no longer had quite as big an area where this farm was chosen... but the big green area down the middle is naturally flat and was selected instead.  I've considered upping the land requirements for a farm but the irony is that in the cases where a big chunk is selected like this, it's already way more than is needed by the current farm criteria.


Title: Re: Terrain analysis for town generation...
Post by: Teknonick on August 26, 2012, 07:05:25 PM
Woh, pretty awesome! Nice 'Rough location' drawing there Paul ;) Looks like something I would draw xD! But better....... Don't forget Paul, if you change the terrain for deserts and such, you need to figure out how to make specific 'biomes' have better/worse stuff... AKA a plains type area would be best for farms, unless it doesn't have any water... Forests would be the worst for building, unless it's next to where your building, then it's better!


Title: Re: Terrain analysis for town generation...
Post by: pspeed on August 26, 2012, 07:10:18 PM
Woh, pretty awesome! Nice 'Rough location' drawing there Paul ;) Looks like something I would draw xD! But better....... Don't forget Paul, if you change the terrain for deserts and such, you need to figure out how to make specific 'biomes' have better/worse stuff... AKA a plains type area would be best for farms, unless it doesn't have any water... Forests would be the worst for building, unless it's next to where your building, then it's better!

Nah, people make do.  If there's a reason for a town to be there then they will figure out a way to make it.

Adding too many rules just makes everything end up looking the same.

And, by the way, a forest is the best place to build a town.  Clearing the land and collecting natural resources to build are both the same activity. :)


Title: Re: Terrain analysis for town generation...
Post by: Michael on August 27, 2012, 02:35:53 PM
Wait... by what pixel size are the images? i am guessing around 132x132 - 180x180


Title: Re: Terrain analysis for town generation...
Post by: pspeed on August 27, 2012, 03:08:42 PM
Wait... by what pixel size are the images? i am guessing around 132x132 - 180x180

Something like that.... 128x128 or so.  Each of the "pixels" is a block in the game.

So in this:
(http://i.imgur.com/0d35t.png)

The little gray dot I circled is a block of stone.