Page 1 of 1

[mod] Islands - Experimental lua mapgen [islands]

PostPosted: Tue Oct 01, 2019 19:39
by Termos
Image

The goal of this experiment is to create non crazy, possibly realistic, familiar looking terrain, mundane yet varied and memorable.

Currently there are three distinct terrain features - beaches, cliffs and mountains.
At this stage, this experiment doesn't concern itself with ores, caves, item availability etc., decorations are few and makeshift just to spice things up a bit.

adjusted for reasonable view range:
Even the most beautiful terrain is worth nothing, if it's features are so large that they can't be appreciated during normal gameplay on reasonable view settings.
I'm testing it with view range of around 300, which is a reasonable tradeoff, performs well on most systems, but you'll often get to see terrain generate in front of you. (hint: max_block_distance and max_block_generate_distance can both be set to view_range/16 rounded if the system can handle it)

simplicity and performance:
2d noise only, because I feel the capabilities of 2d noise haven't been fully explored, and because I've yet to see anything good come out of using 3d noise for terrain. The result is relatively fast for a lua mapgen.

known problems:
- distances between islands can be vast sometimes, this is necessary to keep the world sailable, otherwise islands tend to connect and create large inland lakes.
- singlenode mapgen has to be selected when creating new world - set_mapgen_setting override doesn't seem to work. solved


License: MIT
Depends: default
Download: https://github.com/TheTermos/islands/archive/master.zip

Some compatible mods to spice up exploration:
1. zombiestrd + mobkit - now sharks spawn in the sea, so swimming to another island becomes not such a good idea.
2. If not swim, then why not to use Eran's sailory to sail across dangerous waters.
3. ...or mine: Sailing Kit

Re: [mod] Islands - Experimental lua mapgen [islands]

PostPosted: Tue Oct 01, 2019 21:13
by Eran
This is really pretty, nice work! I kind of want to port the boat from the sailing mod now.

Sadly I'll have to add one to the known problems: The dofile that starts registerstuff.lua and also some of the place schematics functions use '\' in file paths. This makes it crash on linux and propably also mac. If you use '/' instead, it works on both windows and unix based machines.
It would be also cool if you could make the dependency on default optional, so it can be easily ported to other games. Maybe this could be done with and islands.set_content_ids function.

Re: [mod] Islands - Experimental lua mapgen [islands]

PostPosted: Tue Oct 01, 2019 22:57
by Termos
Eran wrote:Sadly I'll have to add one to the known problems: The dofile that starts registerstuff.lua and also some of the place schematics functions use '\' in file paths. This makes it crash on linux and propably also mac. If you use '/' instead, it works on both windows and unix based machines.

Keep forgetting about that dammit, should be fixed now, thanks.

Eran wrote:It would be also cool if you could make the dependency on default optional, so it can be easily ported to other games. Maybe this could be done with and islands.set_content_ids function.

This is possible, but I'd have to do my own decorations and drop the boat and binos, so this is for another time.

Re: [mod] Islands - Experimental lua mapgen [islands]

PostPosted: Tue Oct 01, 2019 23:51
by duane
Wow! That is some gorgeous terrain. Those cliffs and mountains are beautiful. I thought I'd be stuck with dinky islands and too much sailing, but this is completely playable.

I'm copying it into my mapgen (with your license and credit, of course).

Outstanding.

Re: [mod] Islands - Experimental lua mapgen [islands]

PostPosted: Wed Oct 02, 2019 13:21
by Termos
Glad it's being used so soon.
Sorry for messy code, I've been changing stuff around a lot (and I'm not done yet)

Should you need even less dinky islands, there's 'mult' variable to scale things up.

Re: [mod] Islands - Experimental lua mapgen [islands]

PostPosted: Wed Oct 02, 2019 21:06
by Kor
Now all we need are ships, movable und buildable with blocks *.*

Arrr!!

Re: [mod] Islands - Experimental lua mapgen [islands]

PostPosted: Thu Oct 03, 2019 07:34
by Gundul
Very beautiful islands with sometimes cliffs and even lagoons.
Suits very well to mobkit and sharks :)

For my taste maybe just a bit few vegetation all over. And snow below
cloud level does not really suit to tropical islands. Bare rock would look
better I guess :)

