Page 1 of 2

[Mod] Ridges, rivers and paths mapgen [0.7.3] [riverdev]

PostPosted: Tue Apr 29, 2014 05:45
by paramat
Image


Download, rename to riverdev https://github.com/paramat/riverdev/archive/master.zip
Browse code https://github.com/paramat/riverdev

riverdev 0.7.3 by paramat
For Minetest 0.4.12 and later
Depends default stairs bucket
Licenses: Code LGPL 2.1, textures CC BY-SA

This mod is my 'watershed' mapgen https://forum.minetest.net/viewtopic.php?f=11&t=8609 with fewer biomes, 2 path/bridge networks, tunnels/fissures/caves, boulders, improved magma channels and mini-volcanos.
The mod will automatically select 'singlenode' mapgen and will spawn players at the surface but also scattered up to 1280n from world centre
To make your first torches search for coal in tunnel entrances, near sea level or rivers these entrances are sometimes sealed by stone (result of protecting against underground flooding).
Ores are a few nodes underground to prevent easy surface mining in the rocky mountains.


Image


Image


Image


Image


Image

Re: [Mod] Rivers with tributaries [0.1.1] [riverdev]

PostPosted: Tue Apr 29, 2014 12:59
by Tom
Wow, impressive!

Re: [Mod] Rivers with tributaries [0.1.1] [riverdev]

PostPosted: Tue Apr 29, 2014 22:38
by philipbenr
Looks great Paramat. Another one for the record...

Re: [Mod] Rivers with tributaries [0.1.1] [riverdev]

PostPosted: Wed Apr 30, 2014 13:44
by Krock
Yes, that's a nice mapgen.
/me downloads.

Re: [Mod] Rivers with tributaries [0.1.3] [riverdev]

PostPosted: Thu May 01, 2014 07:04
by paramat
Version 0.1.4
Surface material thins with altitude.
Added mod dirt and grass.
Smallest terrain noise scale is back to 24 nodes, looks better.
Added mixwater as a blend of freshwater and seawater.
Overgeneration for continuous grass over y = 47 chunk borders.

Re: [Mod] Rivers with tributaries [0.4.1] [riverdev]

PostPosted: Wed Jul 09, 2014 08:06
by paramat
Version 0.4.1
Added 2 generative paths and bridges over rivers, random support pillars. Removed streams for various good reasons. Added tree areas with varying density.

This mod is the watershed terrain generator modified for experiments, it started as a faster way to test watershed mapgen parameters. In future i intend to spawn wood huts near the paths, perhaps towns also. if i do that by schematics then a player can build their own modules in worldedit, save them in Minetest schematic format and use them in this mod (probably a good idea due to my taste in architecture).

Re: [Mod] Ridges, rivers and paths mapgen [0.4.1] [riverdev]

PostPosted: Fri Jul 11, 2014 05:10
by Daychilde
This is really cool, although so far I haven't found anything like the screenshot above - the three maps I've created so far have wide wide 'rivers' and bridges that go up the river for a ways, so kinda look a little dumb. But I'm sure I'll find a pretty spot soon. :)

Meanwhile - as I'm a Minetest newbie - I notice digging down that it's all stone, no ores. Is there a combination of settings somehow to have ores appear at some depth, or is that the price of playing this?

Either way, thank you for an awesome mod. This is perfect for building cities, which is what I always did in Minecraft anyway. :)

Re: [Mod] Ridges, rivers and paths mapgen [0.4.1] [riverdev]

PostPosted: Fri Jul 11, 2014 09:28
by webdesigner97
I also love this mapgen and I even found a nice place to start a singleplayer world ;)
But I also didn't find ores, will you add them at some point?

Edit: Is the water supposed to stay still (it doesn't flow)?

Re: [Mod] Ridges, rivers and paths mapgen [0.4.1] [riverdev]

PostPosted: Fri Jul 11, 2014 12:17
by Evergreen
Daychilde wrote:This is really cool, although so far I haven't found anything like the screenshot above - the three maps I've created so far have wide wide 'rivers' and bridges that go up the river for a ways, so kinda look a little dumb. But I'm sure I'll find a pretty spot soon. :)

Meanwhile - as I'm a Minetest newbie - I notice digging down that it's all stone, no ores. Is there a combination of settings somehow to have ores appear at some depth, or is that the price of playing this?

Either way, thank you for an awesome mod. This is perfect for building cities, which is what I always did in Minecraft anyway. :)

