Page 1 of 2

[Mod] MapGenerator - regular maps by Lua [lualandmg]

Posted: Tue Jul 29, 2014 19:04
by Krock
LuaLandMG
Previously called "yappy". Name change due large backwards compatibility break.

This mapgen is written in Lua, designed to offer a slightly different landscape than available in mgv6.
Image
Old, some really old screenshots

Features:
  • Trees: Apple, Pine and Oak
  • Cactus
  • Ores: Custom system replaced by the Lua API function (WIP)
  • Caves: Empty or filled with lava
  • Biomes: Desert, Grasslands and Arctic with overlapping, smaller biomes in between
  • Water: Normal, Ice form or none, when too hot
  • Mudflow: Makes cave entrances fancy
What it uses:
  • 4x 2D-perlin noise: Used above -80m for terrain/mountain height, tree generation and temperature[/i]
  • 1x 3D-perlin noise: Cave generation
Licenses:
Codes and textures: BSD 3-Clause
Pine tree from HeroOfTheWinds and paramat: WTFPL

Depends: default, flowers

Download: master *.zip | View source

Re: [Mod] Again a Lua mapgen [yappy]

Posted: Tue Jul 29, 2014 19:15
by HeroOfTheWinds
Very neat, I'll have to try this out later. Pretty much any mapgen with rivers is neat in my book. Question though: why do those trees have some off-white in the texture? Is that some sort of alpha error with fancy trees off?

Also, the pine tree is paramat's originally, mine is just a plain ol' copy of his. xD

Re: [Mod] Again a Lua mapgen [yappy]

Posted: Tue Jul 29, 2014 19:49
by philipbenr
Very good. I am looking for a good magpen for my indev subgame. I liked mg, but It really wasn't working out... Your other one was rather promising, but not quite good enough. Anyhoo, I'll be watching this topic pretty closely.

Re: [Mod] Again a Lua mapgen [yappy]

Posted: Tue Jul 29, 2014 20:05
by Krock
HeroOfTheWinds wrote:Question though: why do those trees have some off-white in the texture? Is that some sort of alpha error with fancy trees off?

Also, the pine tree is paramat's originally, mine is just a plain ol' copy of his. xD
I'll try to fix this bug soon.

I already thought, it could be a copy of paramat's mapgen, so I just added both names.
philipbenr wrote:Anyhoo, I'll be watching this topic pretty closely.
Nice to see someone interested in this mapgen :)

Re: [Mod] Again a Lua mapgen [yappy]

Posted: Tue Jul 29, 2014 20:38
by sfan5
I think something is wrong...
Image

Re: [Mod] Again a Lua mapgen [yappy]

Posted: Tue Jul 29, 2014 21:23
by Krock
sfan5 wrote:I think something is wrong...
https://cdn.mediacru.sh/cPbGVBpBfu6D.png
Feature! Under the 1st layer is sand, cacti loves sand.

Re: [Mod] Again a Lua mapgen [yappy]

Posted: Wed Jul 30, 2014 02:58
by paramat
Hi, i saw this on IRC logs:
* Krock wonders if there's something like <PerlinNoise>:get3d(x, y, z) and which returns a number
There is but it's not well documented, see my very early (pre voxelmanip, pre perlinmap) mods.

In the parameters section set the noise parameters:

Code: Select all

local SEEDDIFF = 1975
local OCTAVES = 5
local PERSISTENCE = 0.6
local SCALE = 384
Here 'SCALE' equals the 'spread' of perlinmap noise parameters, the size in nodes of the largest pattern found in the noise. It has one value instead of 3 so applies to all 3 dimensions.
'SEEDDIFF' is the same value as 'seed' in perlinmap noise values.

Then use this once:

Code: Select all

local perlin = minetest.get_perlin(SEEDDIFF, OCTAVES, PERSISTENCE, SCALE)
Then you can get multiple noise values of any points in the world by using this multiple times:

Code: Select all

local noise = perlin:get2d({x=x,y=z})
Where x and z are the world co-ordinates.
Note 'x=x, y=z' because 2d noise always expects 2 values x and y and you're inputting the world co-ordinates x and z.
For 3D noise:

Code: Select all

local noise = perlin:get3d({x=x,y=y,z=z})

Re: [Mod] Again a Lua mapgen [yappy]

Posted: Wed Jul 30, 2014 07:32
by Krock
paramat wrote:Hi, i saw this on IRC logs:
* Krock wonders if there's something like <PerlinNoise>:get3d(x, y, z) and which returns a number
There is but it's not well documented, see my very early (pre voxelmanip, pre perlinmap) mods.

<snip>
Thanks for your explanation, other IRC users were also able to help with that.
I searched that function on the wrong part in the lua_api (minetest.get_perlin_map).
Could you extend minetest.get_perlin at the dev wiki with your explantation, so it's easier to understand?
(Future) mod developers could appreciate that.

