Difference between revisions of "Map generator"

From Minetest Wiki
Jump to navigation Jump to search
m (wikilink)
(→‎valleys: isn't AMPLITUDE HOW loud YOU are?)
 
(31 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 
{{Languages}}
 
{{Languages}}
  
The '''map generator''' is the [[Minetest]] component that generates the [[Maps|map]].
+
The '''map generator''' (“mapgen” for short) is the [[Minetest]] component that generates the [[Maps|map]]. This page concentrates on terrain generation. For the biomes (block surface, vegetation and such), head over to [[Biomes]].
 
 
== Overview ==
 
  
 +
== Introduction ==
 
This complex program, integrated into the game, can generate procedurally the [[Maps|map]], which is the world the player evolves in. It is based on Perlin noises, functions which allow associating to each point a random yet consistent value.
 
This complex program, integrated into the game, can generate procedurally the [[Maps|map]], which is the world the player evolves in. It is based on Perlin noises, functions which allow associating to each point a random yet consistent value.
  
 
== Generators ==
 
== Generators ==
 +
There is a number of different map generators. It is possible to choose between them when creating a [[Maps|map]]. Some [[mods]] may change them radically, also all map generators allow for a lot of configuration in the advanced settings menu.
 +
 +
All map generators have biomes. In all map generators except v6 these biomes can be defined by [[mods]] using the Biome API. The v6 map generator is special because its biomes are completely predefined and can't be changed trivially.
 +
 +
'''Important''': '''v5 and v6 are not legacy map generators.''' “v5”, “v6” and “v7” are names, not version numbers. ''All'' mapgens included in Minetest are officially supported and updated.
 +
 
=== Overview ===
 
=== Overview ===
There are a number of different map generators. It is possible to choose between them when creating a [[Maps|map]]. <br />
+
These are the available mapgens described in brief:
Some [[mods]] may change them radically, also all map generators allow for a lot of configuration.
 
  
* '''v5''': The oldest map generator, renewed for newer Minetest versions to feature biomes. It generates landscape based on 3D Perlin noise and is notable for its unique and somewhat strange terrain shape and occasional floating islands. <br />Like v7, the biomes have to defined by mods first, otherwise the landscape will only be made out of stone (or some other default block).
+
* '''v5''': Unrealistic yet interesting landscape with frequent floating blobs and extreme terrain overhangs, and deep oceans. The weirdness has an appeal to some
* '''v6''': The successor of v5 and default map generator up to Minetest 0.4.14. Generated entirely using 2D noise and has somewhat more “realistic” terrain. The weirdness of v5 is gone. <br />This map generator has predefined biomes which can't be modified by mods <br />but mods also don't have to define their own biomes before this map generator becomes useful.
+
* '''v6''': Simple hills, cliffs and plateaus, rather flat and small-scale mapgen, no terrain overhangs, predefined biomes
* '''v7''': A map generator and successor of v6, with some innovations, uses 2D and 3D noise. <br />It lets the modders define biomes in Lua. If no biomes are defined, then this generator only creates [[stone]]. <br />This map generator is notable for many simple broad and deep “rivers” (or “ridges”) at Ocean level, but they can be disabled. <br />This is the default map generator from Minetest 0.4.15 on.
+
* '''v7''': Very widespread landscape, tall mountains with overhanging terrain and far plains. Frequent large water canals at sea level
* '''valleys''' (Minetest 0.4.14): Another map generator which generates a landscape featuring many hills, mountains and valleys. The valleys often contain rivers with [[River Water]]. The rivers are more sophisticated than in v7, since they are not at ocean level and change their height
+
* '''carpathian''': Complex and realistic mountains with multiple variants, sometimes reaching extreme heights, separated by oceans and far-reaching low and mostly flat plains
* '''flat''' (Minetest 0.4.14): This generates an (almost) entirely flat world with some biomes like in v7. Caves can still appear underground (if not disabled) and the map generator can be configured to add occasional hills and lakes.
+
* '''valleys''': Many hills, mountains and valleys containing [[River Water|river water]] flowing downhill
* '''fractals''' (Minetest 0.4.14): Generates a map based on a fractal. This is one of the more predictable map generators. <br />It is possible to choose one of many fractals which are based on the Mandelbrot and Julia set.
+
* '''flat''': A perfectly flat world, but with caves, biomes and decorations
* '''singlenode''': By default, this produces a world with only [[air]] everywhere. To be precise, it produces only one type of [[Blocks|block]], air by default. This one is by far the simplest and fastest map generator, but in [[Subgames/Minetest Game|Minetest Game]], it is mostly useless. <br />It is useful for [[Mods:Mapgen|mapgen-mods]] which define their own map generation: first, air is generated, then the mod applies its own functions which generates the terrain. This map generator can not be selected in the main menu; it can only be enabled by mods.
+
* '''fractal''': Map is based on a fractal of your choice; highly configurable
 +
* '''singlenode''': Empty world
  
=== Gallery ===
+
==== Gallery ====
 
Here are examples of landscapes generated with the different map generators (using [[Games/Minetest Game|Minetest Game]]):
 
Here are examples of landscapes generated with the different map generators (using [[Games/Minetest Game|Minetest Game]]):
 
<gallery widths="400px" heights="256px">
 
<gallery widths="400px" heights="256px">
Line 26: Line 31:
 
File:Mapgen_v6.jpg|v6
 
File:Mapgen_v6.jpg|v6
 
File:Mapgen_v7.jpg|v7
 
File:Mapgen_v7.jpg|v7
 +
File:Mapgen_carpathian.jpg|carpathian
 
File:Mapgen_valleys.jpg|valleys
 
File:Mapgen_valleys.jpg|valleys
 
File:Mapgen_flat.jpg|flat
 
File:Mapgen_flat.jpg|flat
File:Mapgen_fractals_fractal_1.jpg|fractals
+
File:Mapgen_fractals_fractal_1.jpg|fractal
 
File:Mapgen_singlenode.jpg|singlenode
 
File:Mapgen_singlenode.jpg|singlenode
 
</gallery>
 
</gallery>
 +
 +
=== Description ===
 +
All map generators described in full detail.
 +
 +
To learn more about detailed configuration, see [[Map generator features]]. To learn more about the history of the map generators, see [[Map Generator Evolution]].
 +
 +
==== v5 ====
 +
Notable for its unique and somewhat strange terrain shape and occasional floating islands which often look like blobs. Extreme overhanging terrain is not uncommon and the landscape is sometimes realistic, sometimes strange and challenging. The oceans can sometimes reach extreme depths as well. While the landscape is not exactly realistic, this mapgen is intentionally included in Minetest because its uniqueness and weirdness also has a special appeal to some.
 +
 +
Like most map generators, v5 generates many caves in the underground. The caves are often tight but may be broad at times. They can sometimes be very long, deep and tricky to explore and form a complex tunnel system. Deep in the underground, there is a low chance to encounter giant caves. Like in most other mapgens, [[lava]] and [[water]] lakes may appear as lakes in the underground, but lava starts to appear very deep at Y=-273 or below.
 +
 +
The biomes have to defined by [[mods]] first, otherwise it will be a [[stone]]-only landscape. The same is true for all other mapgens except v6.
 +
 +
Landscapes are based on 3D Perlin noise.
 +
 +
==== v6 ====
 +
Notable for rather flat and simple hills and cliffs. The landscape is rather simple, the hills don't extend above Y=47 and there are no natural terrain overhangs (ignoring caves). The weirdness of v5 is eliminated.
 +
 +
The caves are simple, short and tight and have little variation, but they are frequent. Larger caves only generate for underground water and lava lakes. There are no giant caves. This is the only map generator in which [[lava]] is already generated below Y=-32, much higher than in the other mapgens.
 +
 +
This is the only map generator with predefined biomes: Grassland, forest, jungle, desert, taiga, tundra. Four species of [[trees]] are generated: Regular tree, apple tree, jungle tree and pine tree. The biomes can't be modified by mods. Because of the nature of v6, the biomes are much simpler than in the other map generators, and a couple of blocks found in the other map generators can't be found in v6 maps (for example: [[Silver Sand]], [[Acacia Tree]], [[Coral|Orange Coral]]).
 +
 +
Other unique features include: Large patches of dirt and sand in the underground, rare gravel fields on the surface and a setting to generate a flat map in v6 style.
 +
 +
Generated entirely using 2D Perlin noise.
 +
 +
v6 mapgen is officially stable.<ref name="stability">[https://forum.minetest.net/viewtopic.php?f=18&t=19132 Stability of each mapgen]</ref>
 +
 +
==== v7 ====
 +
Generates a very large-scale environment with large biomes and plains. One of the most unique features in this map generator are the broad and deep water canals (called “ridges”) at sea level, but they can be disabled. Like in v5, the biome have to be defined by mods first. This mapgen also has the unique feature of supporting floating islands high in the sky (→[[Map generator features]]), but they are disabled by default.
 +
 +
The generated caves are broad, often have lots of space and are often very long and complex and like to branch off. Sudden drops are not unusual. Deep in the underground, giant caves may form (like in v5).
 +
 +
Uses 2D and 3D Perlin noise. It mapgen the default selection since Minetest 0.4.15.
 +
 +
v7 mapgen is officially stable, with the exception of floatlands.<ref name="stability" />
 +
 +
==== carpathian ====
 +
Vast and relatively flat plains, rolling hills and complex, realistic mountain ranges dominate the landscape. Mountains come in several forms. In mountain ranges, ridges and terraced mountains can form. Rarely there are extremely big mountains and rarely there are fjords.
 +
 +
==== valleys ====
 +
Generates a landscape featuring many hills, mountains and valleys. The valleys often contain rivers with [[River Water|river water]]. The rivers are very different than in v7, since they are not at ocean level and actually flow downhill. Another unique feature of this mapgen is the altitude chill. The biome temperature falls with the height which means that at high elevations, cold biomes are much more likely.
 +
 +
The caves are similar to those of v7, but they tend to be much larger on average.
 +
 +
==== flat ====
 +
Generates a perfectly flat world (ignoring structures and caves) with biomes. It can be configured to add occasional hills and lakes.
 +
 +
The generated caves are practically identical to those of v7.
 +
 +
==== fractal ====
 +
Generates a map based on a fractal. It creates by far the weirdest terrain shapes, but its results are mostly predictable.
 +
 +
By default, a map based on the Mandelbrot set is generated. It is possible to choose one of many fractals which are based on the Mandelbrot and Julia set, which is chosen in the advanced settings menu (technical setting name “<code>mgfractal_fractal</code>”). Changing this setting will yield wildly different results; if you want to make most of this mapgen, make sure to play around with the advanced settings a bit.
 +
 +
The generated caves are practically identical to those of v7.
 +
 +
==== singlenode ====
 +
Generates an empty world.
 +
 +
To be precise: By default, this produces a world with only [[air]] everywhere. For games it is possible to replace the air with a different block.
 +
 +
It is intended to be used for mapgen mods which define their own map generation from scratch. This mapgen is not really usable if left unmodified because it is impossible to place blocks in mid-air without the use of mods.
 +
 +
Singlenode mapgen is officially stable.<ref name="stability" />
  
 
== See also ==
 
== See also ==
 +
* [[Map generator/settings]]
 +
* [[Map generator features]]
 +
* [[Biomes]]
 
* [[Map Generator Evolution]]
 
* [[Map Generator Evolution]]
* [[Biomes]]
+
 
 +
==References==
 +
<references />
  
 
[[Category:Map]]
 
[[Category:Map]]

Latest revision as of 23:16, 7 August 2023

Languages Language: English • Deutsch • français • 日本語 • Bahasa Melayu

The map generator (“mapgen” for short) is the Minetest component that generates the map. This page concentrates on terrain generation. For the biomes (block surface, vegetation and such), head over to Biomes.

Introduction

This complex program, integrated into the game, can generate procedurally the map, which is the world the player evolves in. It is based on Perlin noises, functions which allow associating to each point a random yet consistent value.

Generators

There is a number of different map generators. It is possible to choose between them when creating a map. Some mods may change them radically, also all map generators allow for a lot of configuration in the advanced settings menu.

All map generators have biomes. In all map generators except v6 these biomes can be defined by mods using the Biome API. The v6 map generator is special because its biomes are completely predefined and can't be changed trivially.

Important: v5 and v6 are not legacy map generators. “v5”, “v6” and “v7” are names, not version numbers. All mapgens included in Minetest are officially supported and updated.

Overview

These are the available mapgens described in brief:

  • v5: Unrealistic yet interesting landscape with frequent floating blobs and extreme terrain overhangs, and deep oceans. The weirdness has an appeal to some
  • v6: Simple hills, cliffs and plateaus, rather flat and small-scale mapgen, no terrain overhangs, predefined biomes
  • v7: Very widespread landscape, tall mountains with overhanging terrain and far plains. Frequent large water canals at sea level
  • carpathian: Complex and realistic mountains with multiple variants, sometimes reaching extreme heights, separated by oceans and far-reaching low and mostly flat plains
  • valleys: Many hills, mountains and valleys containing river water flowing downhill
  • flat: A perfectly flat world, but with caves, biomes and decorations
  • fractal: Map is based on a fractal of your choice; highly configurable
  • singlenode: Empty world

Gallery

Here are examples of landscapes generated with the different map generators (using Minetest Game):

Description

All map generators described in full detail.

To learn more about detailed configuration, see Map generator features. To learn more about the history of the map generators, see Map Generator Evolution.

v5

Notable for its unique and somewhat strange terrain shape and occasional floating islands which often look like blobs. Extreme overhanging terrain is not uncommon and the landscape is sometimes realistic, sometimes strange and challenging. The oceans can sometimes reach extreme depths as well. While the landscape is not exactly realistic, this mapgen is intentionally included in Minetest because its uniqueness and weirdness also has a special appeal to some.

Like most map generators, v5 generates many caves in the underground. The caves are often tight but may be broad at times. They can sometimes be very long, deep and tricky to explore and form a complex tunnel system. Deep in the underground, there is a low chance to encounter giant caves. Like in most other mapgens, lava and water lakes may appear as lakes in the underground, but lava starts to appear very deep at Y=-273 or below.

The biomes have to defined by mods first, otherwise it will be a stone-only landscape. The same is true for all other mapgens except v6.

Landscapes are based on 3D Perlin noise.

v6

Notable for rather flat and simple hills and cliffs. The landscape is rather simple, the hills don't extend above Y=47 and there are no natural terrain overhangs (ignoring caves). The weirdness of v5 is eliminated.

The caves are simple, short and tight and have little variation, but they are frequent. Larger caves only generate for underground water and lava lakes. There are no giant caves. This is the only map generator in which lava is already generated below Y=-32, much higher than in the other mapgens.

This is the only map generator with predefined biomes: Grassland, forest, jungle, desert, taiga, tundra. Four species of trees are generated: Regular tree, apple tree, jungle tree and pine tree. The biomes can't be modified by mods. Because of the nature of v6, the biomes are much simpler than in the other map generators, and a couple of blocks found in the other map generators can't be found in v6 maps (for example: Silver Sand, Acacia Tree, Orange Coral).

Other unique features include: Large patches of dirt and sand in the underground, rare gravel fields on the surface and a setting to generate a flat map in v6 style.

Generated entirely using 2D Perlin noise.

v6 mapgen is officially stable.[1]

v7

Generates a very large-scale environment with large biomes and plains. One of the most unique features in this map generator are the broad and deep water canals (called “ridges”) at sea level, but they can be disabled. Like in v5, the biome have to be defined by mods first. This mapgen also has the unique feature of supporting floating islands high in the sky (→Map generator features), but they are disabled by default.

The generated caves are broad, often have lots of space and are often very long and complex and like to branch off. Sudden drops are not unusual. Deep in the underground, giant caves may form (like in v5).

Uses 2D and 3D Perlin noise. It mapgen the default selection since Minetest 0.4.15.

v7 mapgen is officially stable, with the exception of floatlands.[1]

carpathian

Vast and relatively flat plains, rolling hills and complex, realistic mountain ranges dominate the landscape. Mountains come in several forms. In mountain ranges, ridges and terraced mountains can form. Rarely there are extremely big mountains and rarely there are fjords.

valleys

Generates a landscape featuring many hills, mountains and valleys. The valleys often contain rivers with river water. The rivers are very different than in v7, since they are not at ocean level and actually flow downhill. Another unique feature of this mapgen is the altitude chill. The biome temperature falls with the height which means that at high elevations, cold biomes are much more likely.

The caves are similar to those of v7, but they tend to be much larger on average.

flat

Generates a perfectly flat world (ignoring structures and caves) with biomes. It can be configured to add occasional hills and lakes.

The generated caves are practically identical to those of v7.

fractal

Generates a map based on a fractal. It creates by far the weirdest terrain shapes, but its results are mostly predictable.

By default, a map based on the Mandelbrot set is generated. It is possible to choose one of many fractals which are based on the Mandelbrot and Julia set, which is chosen in the advanced settings menu (technical setting name “mgfractal_fractal”). Changing this setting will yield wildly different results; if you want to make most of this mapgen, make sure to play around with the advanced settings a bit.

The generated caves are practically identical to those of v7.

singlenode

Generates an empty world.

To be precise: By default, this produces a world with only air everywhere. For games it is possible to replace the air with a different block.

It is intended to be used for mapgen mods which define their own map generation from scratch. This mapgen is not really usable if left unmodified because it is impossible to place blocks in mid-air without the use of mods.

Singlenode mapgen is officially stable.[1]

See also

References