[Mod] 3-biome mapgen [noisetest]

Post Reply
User avatar
Krock
Developer
Posts: 4649
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

[Mod] 3-biome mapgen [noisetest]

by Krock » Post

What is Noisetest?
Image - Image
(Click to view full screenshot)

It's a lua mapgen which bases on 2 2D-perlin noises, one for the height of terrain, the other for temperature/biomes.
It bases on paramat's noisegrid mapgen. I used it to learn how those noises work.

Features:
Biomes with jungles, normal grasslands, snow and deserts
Frozen oceans
Ores (not very realistic - at least they generate)
A canyon in the middle of grassland
Diffrent seeds for diffrent worlds
Some terrain elevation
Generation optimization underground and above 256m
Caves! (With lava)
Settings per world

Generation speed: ~800ms (+/- 200ms)
License: WTFPL
Depends: default, flowers

Browse codes
Download latest *.zip

How to speed up mapgen time: (not really, it just splits the time into smaller areas)
in "minetest.conf"

Code: Select all

max_block_generate_distance = 0.5
in "worlds\<your world>\map_meta.txt"

Code: Select all

chunksize = 3
Last edited by Krock on Mon May 20, 2019 17:07, edited 17 times in total.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
Hybrid Dog
Member
Posts: 2828
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

Re: [Mod] An other lua mapgen [noisetest]

by Hybrid Dog » Post

Does it generate cliffs? If not, you could use a third perlin noise for the area where the nodes are higher/deeper.
h = h+math.min(math.max(noise*20, -10), 10)

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

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

Re: [Mod] An other lua mapgen [noisetest]

by Krock » Post

I'm not very interested in cliffs, therefore I haven't added them yet.
Maybe later. Thanks for the code suggestion.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: [Mod] An other lua mapgen [noisetest]

by paramat » Post

Very cool to see you're learning lua mapgen, the first screenshot looks lovely ... 2D noise is very smooth and curvy but of course no overhangs. 3D noise has a slight gridlike look to it, especially in overhead or sideview maps, hmmmm tells me he wants to offer 'eased' 3D noise which is smoother.

Lua mapgen is really getting popular now thanks to voxmanips, a year ago when i arrived here it was ridiculous: 30-60s per chunk, unbearably slow even for dev work let alone gameplay, almost no-one worked on lua mapgen, luckily i was crazy enough to do it anyway.

User avatar
philipbenr
Member
Posts: 1897
Joined: Fri Jun 14, 2013 01:56
GitHub: philipbenr
IRC: philipbenr
In-game: robinspi
Location: United States

Re: [Mod] An other lua mapgen [noisetest]

by philipbenr » Post

\o/ Another magpen!. This looks really good Krock.

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

Re: [Mod] An other lua mapgen [noisetest]

by Krock » Post

Version 2!

- Cliffs: If too small, change the multiplication factor at

Code: Select all

Line 120   local n_cliffs = nvals_cliffs[nixz] * 7
- Fixed seed per world: Used noisetest_params.txt in the world folder

- Bug fixes with the biomes

Image
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

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

Re: [Mod] An other lua mapgen [noisetest]

by Krock » Post

Version 3
Added better ore generation
Means, ore chances increase with deepness:

Code: Select all

20*20*20 - ((normal_surface - current_depth) / 4)
That needs a new version number :)
Image

EDIT: Fixed possible terrain destroy bug
Last edited by Krock on Sat May 24, 2014 14:02, edited 1 time in total.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
Hybrid Dog
Member
Posts: 2828
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

Re: [Mod] An other lua mapgen [noisetest]

by Hybrid Dog » Post

Image
nice ravines, you could add water to some of them



ImageDo you use a modified leafdecay system?

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

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

Re: [Mod] An other lua mapgen [noisetest]

by Krock » Post

Hybrid Dog wrote:nice ravines, you could add water to some of them

Do you use a modified leafdecay system?
When I'm very bored somewhen, I'll add water in them.

Could be..I don't remember all my changes in the minetest_game
EDIT: fixed.
Last edited by Krock on Sat Jun 21, 2014 12:11, edited 2 times in total.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

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

Re: [Mod] An other lua mapgen [noisetest]

by Krock » Post

Version 3.5 - caves!
- Added caves
- Added lava caves
Lava caves appear under -80m, regular at -20