EDIT: Example map:
Image

Re: [Mod] Again a Lua mapgen [yappy]

Posted: Fri Aug 01, 2014 17:36
by Krock
<snip>

Re: [Mod] Again a Lua mapgen [yappy]

Posted: Fri Aug 01, 2014 17:51
by paramat
Your screenshot 2 posts above looks lovely, those appletree leaves do not though, they need a dark background behind the leaves, they look like cobblestone from a distance ;)

Re: [Mod] Again a Lua mapgen [yappy]

Posted: Fri Aug 01, 2014 22:38
by philipbenr
sfan5 wrote: I think something is wrong...
Image
That's not a bug, that's a :
Krock wrote: Feature!
;)

I'll be taking a look at the latest sooner or later, so please, keep it up Krock. :)

Re: [Mod] Again a Lua mapgen [yappy]

Posted: Sun Aug 03, 2014 10:01
by Krock
philipbenr wrote:That's not a bug, that's a :
Krock wrote: Feature!
Well, I dropped this feature now and added:

- clay (in sand, underwater)
- jungle trees (from default game)
- jungle grass

Image

Re: [Mod] Again a Lua mapgen [yappy]

Posted: Sun Aug 17, 2014 07:46
by Krock
(outdated, screenshots deleted)

Posted: Mon Aug 18, 2014 18:13
by Krock
(outdated, screenshots deleted)

Re: [Mod] Again a Lua mapgen [yappy]

Posted: Mon Aug 18, 2014 20:17
by philipbenr
I would like and almost use this magpen all the time, except for one thing. It lacks a bit of interest. One suggestion; Add things like birch and oak trees in the mix with forests. I would do it myself (and I just might) but I am too lazy. :)

Re: [Mod] Again a Lua mapgen [yappy]

Posted: Tue Aug 19, 2014 15:45
by Calinou
Krock wrote:Update!
- Added a simple mudflow
- Made caves generating also at surface

What is mudflow?

Without:
Image
And with:
Image
Heh, mud flow is explicity disabled in new worlds created with Carbone (to make world generation a bit faster and better-looking).

Re: [Mod] Again a Lua mapgen [yappy]

Posted: Tue Aug 19, 2014 18:18
by Krock
philipbenr wrote:One suggestion; Add things like birch and oak trees in the mix with forests.
Asked & added:

Krock presents: Oak trees
Image
Calinou wrote:Heh, mud flow is explicity disabled in new worlds created with Carbone (to make world generation a bit faster and better-looking).
Seriously? Do you think the stone-only screenshot looks better than the one, overed with dirt?

Re: [Mod] Again a Lua mapgen [yappy]

Posted: Tue Aug 19, 2014 18:44
by Inocudom
In the snow biomes, the ice goes far, far underground. I have seen lava caves, diamonds, and mese in it, in fact.

Are you planning to post this mod in the Freeminer forums and test it there? It seems Freeminer doesn't have LuaVoxelManip anymore, but I need a second opinion.

Re: [Mod] Again a Lua mapgen [yappy]

Posted: Tue Aug 19, 2014 22:59
by paramat
Krock i prefer your mudflow to no mudflow. You can avoid generating overhanging unstable dirt and sand by using my stability table system as demonstrated in my 'stability' mod.

Re: [Mod] Again a Lua mapgen [yappy]

Posted: Sun Aug 31, 2014 08:52
by Krock
paramat wrote:Krock i prefer your mudflow to no mudflow. You can avoid generating overhanging unstable dirt and sand by using my stability table system as demonstrated in my 'stability' mod.
I combined mudflow with stability now. (desert) sand will have a (desert) stone under it.

Re: [Mod] Again a Lua mapgen [yappy]

Posted: Sat Sep 06, 2014 08:58
by Krock
Added better biome borders!

Image
Interesting what 1 new line and 1 changed line of code can do..

Re: [Mod] Again a Lua mapgen [yappy]

Posted: Sat Sep 06, 2014 14:43
by ExeterDad
Borders with a more gradual transition, nice feature.

Re: [Mod] Again a Lua mapgen [yappy]

Posted: Sat Sep 06, 2014 17:12
by Sol
Krock wrote:Added better biome borders!
That looks awesome.

Re: [Mod] Again a Lua mapgen [yappy]

Posted: Sun Sep 07, 2014 11:52
by Krock
Sol wrote:
Krock wrote:Added better biome borders!
That looks awesome.
Thanks.

And this is how caves look right now:
Image

Re: [Mod] Again a Lua mapgen [yappy]

Posted: Sun Sep 07, 2014 15:12
by srifqi
Krock wrote:And this is how caves look right now:--img--
A big entrance.