ExtrabiomesXL

ExtrabiomesXL

3M Downloads

Better Village Generation

jimcarreer opened this issue · 16 comments

commented

I know that technically you're not in the business of village generation, but I notice that in Extrabiomes villages often generate crazy on biome boundaries. Snooping in the Forge code myself I see that something in relation to to villages calculate the mean ground level at a potential village to use as "ground level" when generating. When a village happens to pick an area between say a glacier and a swamp, this mean is not a very good value to use as ground level because terrain goes from high to low extremely quickly. A calculation that could perhaps be added to this behavior would be to calculate the variance (standard deviation of the height squared). If you calculate the variance and its relatively high, like >81 (may have to be tweaked) cancel village generation, because high variance means the ground level changes rapidly. I would write a patch for this myself, but I am unsure how to do this outside of altering the base classes in Forge, all I need to do is add the extra behavior to the village generation classes.

You can calculate the variance of a data set as you're reading it (ie at the same time you calculate the mean) by keeping a second sum which is the sum of each data point squared: The second explanation on this page shows how you can calculate variance as you are calculating the mean rather than afterwards

commented

v4 is using a completely new terrain generator so that you will not have weird placements of biomes such as a swamp next to a glacier. We are looking at doing some things with villages and perhaps placement can be an option because while I know what you are talking about with villages sometimes spawning at odd locations and even separated if it's in a mountain area, I personally like the strangeness of finding a village like that...lol. I am not sure what our new terrain generator will do in regards to village placement, but we can take a look.

commented

Hmm, perhaps an option in a config? I think when it comes to weird village generation, you either hate it or you love it. Personally I find a weirdly generated village jarring and unnatural against the beautiful terrain of XBXL.

I have seen the beginnings of work on XBXL4, I've been watching it because I really don't want this project to die out (and it seems like it might be in danger of that). I know you'll be using Terrain Control, which is awesome, but it seems like a major rewrite is hard to do especially when your main contributor has retired.

I do have a lot of experience with bukkit plugins (I helped with many of the ShotBow network's plugins). Though I'm relatively unfamiliar with forge, and I am sure you get offers like this all the time, I would be more than happy to help out with XB4.

commented

v4 is using a completely new terrain generator so that you will not have weird placements of biomes such as a swamp next to a glacier.

Of course, the other side is, what makes something weird/wrong?

Real world has frozen deserts.
Real world has deserts next to rain forests (coast of chile, I think; moist air from the ocean gets only a short distance inland, then a hill / very, very short mountain marks a line separating moist from dry. Essentially, in minecraft terms, a forested hill beach, followed by a river-sized hills border, then a full-sized desert.)

Snow next to mini jungles ... well, both are wet biomes, one is just hotter than the other.

Hmm ...

Idea for 1.4:

  1. Rapid changes in humidity require some sort of hilly or mountainous separation, but is otherwise not restricted.
  2. Rapid changes in temperature can only come if there is a rapid change in humidity; hotter side must be the drier side.

#2 is not crazy; that's santa monica / downtown los angeles, as well as lots of other places in california.
As soon as you get far enough inland, humidity drops and temperature goes up.

But it also kills #1 -- going east from the coast, you have (in the LA basin proper) a very large flat area that is basically an irrigated desert. It really is a cool, moist coastal area, then a dry hot area, THEN the large mountain range that has lifted the moist air up and out of the LA basin area.

I think #2 -- rapid changes in temperature require a rapid change in humidity -- is realistic.
But rapid changes in humidity can be very strange if there is a mountain within about 25 miles.

Even allowing for the 1/72 approximate large distance scale in minecraft, that's still about 1/3rd of a minecraft mile, or .... 5280 feet, about 1600 meters, about 533 blocks for 1/3rd mile, that's well outside of any reasonable checkable distance.

So, at minecraft's scale, yes, rapid changes in humidity can occur with no apparent cause.

commented

@keybounce I'm not talking about biome placement, I'm talking about village placement, glacier next to a swamp was just an example of a "high" avg ground level next a "low" avg ground level which causes, say a villager house to generate half on a cliff and create 30 block high columns of cobble. Please read my original comment first, I don't mind how biomes are placed right now, just how villages sometimes generate half on and half off two biomes with very different avg heights. What I'm offering is a relatively simple way for villages to pick "flatter" areas to generate regardless of which biome(s) it is in. Actually now that I look at it, average ground level in Forge is calculated on a per component basis. So you could still generate villages in border zone that change avg height quickly, but keep them from being half on and half off a cliff by making them skip component bounding boxes where the variance of the ground level is very high.

commented

@keybounce I'm not talking about biome placement, I'm talking about village placement, glacier next to a swamp was just an example of a "high" avg ground level next a "low" avg ground level

Understood. I was actually replying to Annysia's comment that weird terrain/biome placements would be gone in v4, and pointing out that the "weird" is actually more normal than people think.

commented

@keybounce Gotcha, sorry about the confusion, I thought you were addressing me.

commented

@keybounce all those things you are talking about are already in the works
in our new biome placement. But I have yet to see where you would find a
swamp next to a glacier. Humidity and temperature will play a large part
of biome placement in v4, but we want it to make sense as unnatural biome
placement is one of the biggest complaints people have so we are trying to
address that. Of course altitude will play a part in it as well so you
might find a mountain that is cold and then a warm valley below as opposed
to places that are actually higher in elevation so would be cooler.

On Sun, May 12, 2013 at 10:41 AM, jimcarreer [email protected]:

@keybounce https://github.com/keybounce Gotcha, sorry about the
confusion, I thought you were addressing me.


Reply to this email directly or view it on GitHubhttps://github.com//issues/281#issuecomment-17779804
.

commented

@Annysia Yeah I've seen Jeff working on the layering code. Is the plan to have like a baseline temperature layer, and then modify that in relation to altitude? By the way all this talk is very exciting. I've been entranced with terrain generation since I first played Dwarf Fortress.

commented

@jim have you checked out the blog that Scott had started that talks about
the terrain generation and the site for the terrain generator that we will
be using? It has some really great information on it. We are just getting
ready to do a test biome to see how it all works. We will be doing a
Yellowstone Park type area as a test. We are very excited as well and hope
to post some screen shots soon of what we are working on. =)