There are ores in minetest. I think this mod overrides the default mapgen though, so ores might not spawn if you have this mod enabled.

Re: [Mod] Ridges, rivers and paths mapgen [0.4.1] [riverdev]

PostPosted: Fri Jul 11, 2014 15:26
by Krock
Evergreen wrote:There are ores in minetest. I think this mod overrides the default mapgen though, so ores might not spawn if you have this mod enabled.

Yes, minetest.register_ore (or so..) is not used by all mapgens.
I used a simple, random generation of ores and it could be added in this mapgen, too.

https://github.com/paramat/riverdev/blo ... t.lua#L219
https://github.com/SmallJoker/noisetest ... ns.lua#L67

Re: [Mod] Ridges, rivers and paths mapgen [0.4.1] [riverdev]

PostPosted: Fri Jul 11, 2014 18:19
by paramat
Thanks, this is still experimental and i'm still tuning the parameters, i haven't added ores and caves yet, those will slow the generation down a little. Just a warning the terrain will change as i tune.
The water is non flowing and non-renewable, the rivers become a mess otherwise.

Re: [Mod] Ridges, rivers and paths mapgen [0.4.2] [riverdev]

PostPosted: Sun Jul 13, 2014 04:24
by paramat
Version 0.4.2 is available with bugfixes and better tuned parameters.
0.4.1 had too many paths, they are rarer now.
Tunnels would be ideal for this since they are underground paths, i could integrate the tunnel / magma system from intersecting mod.

Re: [Mod] Ridges, rivers and paths mapgen [0.4.3] [riverdev]

PostPosted: Mon Jul 14, 2014 06:09
by paramat
Version 0.4.3
Ores, tunnels, flowers, pines located by altitude, craftable pine wood, stairs and slabs.
To make your first torches search for coal in tunnel entrances, near sea level or rivers these entrances are sometimes sealed by stone (result of protecting against underground flooding).
Ores are a few nodes underground to prevent easy surface mining in the rocky mountains :)
No cactus, dry shrub or papyrus because no desert biomes. No clay but i could add it if it's essential for players.

Re: [Mod] Ridges, rivers and paths mapgen [0.4.3] [riverdev]

PostPosted: Mon Jul 14, 2014 11:31
by webdesigner97
Yay :D Finally ores :D But clay would also be nice ;)

Re: [Mod] Ridges, rivers and paths mapgen [0.4.3] [riverdev]

PostPosted: Mon Jul 14, 2014 11:43
by webdesigner97
Ah, this is the kind of landscape I enjoy! I really want to build a dam here:

Image
Average chunk generation time: 600-900ms

Re: [Mod] Ridges, rivers and paths mapgen [0.4.3] [riverdev]

PostPosted: Mon Jul 14, 2014 13:14
by paramat
webdesigner97 wrote:Average chunk generation time: 600-900ms

Ah cool i was about to ask how fast this is for others, my old half dead laptop takes up to 4s per chunk non luaJIT, i get the impression (and i hope) it generates faster for most of you. My voxmynipples honeymoon is over, i'm used to it and 4s per chunk now seems slow to me :P
Clay should be easy to add, next version.

Re: [Mod] Ridges, rivers and paths mapgen [0.4.3] [riverdev]

PostPosted: Mon Jul 14, 2014 15:36
by webdesigner97
paramat wrote:
webdesigner97 wrote:Average chunk generation time: 600-900ms

Ah cool i was about to ask how fast this is for others, my old half dead laptop takes up to 4s per chunk non luaJIT, i get the impression (and i hope) it generates faster for most of you. My voxmynipples honeymoon is over, i'm used to it and 4s per chunk now seems slow to me :P
Clay should be easy to add, next version.

I'm using the 64bit 0.4.10 stable build with num_emerge_threads = 4, but this setting doesn't even change time that much... It's ok :)

Re: [Mod] Ridges, rivers and paths mapgen [0.4.3] [riverdev]

PostPosted: Mon Jul 14, 2014 15:41
by webdesigner97
The only big "problem" with your mapgen mods is that they define their own nodes, which results in the inabilitity to play in them without creative mode.
Let's take minetest_game as example: Farming is configured to work with default:dirt and default:dirt_with_grass, even though there is an API. Just adding the soil group isn't enough (anymore?)...