Reminds me sometimes at Koh Tao island, Thailand.
Now I need some holiday in RL :D

Re: [mod] Islands - Experimental lua mapgen [islands]

PostPosted: Fri Oct 04, 2019 11:57
by Termos
Gundul wrote:Suits very well to mobkit and sharks

There's definitely some synergy between the two projects. Sometimes I just know what I to do next because that's the next logical step given what already is. This could turn into a game some day.

Re: [mod] Islands - Experimental lua mapgen [islands]

PostPosted: Fri Oct 04, 2019 18:43
by ShadMOrdre
Termos,

This looks very nice. I wish that Lua mapgens could use the registered biomes, ores, and decorations.

Perhaps someone, *cough *cough @duane * cough *cough, could take a crack at creating a singlenode mapgen that provides the mapgen objects, (biomes, ores, decos, humidity, temperature, and heightmap).

I would like to also point out, that using settings similar to this map_meta.txt file, one can achieve somewhat similar results. This is a mgv7 map_meta file, tweaked over the last couple of years, to create some natural looking terrain, minus cliffs. This also allows using the registered biomes, ores, decos.
+ Spoiler


Keep up the great work!!!

Shad

Re: [mod] Islands - Experimental lua mapgen [islands]

PostPosted: Sat Oct 05, 2019 01:04
by duane
ShadMOrdre wrote:Perhaps someone, *cough *cough @duane * cough *cough, could take a crack at creating a singlenode mapgen that provides the mapgen objects, (biomes, ores, decos, humidity, temperature, and heightmap).


Huh? They're already available to lua. If you want something that places them all, my experimental mapgen can do everything but the ores, but it's never going to be exactly the same. I'm not even sure how the game handles stacking biomes.

ShadMOrdre wrote:This is a mgv7 map_meta file, tweaked over the last couple of years, to create some natural looking terrain, minus cliffs.


The cliffs are the most ingenious part. Making inland cliffs is painful, since you can't determine whether they match the slope without bogging everything down. Islands avoids the issue and makes lovely cliffs where they should be -- it's a marvel of simplicity.

Re: [mod] Islands - Experimental lua mapgen [islands]

PostPosted: Sat Oct 05, 2019 12:12
by runs
I had an idea. A new tropical island biome! This included in default V7 mapgen!

Corals. And maybe some palm trees too.

;-)

Re: [mod] Islands - Experimental lua mapgen [islands]

PostPosted: Sun Oct 06, 2019 09:09
by Termos
ShadMOrdre wrote:I wish that Lua mapgens could use the registered biomes, ores, and decorations.

But they can, ores and decos are single function calls, biomes need more work probably.

ShadMOrdre wrote:I would like to also point out, that using settings similar to this map_meta.txt file, one can achieve somewhat similar results. This is a mgv7 map_meta file, tweaked over the last couple of years, to create some natural looking terrain, minus cliffs.

What you did to V7, and what I did to Carpathian is basically mutilate them into not doing what they're designed to do.

Generating terrain that looks nice watched from above with unlimited view range is relatively easy. The tricky part is to make it look good during normal gameplay at the ground level with limited view distance.
For example mountains look the best watched from the distance and if there's stuff between the beholder and the mountains (e.g. trees). So if we had a 100 node high mountain, and default view distance of 100, then by the time we get to see the mountain we're standing at it's base already.

Re: [mod] Islands - Experimental lua mapgen [islands]

PostPosted: Sun Oct 06, 2019 22:39
by paramat
See these 2 functions https://github.com/minetest/minetest/blob/825579b43d6454cc33607ab8eff4e896b003b801/doc/lua_api.txt#L4404
Anything related to registered biomes does not function in singlenode mapgen, however, ores and decorations can be registered and placed, they just cannot be located by biome.

Re: [mod] Islands - Experimental lua mapgen [islands]

PostPosted: Sat Oct 19, 2019 15:05
by Termos
Update 191019

changes:
    * enabled ore generation
    this also appears to have an unexpected beautifying effect on cliffs and hills.

    * added cotton bush decorations
    so building a boat like this becomes possible

    * solved the issue with overriding mapgen name
    paramat's example uses 'mgname' while the parameter is actually 'mg_name'.