Page 1 of 1

[Mod] 3-biome mapgen [noisetest]

Posted: Fri May 23, 2014 14:26
by Krock
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

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

Posted: Fri May 23, 2014 17:35
by Hybrid Dog
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)

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

Posted: Fri May 23, 2014 19:05
by Krock
I'm not very interested in cliffs, therefore I haven't added them yet.
Maybe later. Thanks for the code suggestion.

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

Posted: Fri May 23, 2014 21:15
by paramat
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.

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

Posted: Fri May 23, 2014 23:00
by philipbenr
\o/ Another magpen!. This looks really good Krock.

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

Posted: Sat May 24, 2014 08:33
by Krock
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

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

Posted: Sat May 24, 2014 11:04
by Krock
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

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

Posted: Sat May 24, 2014 11:58
by Hybrid Dog
Image
nice ravines, you could add water to some of them



ImageDo you use a modified leafdecay system?

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

Posted: Sat May 24, 2014 12:13
by Krock
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.

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

Posted: Sat May 24, 2014 13:57
by Krock
Version 3.5 - caves!
- Added caves
- Added lava caves
Lava caves appear under -80m, regular at -20

Image
(Click to view full screenshot)

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

Posted: Wed May 28, 2014 08:36
by nman3600
I found a river looks awesome then FLOOD but i still love it
+ Spoiler
+ Spoiler

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

Posted: Fri May 30, 2014 11:44
by Krock
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)

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

Posted: Sat Jun 07, 2014 10:15
by Krock
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

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

Posted: Fri Jun 13, 2014 18:44
by Krock
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 :(

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

Posted: Fri Jun 13, 2014 21:17
by paramat
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.

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

Posted: Sun Jun 15, 2014 12:01
by Krock
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.

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

Posted: Sat Jun 21, 2014 12:01
by Krock
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

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

Posted: Sun Jul 06, 2014 17:28
by Krock
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

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

Posted: Fri Jul 11, 2014 15:15
by Krock
*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.

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

Posted: Mon Jul 14, 2014 11:12
by paramat
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 :)

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

Posted: Mon Jul 14, 2014 11:30
by Krock
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.