[Mod] Tectonic Map Generator [mg_tectonic]

User avatar
Dokimi
Member
 
Posts: 119
Joined: Mon Sep 19, 2016 03:52
GitHub: DokimiCU

[Mod] Tectonic Map Generator [mg_tectonic]

by Dokimi » Sun May 06, 2018 03:25

A naturalistic mapgen, based around mimicking the landscape of a tectonic plate boundary.


Image


This mapgen aims to create a world which is scientifically informed, but within the minimalist bounds of default Minetest.

It generates a landmass bounded by oceans, with a mountains running North-South down the middle. The land, and its hills and valleys rise from softer terrain on the coasts to towering mountains in the centre. A rainshadow leaves the East dry, and the West wet. Hot weather prevails in the North, cold in the South.

Rocks, sediments, and soils are arranged in strata. Ores occur in concentrated deposits. Deep fissures run along the fault lines, go down deep enough and they fill with magma.

The player starts at the centre of the map, on an island in a large caldera. Two rivers drain this lake and provide access through the often impassable terrain. One river leads East into the badlands, the other river heads West into the cloud forests.


License
Code is licensed under GNU LGPLv2+.


Mod dependencies
default
flowers
farming
boats


Image


View code on Github:
https://github.com/DokimiCU/mg_tectonic



DOWNLOAD

note: this was developed for Minetest 0.4.16. We've been having teething troubles moving to 0.4.17. If it crashes on start when using 0.4.17 make sure: settings>server/singleplayer>game>advanced>deprecated LUA api handling = legacy.

Image
Attachments
screenshot_3.png
(813.36 KiB) Not downloaded yet
screenshot_2.png
(792.28 KiB) Not downloaded yet
screenshot.png
(439.36 KiB) Not downloaded yet
Last edited by Dokimi on Fri Jun 08, 2018 08:12, edited 2 times in total.
 

User avatar
Dokimi
Member
 
Posts: 119
Joined: Mon Sep 19, 2016 03:52
GitHub: DokimiCU

Re: [Mod] Tectonic Map Generator [mg_tectonic]

by Dokimi » Sun May 06, 2018 04:00

A few thoughts/extra details for those who are interested....

How does this work?:

This is the results of the underlying equation which creates the base layer of mountain rock. It's a modified sine wave.
Image
This (plus noise, plus layers of soft rock, sediment etc) is a cross section of the land from the centre to the egdes (I can't remember if this graph shows the exact parameters I used, but it's close). As you can see it goes from steep mountains, to plains, then oceans.


Game play:

This map is set up very different than the default maps. I suspect it lies at the extremes of certain preferences. Some people will hate it... others will love it.

The map has three major differences from default: ores, scale, and predictability.

- Ore: Mining is a much more realistic boom-bust, gold-fever affair. Almost all minerals are in rare, large, concentrated deposits (versus default which scatters them everywhere). This has a huge impact on gameplay, dividing it into three (often long) stages:
1. prospecting: you have to find the damn things. This can be easy... or extremely hard, depending on luck and the mineral. It encourages exploration rather than simply digging a super-deep hole.
2. Extraction. Deposits can contain hundreds of units of ore. Now you need to build an actual mine to get that stuff out, process it, link the mine with other key sites etc.
3. Use. You will now have so much ore you can forget about mining... build houses from gold, pave the streets with diamonds... until you deplete the resource and the cycle begins again.

- Scale: This map aims for realism, therefore the landscape changes over massive distances. The transitions are continuous meaning each location is subtly unique. However, if you want to see something wildly different you will need to go on an epic journey. Teleporters/high speed transport recommended.

- Predictability: the map uses a few strictly defined features (like the equation above, the climate etc), rather than noise alone. The map is much less random than default. You can guess where certain features ought to be, and even navigate by reading the landscape. This makes is more like open world games with a designed map. You lose a little surprise, but gain a much more real sense of place.