Image
(Click to view full screenshot)
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
nman3600
Member
Posts: 168
Joined: Fri Feb 07, 2014 17:06
GitHub: nman3600
IRC: nman3600
In-game: nman3600

Re: [Mod] An other lua mapgen [v3.6] [noisetest]

by nman3600 » Post

I found a river looks awesome then FLOOD but i still love it
Spoiler
Image
Spoiler
Image
There is just no angry way to say 'Bubbles'

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

Re: [Mod] An other lua mapgen [noisetest]

by Krock » Post

Version 3.7
- Larger biomes
- Raising of terrain..
- Sand and dirt beaches
- ehm
- renamed some *noisegrid* to *noisetest*
- made older worlds corrupt because a new seed gets generated. horray!

EDIT: Uploaded a better version of 3.7, that's how it looks like at the moment:
Image
(Click to view full screenshot)
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

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

Re: [Mod] An other lua mapgen [noisetest]

by Krock » Post

Version 4
- better caves, using a single 2D-noise
- stupid lava appears in some caves
- plantlike leaves on/off
- fixed leafdecay

It's possible to switch back to the older, random cave system, if the current is too slow.
Disabling lava is possible, too.

Download link in first post.

Image

EDIT: Uploaded 2nd release of v4, fixed leafdecay
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

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

Re: [Mod] An other lua mapgen [noisetest]

by Krock » Post

Version 4.4
- settings per world, using "yourworld\noisetest_settings.txt"
- breaking again older maps
- code cleanups

Download link in first post.

No screenshot this time :(
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: [Mod] An other lua mapgen [v4.4] [noisetest]

by paramat » Post

I like the look of those new caves, interesting they were created by 2D noise, i will be looking at your code to see how this is done. Simple, fast generation that creates less realistic, more abstract shapes has appeal and character and is a nice change from highly detailed 3D noise, it is also very much the core character and spirit of Minetest: simplification and abstraction to enable strengths in other areas.

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

Re: [Mod] 3-biome mapgen [v4.4] [noisetest]

by Krock » Post

Updates:
- Added pseudo-speedup for mapgen time
- Fixed not reported bug, which made this mod not startable
- Fixed the bug, where saplings are white when dropped

Re-download version 4.4 to update - same link, other archive content.

@paramat: It uses 1x 2D perlin noise but it's slow anyway. The caves are buggy and do not generate over other mapblocks.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

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

Re: [Mod] An other lua mapgen [noisetest]

by Krock » Post

Version 4.6
- A higher chance to get ores
- Desert stone & dry shrub added
- Forests (trees aren't enough near to each other but it already generates empty grasslands in between)
- The "multiple dirt_with_grass stacked on each other"-bug has been fixed
- Pre-calculating the terrain high and biomes (experimental, trying to reach a faster generation)

Random image of cliffs: Image
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

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

Re: [Mod] An other lua mapgen [noisetest]

by Krock » Post

Version 4.7
- Ice!
- Better biome settings

Create a new world to enjoy that cold terrain!

Image Image

EDIT:
Version 4.8
- (again) better biome settings
- /regenerate command to regenerate an area

Image
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

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

Re: [Mod] 3-biome mapgen [noisetest]

by Krock » Post

*BUMP*

There was a new version, 4.8 but now it's on Github.
So, feel free to write pull requests and/or issues.

Updated links in the first post. Enjoy.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: [Mod] 3-biome mapgen [noisetest]

by paramat » Post

Regeneration, nice, i recently realised this can be done easily in a lua mapgen, i added this feature for the first time in my unreleased nysauto mod. There is demand for this feature in mgv6 but it's difficult to exactly replicate mgv6 in a lua mod, i'm not even going to try :)

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

Re: [Mod] 3-biome mapgen [noisetest]

by Krock » Post

paramat wrote:Regeneration, nice, i recently realised this can be done easily in a lua mapgen, i added this feature for the first time in my unreleased nysauto mod. There is demand for this feature in mgv6 but it's difficult to exactly replicate mgv6 in a lua mod, i'm not even going to try :)
Thanks, I had serval bugged blocks, where nothing was generated because it contained a Lua error and didn't "draw" correctly.
So, I needed a way to regenerate them. But the regeneration is slower than the real generation because it does not exactly replace the complete mapblock.

The next thing I try to get working is a good flattening (like in v6), so it's not everyhere hilly.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

Post Reply

Who is online

Users browsing this forum: No registered users and 15 guests