Here's what I'd do: Instead of registering new nodes that somehow replace the old ones (e.g. default:dirt, riverdev:dirt), you should use minetest.override_item(), where you can just change e.g. the textures of default:dirt_with_grass, while keeping the original definitions alive. Now let the mapgen place the original nodes and voilĂ : It works fine with minetest_game.

Code example for default:dirt_with_grass:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.override_item("default:dirt_with_grass", {
   tiles = {"default_grass.png", "default_dirt.png", "default_grass.png"},
})

Re: [Mod] Ridges, rivers and paths mapgen [0.4.3] [riverdev]

PostPosted: Tue Jul 15, 2014 02:45
by paramat
I use mod's own nodes because default nodes usually have ABMs running on them which decrease performance, i have noticed how smooth Minetest runs in my mapgens because of this. I wasn't aware that 'soil=1' isn't enough anymore, thanks.
So i have decided to make the mod's own grass, dirt and path nodes drop 'default:dirt', so to farm just dig and place the nodes, this is just like 'tilling' soil to prepare it. This solution means the 'default' ABMs only run on a limited number of nodes. So another thing for next version.
There's an unused schematic folder and file in this mod in preparation for auto-spawning of wood cabins near ther paths, in case anyone wonders why that is there.
EDIT
Can't be bothered adding clay, it's for making red bricks which i dislike the look of, in this mod you can craft pine wood planks, slabs and stairs which will look much better.

Re: [Mod] Ridges, rivers and paths mapgen [0.4.3] [riverdev]

PostPosted: Tue Jul 15, 2014 15:40
by webdesigner97
paramat wrote:I use mod's own nodes because default nodes usually have ABMs running on them which decrease performance, i have noticed how smooth Minetest runs in my mapgens because of this. I wasn't aware that 'soil=1' isn't enough anymore, thanks.
So i have decided to make the mod's own grass, dirt and path nodes drop 'default:dirt', so to farm just dig and place the nodes, this is just like 'tilling' soil to prepare it. This solution means the 'default' ABMs only run on a limited number of nodes. So another thing for next version.
There's an unused schematic folder and file in this mod in preparation for auto-spawning of wood cabins near ther paths, in case anyone wonders why that is there.
EDIT
Can't be bothered adding clay, it's for making red bricks which i dislike the look of, in this mod you can craft pine wood planks, slabs and stairs which will look much better.

Well, the idea is good, but imho this more of a game problem. If riverdev would be used in a subgame, then the creator needs to deal with ABM perfomance.

Re: [Mod] Ridges, rivers and paths mapgen [0.4.3] [riverdev]

PostPosted: Thu Jul 24, 2014 01:42
by crazyginger72
as a quick point, i hate premade path in any kind (no offense to you paramat) is there anyway to have a configurable option for just the paths as the rest is perfect!

Re: [Mod] Ridges, rivers and paths mapgen [0.4.3] [riverdev]

PostPosted: Thu Jul 24, 2014 14:56
by paramat
No offence taken, good to hear you like it. You should update to latest version 0.4.5, then delete lines 300 to 326 and lines 373 to 397, then finally on line 398 change the 'elseif' to 'if'.

Re: [Mod] Ridges, rivers and paths mapgen [0.4.3] [riverdev]

PostPosted: Thu Jul 24, 2014 19:38
by paramat
Because line numbers will change when i next update you'll need to recognise those 2 blocks of code and delete them in future versions, easy since those blocks are obvoiusly the ones that add paths and bridges, don't forget the 'elseif' to 'if' change after the 2nd deleted block.
crazyginger72 eh? 1972 is a special year for me ;)

Re: [Mod] Ridges, rivers and paths mapgen [0.4.3] [riverdev]

PostPosted: Fri Jul 25, 2014 00:50
by crazyginger72
paramat wrote:crazyginger72 eh? 1972 is a special year for me ;)


Actually its my racing number got it randomly when i was 8-9 on my first racecar and its been with me ever since.

Re: [Mod] Ridges, rivers and paths mapgen [0.4.3] [riverdev]