Future development:
As far as I know... this only a few minor issues remaining that I don't know how to fix, and don't much matter (some are almost features!). The only serious issue is rare out of memory crashes. Other than that it is complete. I don't plan any new features.
Attachments
Mg_tect_graph.PNG
(23.31 KiB) Not downloaded yet
 

User avatar
Dokimi
Member
 
Posts: 119
Joined: Mon Sep 19, 2016 03:52
GitHub: DokimiCU

Re: [Mod] Tectonic Map Generator [mg_tectonic]

by Dokimi » Sun May 06, 2018 04:09

A few more screenshots...

The Eastern mountains
Image

The lowlands
Image

The coast and islands
Image
Attachments
screenshot_c.png
(439.08 KiB) Not downloaded yet
screenshot_b.png
(795.46 KiB) Not downloaded yet
screenshot_a.png
(543.08 KiB) Not downloaded yet
 

User avatar
Dokimi
Member
 
Posts: 119
Joined: Mon Sep 19, 2016 03:52
GitHub: DokimiCU

Re: [Mod] Tectonic Map Generator [mg_tectonic]

by Dokimi » Sun May 06, 2018 04:14

The Eastern mountains
Image

Western montane forest
Image

An Eastern lowland lagoon
Image
Attachments
screenshot_g.png
(410.09 KiB) Not downloaded yet
screenshot_h.png
(1006.55 KiB) Not downloaded yet
screenshot_e.png
(636.42 KiB) Not downloaded yet
 

User avatar
Devy
Member
 
Posts: 128
Joined: Sat Jan 21, 2017 02:31
GitHub: CoderForTheBetter
In-game: devy

Re: [Mod] Tectonic Map Generator [mg_tectonic]

by Devy » Sun May 06, 2018 06:39

I really like it! I love terrain mods but I wish they could be faster if implemented in LUA. When walking around with this mod everything generates very slowly. Still, I love the terrain it generates!
 

User avatar
voxelproof
Member
 
Posts: 644
Joined: Sat Aug 05, 2017 08:13
Location: Europe

Re: [Mod] Tectonic Map Generator [mg_tectonic]

by voxelproof » Sun May 06, 2018 09:00

@Dokimi

Man, it looks great. I was playing around with modifications of mapgen v5 viewtopic.php?p=309179#p309179 and some results where truly surprising:

Image

It probably wouldn't be of much use for you since you've worked out another algorithm, but maybe some of my "discoveries" would be helpful or inspiring in your future mapgens. One especially nice feature of your mg are real rivers (current mgs in Minetest don't feature rivers, only roller coaster streams ;) ).

Good work, maybe it should be added to the MT official mapgens...
>>>there is life beyond the Cube>>>
 

hajo
Member
 
Posts: 596
Joined: Thu Oct 13, 2016 10:45
Location: DE

Re: [Mod] Tectonic Map Generator [mg_tectonic]

by hajo » Sun May 06, 2018 12:02

Devy wrote:When walking around with this mod everything generates very slowly.

Maybe it would help to pre-emerge some terrain around each player
when the server is mostly idle ?
 

Mjollna
Member
 
Posts: 14
Joined: Tue May 01, 2018 12:37

Re: [Mod] Tectonic Map Generator [mg_tectonic]

by Mjollna » Sun May 06, 2018 21:47

Hi !

I've traveled a little bit on a new world using your mod, and I love the look and feel of the landscapes. I especially like the slopes, there are huuuge mountains that can still be climbed without a too much cliff-like edge. I'll definitely have to try playing in a survival way and build there !

Great work ! :)
 

User avatar
TumeniNodes
Member
 
Posts: 2547
Joined: Fri Feb 26, 2016 19:49
Location: in the dark recesses of the mind
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes

Re: [Mod] Tectonic Map Generator [mg_tectonic]

by TumeniNodes » Mon May 07, 2018 01:16