On Sun, May 12, 2013 at 10:52 AM, jimcarreer [email protected]:

@Annysia https://github.com/Annysia Yeah I've seen Jeff working on the
layering code. Is the plan to have like a baseline temperature layer, and
then modify that in relation to altitude? By the way all this talk is very
exciting. I've been entranced with terrain generation since I first played
Dwarf Fortress.


Reply to this email directly or view it on GitHubhttps://github.com//issues/281#issuecomment-17779990
.

commented

@Annysia I'm actually working on cloning the dev branch right now so I can build it on my machine and help test ^_^. Do I need the latest version of Terrain Control jar as an external library?

commented

That I am not sure of as Jeff has been handling most of that as he gets
familiar with not only our code but the terrain generator. As soon as he
is on I will ask him your question. =)

On Sun, May 12, 2013 at 11:01 AM, jimcarreer [email protected]:

@Annysia https://github.com/Annysia I'm actually working on cloning the
dev branch right now so I can build it on my machine and help test ^_^. Do
I need the latest version of Terrain Control jar as an external library?


Reply to this email directly or view it on GitHubhttps://github.com//issues/281#issuecomment-17780156
.

commented

I've just been talking with Zenth_ about the textures we will need for a
Yellowstone type biome and he will be working on those. He's our new
texture person and does some amazing work and is fast too. I'm sending him
the pictures that I sent to Jeff that we will use to generate some of the
rock structures and then terrain features like geysers and mud pots. We
are also looking at having the NPC villages be generated out of materials
from the biome they are in. Jeff and I talked yesterday about the NPC
villages in this type of biome perhaps being cliff dwelling, similar to
ones found in the southwest.

On Sun, May 12, 2013 at 11:03 AM, Karla Knapp [email protected]:

That I am not sure of as Jeff has been handling most of that as he gets
familiar with not only our code but the terrain generator. As soon as he
is on I will ask him your question. =)

On Sun, May 12, 2013 at 11:01 AM, jimcarreer [email protected]:

@Annysia https://github.com/Annysia I'm actually working on cloning
the dev branch right now so I can build it on my machine and help test ^_^.
Do I need the latest version of Terrain Control jar as an external library?


Reply to this email directly or view it on GitHubhttps://github.com//issues/281#issuecomment-17780156
.

commented

@Annysia Hey, I got it to build without having that jar, seems the code for TC is right in the source. Lol scratch that. Cliff dwellings would be AMAZING but I think they'd require some significant changes to village generation considering the code for village generation is extremely horizontal oriented right now..

commented

Hey Jim! Sorry I didn't respond earlier this thread completely escaped my attention!

The only part of Terrain Control that you should need is the common package. I'm not sure how the jars are structured but in the repo it should be obvious. It might be easier to just include that folder as a source folder instead. The Forge part of Terrain Control is included in the EBXL source already as I think you had seen. Let me know if that works for you.

commented

I'll give that a go tonight. The root of the problem was that for some reason it could not find IBiomeManager from TC. Does the Yellowstone biome work with the code that's in the Repo now or is it just a skeleton (looks like a skeleton).

commented

This is being addressed in a future release.