Improving the globe generator

Started by klopkr, March 20, 2017, 07:54:11 PM

Previous topic - Next topic

klopkr

Let's talk about some of the things that would make the globe generator in rimworld more realistic. Before we start let's just say I'm by no means an expert.

First let's talk about plate tectonics. In Rimworld the planet you land on almost certainly has a magnetic field similar to earth's. You can tell because there's a breathable atmosphere for all the animals, pawns, and plants. A Magnetic field strongly implies a molten core and a molten core strongly implies plate tectonics.

'So why do plate tectonics matter?' You might ask. Have a look at earth's plates and see:

Each of the plates moves independently of one and other and where they touch one inevitably goes under the other, where they move apart land rises from the mantle and forms new earth.
If you look at that map you might notice that all major mountain ranges and islands fall on the border of two plates.

So here's my suggestion. While generating the globe apply a randomly generated layer for the tectonic plates, before generating mountain ranges. Each hexagon would belong to 5-10 tectonic zone blobs. Preferably with a preference of mostly large blobs and a 1 or 2 small ones. Then along the Hexagons that touch another plate you can place the mountain tiles with smaller and smaller hills as you move away from them. Along the water tiles that touch another plate add a 25-50% chance that it'll become a normal piece of land and add onto that yet another chance it'll be mountainous. All these pieces of land to extend a few hexagons so that it can go from mountainous to plains in a smooth fashion.

Alright the next thing I want to talk about is wind patterns and rain shadows. On a planet with a  strong magnetic field and diverse temperatures, winds are inevitable. On the ground level it might sometimes feel like they're blowing from every direction but up in the sky it's a bit of a different story.

As you can see winds tend to have a direction and convection depending on their location on the earth. Now I'm not sure if this would hold true for any earth like planet but I suspect it would be very similar.

Wind patterns should theoretically be easy to implement into the game. Simple check the latitude of the hexagon against the typical latitude of the winds and apply it into the game. What this should do is give wind a direction and temperature. In areas with lots of hot wind blowing down temperature should rise and in areas with cold winds blowing down temperature should lower with a gradient between the two. But more importantly it should allow the game to fairly easily figure out Rain Shadows.

A rain shadow is what happens when air full of moisture is being blown in the direction of tall mountains. On its way across the the mountains the air will be pushed into a colder area and the temperatures will fall low enough to rain or snow. Once the air has reached the other side it will be significantly dryer than before and almost certainly form a desert. As far as I understand all major deserts on earth are formed this way.
So how does the game figure out rain shadows on generation? Simply apply an easterly or westerly wind variable to each hexagon within the appropriate latitude (or only mountain tiles). All hexagons east or west of a mountain tile, unless it is another mountain tile with have significantly lower precipitation and the mountain tile instead will have significantly higher precipitation. Easterly or westerly tiles next to these tiles will than have a high percent chance of also having lower precipitation and so on until it reaches the a body of water or there are no longer tiles effected with low precipitation.

The last suggestion I have is water currents. These are the least important when generating land based areas but could still add a large level of realism.
As you can see in this image, water currents move cold water down from the north and up from the south and cycle it through warmer waters back up to their place of origin. To figure them out simply start with an ocean tile (the largest body of water on the map) touching a glacier and follow along any possible coasts East or westward then south or north (depending) but skip areas of 3-5 tiles wide if there's land further south. until you reach the equator, then follow the path back around and up or down to make a loop. Around the halfway point the water switches from cold to warm. Land touching warm water is warmer and land touching cold water is colder, simple as that.

A much muuuch simpler way to implement this is to simply pick a direction per hemisphere and make coasts touching the easter warm and touching the west cold then do vice versa for the other hemisphere.

I hope this explanation made sense. If anyone knows more about these topics or knows a better or simpelr way to implement them I'd love to hear it.

milon

You may not be an expert, but you're no amateur either. ;)

That's quite a bit more coding & testing & simulating to implement that. What do you perceive the benefit being to RimWorld if this was implemented?

Lav

Configuration of hydrospheric and atmospheric circulation systems has changed in the past even on our Earth though. Personally, I'd first inquire what possible stable configurations exist, for as long as you're not limited to Earth's specific heightmap. That might enable some interesting options.
Good story is what happens when you failed your planning.

SpaceDorf

Even DF does not go into so much details :)

I think the planets loke quite nice the way they are.

I would rather improve on the number of Factions and their distributions.
Add some roads and rivers to the maps.

Maxim 1   : Pillage, then burn
Maxim 37 : There is no overkill. There is only open fire and reload.
Rule 34 of Rimworld :There is a mod for that.
Avatar Made by Chickenplucker

klopkr

Quote from: milon on March 20, 2017, 10:18:05 PM
That's quite a bit more coding & testing & simulating to implement that. What do you perceive the benefit being to RimWorld if this was implemented?

I'll be honest it's mostly mountain ranges, lack of islands, and deserts that bother me.
I really love islands and non desertified areas. I feel like deserts kind of pop up randomly all over the map. I think that the mountains are extremely ugly too.

I think an simple way to implement it would be to simply use my idea to create tectonic 'blobs' which shouldn't be too hard. Basically drawing roundish circles on a globe. Then simply putting mountains along the lines with deserts appearing specifically on one side of mountain chains that are going north-south.