Well, this looks interesting.
definitely going to check it out soon
I'm not your buddy, guy...
 

User avatar
texmex
Member
 
Posts: 1064
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: texmex
 

User avatar
Dokimi
Member
 
Posts: 119
Joined: Mon Sep 19, 2016 03:52
GitHub: DokimiCU

Re: [Mod] Tectonic Map Generator [mg_tectonic]

by Dokimi » Mon May 07, 2018 23:05

I was playing around with modifications of mapgen v5...


I don't really understand mgv5, but I might have had a similar thing going earlier in development. Interesting to see it looks nice when in a finished state.

mg_tectonic has lots of room for minor fiddling and experimenting so...

If you want to try and bring that effect back you would change the following in the init. file

Code: Select all
local den_base = (xwav ^ 3) + mup + ((n_terr ^2) * whs)


to

Code: Select all
local den_base = (xwav ^ 3) + mup + ((n_terr) * whs)


(same deal for the soft rock)

The squaring damps out those rolling hills in favor of the extreme peaks. (haven't tried this change though... not sure what it'll do!)

If anyone does do any fiddling and get's a better result, please let us know!


One especially nice feature of your mg are real rivers...


This is the advantage of having some more strictly defined features. It seems a good approach for getting realism over relying on pure noise. The downside though... It only has six rivers (two from the central lake, 4 more at 15000 north/south draining lakes at 5000 east/west.).

Good work, maybe it should be added to the MT official mapgens...


I'm guessing that would be one way to get it out of LUA and fix the load times...?! ;-)


Have fun with it everyone. This was quite a mission to make... so time to take a break from modding for a while!
 

User avatar
Gael de Sailly
Member
 
Posts: 673
Joined: Sun Jan 26, 2014 17:01
Location: Lyon, France
GitHub: Gael-de-Sailly
IRC: Gael-de-Sailly
In-game: Gael-de-Sailly

Re: [Mod] Tectonic Map Generator [mg_tectonic]

by Gael de Sailly » Tue May 08, 2018 21:28

I'm very interested in this mod too. I checked it out immediately and looked a bit into the code. Great work!
Contributor of Minetest and OpenStreetMap, on Ubuntu 16.04. ~ ~ ~ Meet me on MinetestForFun, VanessaE's Basic, Capture the Flag and Inside the Box.
 

User avatar
csirolli
Member
 
Posts: 129
Joined: Mon Jan 15, 2018 21:46
Location: Florida, USA
GitHub: ChristianSirolli
IRC: CSirolli
In-game: CSirolli

Re: [Mod] Tectonic Map Generator [mg_tectonic]

by csirolli » Thu Jun 07, 2018 01:02

I created a world to test this out in (using MTE 0.4.17) and got this error:
Code: Select all
2018-06-06 20:47:34: ERROR[Main]: In thread b617b980:
2018-06-06 20:47:34: ERROR[Main]: /build/minetest-o89QbF/minetest-0.4.17/src/script/common/c_internal.cpp:b8: void log_deprecated(lua_State*, const string&): A fatal error occured: lua_getstack() failed
2018-06-06 20:47:34: ERROR[Main]: Debug stacks:
2018-06-06 20:47:34: ERROR[Main]: DEBUG STACK FOR THREAD b617b980:
2018-06-06 20:47:34: ERROR[Main]: #0  int main(int, char**)

I can't enter the world because of it. In fact, the program closes on me. Any idea why? The world is using the v7 mapgen. Is this mod for 0.5.*? But it seems to work fine in 0.5.0.
Last edited by csirolli on Thu Jun 07, 2018 06:08, edited 1 time in total.
Jesus is the only Way to heaven, the only saving Truth, and the only Life that is worth living.
 

User avatar
Dokimi
Member
 
Posts: 119
Joined: Mon Sep 19, 2016 03:52
GitHub: DokimiCU

Re: [Mod] Tectonic Map Generator [mg_tectonic]

