Mythruna
April 19, 2024, 10:13:12 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome to the new forums. See "Announcements" for a note for new users.
 
   Home   Help Search Login Register  
Pages: [1] 2
  Print  
Author Topic: Terrain analysis for town generation...  (Read 14467 times)
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« 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:


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.
Logged
Michael
Donators
Hero Member
***
Posts: 2166



View Profile
« Reply #1 on: August 22, 2012, 03:17:32 PM »

Really great! is this for the NPC's?
Logged
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« Reply #2 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.
Logged
ayoriceball
Donators
Jr. Member
***
Posts: 99


Control Magic


View Profile
« Reply #3 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?
Logged

From Bay12Forums
Don't dwarven ladies know they're beautiful the way they are? They don't need to starve themselves to look like those elven bitches.
I have a skin, a potato has a skin, therefore, I'm God
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« Reply #4 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.
Logged
BenKenobiWan
Friendly Moderator
Donators
Hero Member
***
Posts: 674


Jesus loves you!


View Profile
« Reply #5 on: August 23, 2012, 10:08:35 AM »

By "the large region" in the pic, do you mean the roundest/squarest blue one?
Logged
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« Reply #6 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.


Logged
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« Reply #7 on: August 23, 2012, 10:38:59 AM »

While I'm doing screen caps...

Here is roughly where I was standing and looking:
Logged
Ghelmaron
Donators
Jr. Member
***
Posts: 76


View Profile
« Reply #8 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  Cheesy  Wink
Logged
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« Reply #9 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  Cheesy  Wink

Sometimes I wonder. Smiley
Logged
ahmadsal
Jr. Member
**
Posts: 90


View Profile
« Reply #10 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  Cheesy  Wink

Sometimes I wonder. Smiley

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.
Logged
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« Reply #11 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  Cheesy  Wink

Sometimes I wonder. Smiley

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.
Logged
Teknonick
Sr. Member
****
Posts: 438


View Profile
« Reply #12 on: August 26, 2012, 07:05:25 PM »

Woh, pretty awesome! Nice 'Rough location' drawing there Paul Wink 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!
Logged
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« Reply #13 on: August 26, 2012, 07:10:18 PM »

Woh, pretty awesome! Nice 'Rough location' drawing there Paul Wink 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. Smiley
Logged
Michael
Donators
Hero Member
***
Posts: 2166



View Profile
« Reply #14 on: August 27, 2012, 02:35:53 PM »

Wait... by what pixel size are the images? i am guessing around 132x132 - 180x180
Logged
Pages: [1] 2
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.20 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!