Page 1 of 2

[mod] Islands - Experimental lua mapgen [islands]

Posted: 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]

Posted: 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]

Posted: 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]

Posted: 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]

Posted: 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]

Posted: 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]

Posted: Thu Oct 03, 2019 07:34
by u18398
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]

Posted: 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]

Posted: 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

Code: Select all

mgv7_np_cave2 = {
	flags = defaults
	lacunarity = 2
	offset = 0
	scale = 12
	spread = (67,67,67)
	seed = 10325
	octaves = 3
	persistence = 0.5
}
mgv7_np_cave1 = {
	flags = defaults
	lacunarity = 2
	offset = 0
	scale = 12
	spread = (61,61,61)
	seed = 52534
	octaves = 3
	persistence = 0.5
}
mgv7_np_cavern = {
	flags = defaults
	lacunarity = 2
	offset = 0
	scale = 1
	spread = (384,128,384)
	seed = 723
	octaves = 5
	persistence = 0.63
}
mgv7_cave_width = 0.09
mg_biome_np_heat = {
	flags = defaults
	lacunarity = 2
	offset = 50
	scale = 50
	spread = (1000,1000,1000)
	seed = 5349
	octaves = 3
	persistence = 0.5
}
mgv7_lava_depth = -256
mgv7_np_mount_height = {
	flags = defaults
	lacunarity = 2
	offset = 256
	scale = 112
	spread = (1000,1000,1000)
	seed = 72449
	octaves = 3
	persistence = 0.6
}
mg_biome_np_humidity_blend = {
	flags = defaults
	lacunarity = 2
	offset = 0
	scale = 1.5
	spread = (8,8,8)
	seed = 90003
	octaves = 2
	persistence = 1
}
mgv7_np_ridge = {
	flags = defaults
	lacunarity = 2
	offset = 0
	scale = 1
	spread = (100,100,100)
	seed = 6467
	octaves = 4
	persistence = 0.75
}
mgv7_large_cave_depth = -33
mg_biome_np_humidity = {
	flags = defaults
	lacunarity = 2
	offset = 50
	scale = 50
	spread = (1000,1000,1000)
	seed = 842
	octaves = 3
	persistence = 0.5
}
mg_biome_np_heat_blend = {
	flags = defaults
	lacunarity = 2
	offset = 0
	scale = 1.5
	spread = (8,8,8)
	seed = 13
	octaves = 2
	persistence = 1
}
mgv7_floatland_level = 1280
mgv7_np_terrain_base = {
	flags = defaults
	lacunarity = 2.11
	offset = -4
	scale = 210
	spread = (600,600,600)
	seed = 5934
	octaves = 8
	persistence = 0.2
}
mgv7_np_float_base_height = {
	flags = defaults
	lacunarity = 2
	offset = 48
	scale = 24
	spread = (300,300,300)
	seed = 907
	octaves = 4
	persistence = 0.7
}
seed = 16096304901732432682
water_level = 1
mapgen_limit = 31000
mg_name = v7
mgv7_cavern_threshold = 0.7
mgv7_dungeon_ymin = -31000
chunksize = 5
mg_flags = nocaves, nodungeons, light, decorations, biomes
mgv7_np_height_select = {
	flags = defaults
	lacunarity = 2.11
	offset = -0.4
	scale = 1
	spread = (500,500,500)
	seed = 4213
	octaves = 8
	persistence = 0.2
}
mgv7_np_mountain = {
	flags = defaults
	lacunarity = 2
	offset = -0.6
	scale = 1
	spread = (250,350,250)
	seed = 5333
	octaves = 5
	persistence = 0.63
}
mgv7_shadow_limit = 1024
mgv7_float_mount_height = 128
mgv7_float_mount_exponent = 0.75
mgv7_np_terrain_persist = {
	flags = defaults
	lacunarity = 2.11
	offset = 0.6
	scale = 0.1
	spread = (2000,2000,2000)
	seed = 539
	octaves = 3
	persistence = 0.6
}
mgv7_cavern_limit = -256
mgv7_cavern_taper = 256
mgv7_dungeon_ymax = 31000
mgv7_float_mount_density = 0.6
mgv7_np_terrain_alt = {
	flags = defaults
	lacunarity = 2.11
	offset = -4
	scale = 35
	spread = (600,600,600)
	seed = 5934
	octaves = 8
	persistence = 0.3
}
mgv7_spflags = nomountains, noridges, nofloatlands, nocaverns
mgv7_np_filler_depth = {
	flags = defaults
	lacunarity = 2
	offset = 0
	scale = 1.2
	spread = (150,150,150)
	seed = 261
	octaves = 3
	persistence = 0.7
}
mgv7_mount_zero_level = 0
mgv7_np_ridge_uwater = {
	flags = defaults
	lacunarity = 2
	offset = 0
	scale = 1
	spread = (1000,1000,1000)
	seed = 85039
	octaves = 5
	persistence = 0.6
}
mgv7_np_floatland_base = {
	flags = defaults
	lacunarity = 2
	offset = -0.6
	scale = 1.5
	spread = (600,600,600)
	seed = 114
	octaves = 5
	persistence = 0.6
}
[end_of_params]
Keep up the great work!!!

Shad

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

Posted: 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]

Posted: 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]

Posted: 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]

Posted: Sun Oct 06, 2019 22:39
by paramat
See these 2 functions https://github.com/minetest/minetest/bl ... .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]

Posted: 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'.

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

Posted: Thu Feb 04, 2021 11:34
by Termos
Update 210204

changes:
  • all new textures and decorations
Experimenting with light, shadow and color.
The main goal of this exercise was to create the impression of the sun shining, and I think that goal has been met with some success.