by Dokimi » Thu Jun 07, 2018 02:42

csirolli wrote:I created a world to test this out in (using MTE 0.4.17) and got this error:
`2018-06-06 20:47:34: ERROR[Main]: In thread b617b980:`
`2018-06-06 20:47:34: ERROR[Main]: /build/minetest-o89QbF/minetest-0.4.17/src/script/common/c_internal.cpp:b8: void log_deprecated(lua_State*, const string&): A fatal error occured: lua_getstack() failed`
`2018-06-06 20:47:34: ERROR[Main]: Debug stacks:`
`2018-06-06 20:47:34: ERROR[Main]: DEBUG STACK FOR THREAD b617b980: `
`2018-06-06 20:47:34: ERROR[Main]: #0 int main(int, char**)`
I can't enter the world because of it. In fact, the program closes on me. Any idea why? The world is using the v7 mapgen. Is this mod for 0.5.*? But it seems to work fine in 0.5.0.



I developped this in 0.4.16. I haven't tried either of the Minetest development versions. I can't see this error message pointing to something within mg_tectonic's code per se... so considering it works in 0.5 (that's nice to know!)... maybe its an issue with 0.4.17 Minetest??? I have no idea!

(also... it sets up a singlenode mapgen, I think it should over-ride whatever default mapgen you've set. That shouldn't be the issue.)
 

User avatar
csirolli
Member
 
Posts: 129
Joined: Mon Jan 15, 2018 21:46
Location: Florida, USA
GitHub: ChristianSirolli
IRC: CSirolli
In-game: CSirolli

Re: [Mod] Tectonic Map Generator [mg_tectonic]

by csirolli » Thu Jun 07, 2018 06:07

It works in 0.5.0 but is slow in generating everything. At least it doesn't affect the fps. Something in your mod triggers that error, cause a world without it is fine in 0.4.17. It is definitely something worth looking into.
Jesus is the only Way to heaven, the only saving Truth, and the only Life that is worth living.
 

User avatar
Dokimi
Member
 
Posts: 119
Joined: Mon Sep 19, 2016 03:52
GitHub: DokimiCU

Re: [Mod] Tectonic Map Generator [mg_tectonic]

by Dokimi » Thu Jun 07, 2018 06:19

csirolli wrote:It works in 0.5.0 but is slow in generating everything. At least it doesn't affect the fps. Something in your mod triggers that error, cause a world without it is fine in 0.4.17. It is definitely something worth looking into.


Sadly it is slow in everything!