PostPosted: Fri Jul 25, 2014 20:48
by paramat
Instead of line numbers i'll make this clearer.
There are two blocks of code to remove, one in the '-- chunk generation' section and one in the '-- overgeneration' section, each block looks like this:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
            elseif y > YSAND
            and ((not wood and density < 0 and under[si] ~= 0)
            or (wood and densitybase > trsand * 2 and densitybase < trsand * 2 + 0.002))
            and (((n_patha >= 0 and n_xprepatha < 0) or (n_patha < 0 and n_xprepatha >= 0)) -- patha
            or ((n_patha >= 0 and n_zprepatha < 0) or (n_patha < 0 and n_zprepatha >= 0))
            or ((n_pathb >= 0 and n_xprepathb < 0) or (n_pathb < 0 and n_xprepathb >= 0)) -- pathb
            or ((n_pathb >= 0 and n_zprepathb < 0) or (n_pathb < 0 and n_zprepathb >= 0))) then
               if wood and math.random() < 0.1 then
                  local vi = area:index(x, y-2, z)
                  for j = 1, 16 do
                     data[vi] = c_wood
                     vi = vi - emerlen
                  end
               end
               for k = -1, 1 do
                  local vi = area:index(x-1, y-1, z+k)
                  for i = -1, 1 do
                     if wood then
                        data[vi] = c_wood
                     else
                        data[vi] = c_path
                     end
                     vi = vi + 1
                  end
               end
               stable[si] = 0
               under[si] = 0

Immediately after the second block is an 'elseif' statement which needs to be edited to 'if'. So the '-- overgeneration' section should look like this:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
         elseif chunkxz and y == y1 + 1 then -- overgeneration
            if density < 0 and under[si] ~= 0 then
               if under[si] == 1 and nodid ~= c_path and nodidu ~= c_path
               and nodid ~= c_wood and nodidu ~= c_wood then
                  data[viu] = c_grass
               end
            end
         end

Finally, a new thing to mention, to remove the pathlike clearings through forests, which i suspect crazyginger72 will not like, the '-- air above surface' section should be edited to this:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
            elseif density < 0 and under[si] ~= 0 then -- air above surface
               if under[si] == 1 and nodid ~= c_path and nodidu ~= c_path
               and nodid ~= c_wood and nodidu ~= c_wood then
                  if math.random() < APPCHA * n_tree and y < YPINE then
                     riverdev_appletree(x, y, z, area, data)
                  elseif math.random() < PINCHA * n_tree and y >= YPINE then
                     riverdev_pinetree(x, y, z, area, data)
                  else
                     data[viu] = c_grass
                     if math.random() < FLOCHA then
                        riverdev_flower(data, vi)
                     elseif math.random() < GRACHA * n_grass then -- grasses
                        data[vi] = c_grass5
                     end
                  end
               end
               stable[si] = 0
               under[si] = 0

Re: [Mod] Ridges, rivers and paths mapgen [0.4.6] [riverdev]

PostPosted: Fri Jul 25, 2014 22:24
by paramat
Version 0.4.6

Finally added the spawnplayer function to spawn players at the surface instead of underground.
Players will be spawned in the world randomly scattered up to 1280n from world centre, this i find interesting because players may have to travel to find other players. This also gives them the options of hiding away from other players in a secret base, or travelling away from world centre if they wish to be alone. This also avoids one small spawn area being stripped of resources by a dense cluster of players, or being over-developed by unadventurous players all building near the spawn point.

Possible future development: i may add more biomes, but since this is a river mapgen i will only include humid and wet biomes over a range of temperatures, so i am thinking: snowy forest, forest and jungle.

Re: [Mod] Ridges, rivers and paths mapgen [0.4.6] [riverdev]

PostPosted: Sun Jul 27, 2014 07:15
by crazyginger72
wow thanks paramat :D

im ok with code but as far as your mapgen stuff well its a bit for me at the moment lol!

Re: [Mod] Ridges, rivers and paths mapgen [0.4.6] [riverdev]

PostPosted: Fri Aug 01, 2014 16:20
by paramat
Screenshots removed.

Re: [Mod] Ridges, rivers and paths mapgen [0.4.6] [riverdev]

PostPosted: Fri Aug 01, 2014 17:09
by Krock
I've the feeling, it would look much nicer with flowing water

Image

Re: [Mod] Ridges, rivers and paths mapgen [0.4.6] [riverdev]

PostPosted: Fri Aug 01, 2014 17:24
by paramat
Renewable water completely messes up the rivers, but you can make the water flow to a limited range by editing this line in all the water node definitions:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
liquid_range = 0,

I find 3 looks good while still limiting processing load. Because there's so much water the default range of 8 is not recommended, seems to overload the water processing queue, because the rivers can get fairly steep the range needs to be fairly small, i find somehting around 3 optimum.
Thanks for reminding me i will probably increase the range by default.