Recommended settings:
  • Tone mapping - off
  • Mip mapping - on
  • Texture filtering - off
Image

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

Posted: Thu Feb 04, 2021 16:58
by u18398
This is the mapgen you need in times of Corona :D
Holiday in front of your screen !

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

Posted: Thu Feb 04, 2021 19:47
by philipbenr
This looks like a lot of fun, I'll have to give it a try!

Edit: After giving it a try, the novelty feels great. There are some things I missed in it:
  • More trees/foilage: Jungle trees and jungle grass are great candidates for this mod to implement on some islands. The current trees are a little sparse and seem just kinda thrown on.
  • More bare stone: This is probably harder to implement right away, but I do miss seeing some large volcanic rock islands. It would add some variety to the otherwise repetitive environment.
  • Volcanos? Would be really neat and be a unique twist for this mapgen
One other small thing: when playing with my own texture pack enabled that works fine with regular Minetest, some problems arose with this mapgen, specifically with the grass textures.

All that said, this feels great and definitely feels unique compared to what else is out there. I will be watching to see how this mod progresses.

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

Posted: Fri Feb 05, 2021 12:25
by Termos
philipbenr wrote:
Thu Feb 04, 2021 19:47
One other small thing: when playing with my own texture pack enabled that works fine with regular Minetest, some problems arose with this mapgen, specifically with the grass textures.
This is actually the interesting aspect for me, at least with this particular release. Can you elaborate what were those problems exactly?

Is it about the intensity by any chance? Textures have to be fairly bright in order to create the sunlight impression and bring out shadows.One of the goals was to see how much intensity I can get away with.

Can you confirm that you're using it with Tone Mapping off, and specify what kind of display device it is?
philipbenr wrote:
Thu Feb 04, 2021 19:47
More trees/foilage: Jungle trees and jungle grass are great candidates for this mod to implement on some islands. The current trees are a little sparse and seem just kinda thrown on.
More bare stone: This is probably harder to implement right away, but I do miss seeing some large volcanic rock islands. It would add some variety to the otherwise repetitive environment.
Volcanos? Would be really neat and be a unique twist for this mapgen
These are not so easy to do because lua mapgens don't support biomes, also there's some weird stuff with deco generation, so it's difficult to get them closer apart. But some improvement is possible I'm sure.

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

Posted: Fri Feb 05, 2021 18:42
by philipbenr
Image
Here's a screenshot.

The texture pack is mtuotp with some modifications.
The problem persists with or without tone mapping.
It is on a regular IPS monitor.
I downloaded the mod off of contentDB at the time of writing my message.

Tbh, it looks like the Z+ grass texture is being overriden by the mod, but the X and Z textures are not.
Termos wrote:
Fri Feb 05, 2021 12:25
These are not so easy to do because lua mapgens don't support biomes, also there's some weird stuff with deco generation, so it's difficult to get them closer apart. But some improvement is possible I'm sure.
I see. That would make it hard, wouldn't it... Hopefully someone is making improvements to the Lua API and that custom biomes and better decorations wouldn't be too hard, as this is really a good looking start.

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

Posted: Fri Feb 05, 2021 22:13
by Termos
philipbenr wrote:
Fri Feb 05, 2021 18:42
Here's a screenshot.
*facepalm*
Something must have gone wrong when merging, the cdb release ended up with the old version, sorry about that.
Now it's reuploaded and verified.

This new version does use more decorations, but custom tp's won't work out of the box as it doesn't make use of MTG nodes and textures.

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

Posted: Fri Feb 05, 2021 22:20
by Termos
Update 210205

Yesterday I uploaded the wrong version by mistake, it's fixed now, for reals.

Image

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

Posted: Sat Feb 06, 2021 00:41
by ywwv
this is a good mapgem. we can be like the stranded crew of the ship essex.

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

Posted: Sat Feb 06, 2021 10:38
by u18398
Termos wrote:
Fri Feb 05, 2021 22:20
Update 210205
This looks totally different now :) I was already blaming my old eyes and fainting
eyesight yesterday :D

Image


The shadow of the palms even vanish if you chop them down. But they do not change
with the sun. Also you can find ores now in the underground which wasn't possible in the
very first version iirc.
[Edit]
Is there a way to make your dirt be able to turn into soil after using a hoe ?

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

Posted: Sat Feb 06, 2021 11:43
by Termos
Gundul wrote:
Sat Feb 06, 2021 10:38
The shadow of the palms even vanish if you chop them down. But they do not change
with the sun.
That would require changes to the engine.
Those shadows are the same that are present in MTG, but there they're barely visible because textures are way too dark and the light curve is too flat.
Gundul wrote:
Sat Feb 06, 2021 10:38
Is there a way to make your dirt be able to turn into soil after using a hoe ?
Currently no, I made my own nodes for everything because reasons,
but I might revert that if it helps.

By the way, I wonder if water life would work with this, considering almost all MTG nodes are gone.

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

Posted: Sat Feb 06, 2021 13:47
by u18398
Termos wrote:
Sat Feb 06, 2021 11:43


By the way, I wonder if water life would work with this, considering almost all MTG nodes are gone.
It does. :) (I added islands:water_source to salty water, I will push in a few minutes).
There are only a few spawning anormalies because the landscape does not fit with the biome data.
Like in my example world I used valleys mapgen and now have tropical islands in the ice_shelf biome :D

If you do not need the biomes it would help water_life if there weren't any at all. But I can do this in water_life.
If biomes are not needed I just unregister all which I do not need for spawning.

I will take a look at the hoe mod. Maybe there is an other solution. Or maybe you only override the default dirt_with_grass with your own texture ?