I have probably used some deprecated method that makes 0.4.17 spit it out. But if 0.5 is okay with it??? I have no idea what part of it is causing the issue (that's what I mean by it not pointing to some specific line of mg_tectonics code that I could fix).

If 0.5 keeps being okay with it I may just have to skip making it work for 0.4.17. Unless someone can point out where the issue lies?
 

User avatar
Dokimi
Member
 
Posts: 119
Joined: Mon Sep 19, 2016 03:52
GitHub: DokimiCU

Re: [Mod] Tectonic Map Generator [mg_tectonic]

by Dokimi » Thu Jun 07, 2018 06:28

Updated to 0.1.1!

This update will cause discontinuities on old maps! (you might be okay if you haven't explored beyond 5000 from the map centre... maybe)

My main goal with this update was to fix two issues:
- a lack of inland water
- vast boring midrange areas.

I have done this by making some minor (but dramatic) tweaks to the ocean forming mechanism. Basically it can take chunks out of the land deeper inland (plus the sea bed got tweaked).

The result:

Moving out from the centre..., first we have plateaus and lowlands. Then the lowlands become swamps/dunelands... then lakes... then the coast. The balance between land and now water reverses. We have complex peninsulas and bays... then we have large islands... then tiny atolls right out to the map edge.

Lowlands surrounded by highlands
Image

Swamps and shallow lakes
Image

Deep coastal lake
Image
Attachments
mgt011c.jpeg
(443 KiB) Not downloaded yet
mgt011b.jpeg
(474.82 KiB) Not downloaded yet
mgt011a.jpeg
(410.49 KiB) Not downloaded yet
 

User avatar
Dokimi
Member
 
Posts: 119
Joined: Mon Sep 19, 2016 03:52
GitHub: DokimiCU

Re: [Mod] Tectonic Map Generator [mg_tectonic]

by Dokimi » Thu Jun 07, 2018 06:33

Complex coastline (or maybe a very big island)
Image

Islands near the map edge
Image

And... I haven't shown much of the caves and ores before so... this is the magma layer (-15000) and a massive ore deposit!
Image
Attachments
mgt011f.jpeg
(443.93 KiB) Not downloaded yet
mgt011e.jpeg
(208.49 KiB) Not downloaded yet
mgt011d.jpeg
(310.33 KiB) Not downloaded yet
 

User avatar
Krock
Developer
 
Posts: 4151
Joined: Thu Oct 03, 2013 07:48
Location: Switzerland
GitHub: SmallJoker

Re: [Mod] Tectonic Map Generator [mg_tectonic]

by Krock » Thu Jun 07, 2018 07:40

I love this mapgen due to its variety in used materials. Colors are everywhere and the landscape smoothly transitions into new set of terrain nodes. However, I find it a bit strange to always start on the same island. It varies a bit with changed seeds but a continuous landscape like other map generators have, would be nice to have here aswell.

By the way, I found some mese. (Y = -400m)
Image
Attachments
screenshot_20180607_093140.png
(227.08 KiB) Not downloaded yet
Mod Search Engine - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
 

User avatar
Dokimi
Member
 
Posts: 119
Joined: Mon Sep 19, 2016 03:52
GitHub: DokimiCU

Re: [Mod] Tectonic Map Generator [mg_tectonic]

by Dokimi » Thu Jun 07, 2018 10:53

Krock wrote:... However, I find it a bit strange to always start on the same island. It varies a bit with changed seeds but a continuous landscape like other map generators have, would be nice to have here aswell.


Hmmm... yes... the island!

Basically that is the result of me getting frustrated and going, "#$^& it! You can start on an island!"

Default spawning puts you underground (being mountains after all). I've seen various ways of overcoming this properly but couldn't figure them out. Then I gave up and dumped you in the ocean... except sometimes you died. Then I made a tunnel... but sometimes you fell down a crevasse and died... then I made the lake and an island that would always be the same damn height! A non-death solution!

Like I've said above, this map is more predictable than normal - I can't change that without breaking the fundamentals of it. But the island and the rivers are the most crudely predictable part of all.

They exist to add some water features, provide access through the mountains, and ... the spawning problem!

They could be removed? Perhaps some way could be found to achieve the same result more randomly? Personally I like having something fulfill their role, even if they aren't the best solution.
 

User avatar
csirolli
Member
 
Posts: 129
Joined: Mon Jan 15, 2018 21:46
Location: Florida, USA
GitHub: ChristianSirolli
IRC: CSirolli
In-game: CSirolli

Re: [Mod] Tectonic Map Generator [mg_tectonic]

by csirolli » Thu Jun 07, 2018 11:32

It looks like that error message was created by this: https://github.com/minetest/minetest/bl ... l.cpp#L157
I am still not sure what exactly was the reason for it being triggered.
Jesus is the only Way to heaven, the only saving Truth, and the only Life that is worth living.
 

User avatar
Krock
Developer
 
Posts: 4151
Joined: Thu Oct 03, 2013 07:48
Location: Switzerland
GitHub: SmallJoker

Re: [Mod] Tectonic Map Generator [mg_tectonic]

by Krock » Thu Jun 07, 2018 11:52

csirolli wrote:It looks like that error message was created by this: <snip>

This bug was already reported: https://github.com/minetest/minetest/issues/7419
To fix it, open mg_tectonic/init.lua and change the following:
Code: Select all
-- Old line:
minetest.set_mapgen_params({mgname = "singlenode", flags = "nolight"})
-- Replace with:
minetest.set_mapgen_setting("mgname", "singlenode", true)
minetest.set_mapgen_setting("flags", "nolight", true)


Dokimi wrote:Default spawning puts you underground (being mountains after all). I've seen various ways of overcoming this properly but couldn't figure them out.

There were some changes in this code recently, but AFAIK only contained in 0.5.0-dev. You can still register a `on_joinplayer` and `on_respawnplayer` callback to search a fitting location and move the player there.
Mod Search Engine - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
 

User avatar
Dokimi
Member
 
Posts: 119
Joined: Mon Sep 19, 2016 03:52
GitHub: DokimiCU

Re: [Mod] Tectonic Map Generator [mg_tectonic]

by Dokimi » Fri Jun 08, 2018 01:26

This fix has been merged. I hadn't realized 0.4.17 had been released. Both fixed and unfixed seemed to work fine (I notice it has legacy support, so doesn't actually crash unless you turn that off). However this fix kills it for 0.4.16. Turns the map to garbage. I have added a warning in the main post.
 

User avatar
Dokimi
Member
 
Posts: 119
Joined: Mon Sep 19, 2016 03:52
GitHub: DokimiCU

Re: [Mod] Tectonic Map Generator [mg_tectonic]

by Dokimi » Fri Jun 08, 2018 01:45

Seeing as people always like to make suggestions for changes/new features here is my own wishlist for mg_tectonic (remembering that realism is the guiding principle for this map):

- a random starting position (so you see more of the map in each play through)
- randomly generated rivers, glaciers, and highland lakes (rather than the current hardcoded ones)
- a proper rainshadow effect based on the presence of mountains (rather than the current East vs West thing)
- volcanoes and magma chambers.
- underground rivers and aquifers.
- ruins
- forest clearings, and forest clumps
- coral reefs/atolls
- a handful of realistically big mountains (>1000 m high. Current max is ~300m ... which is really just a very big hill (or a bloody huge cliff!))

Sadly... none of these have easy solutions. The code is already complicated enough (not to mention slow)... so I've no plans to even begin figuring this stuff out, let alone adding it.

I am happy enough with mg_tectonic as it is for now. Especially considering it started out as this:
Image
Attachments
mgtectdev1.jpeg
(288.13 KiB) Not downloaded yet
 

User avatar
Dokimi
Member
 
Posts: 119
Joined: Mon Sep 19, 2016 03:52
GitHub: DokimiCU

Re: [Mod] Tectonic Map Generator [mg_tectonic]

by Dokimi » Fri Jun 08, 2018 02:09

Some more thoughts on gameplay:

When making this, realism was my focus - gameplay came a distant second. So I've found it interesting to see it emerge it's own unique style of gameplay.

Mg_tectonic encourages, even demands a style that can only be described as "epic". ...One does not simply walk to the sea-shore!

"Epic" gameplay goals seem to emerge naturally out of mg_tectonic:

- Find deposits for all the ores (not easy!)
- Find all the flowers/wood types (you have to find the right climate zone...)
- Visit all the major regions of the world (and link them with a highspeed travel network)
- Find and scale the world's highest peak,
- Make it down to the magma layer
- circumnavigate the world (the whole map is an island...)

I also find it naturally encourages better building. Every location has masses of different building materials. You are forced to find uses for all the dozen materials clogging your inventory. Likewise with ores - you need to find some use for those 1000000 gold ingots you just found. Once you escape the mountains there are plenty of city sized building sites too...

So there you have it.

mg_tectonic = epic!

Image
Attachments
mgtectmountians.png
(924.89 KiB) Not downloaded yet
 

Next

Return to Mod Releases



Who is online

Users browsing this forum: Chem871, texmex and 4 guests