51 Commits

Author SHA1 Message Date
Maksim Gamarnik
35770f4abb Merge Minetest 0.4.16 2017-06-06 23:03:34 +03:00
paramat
e45af9e0b7 Mapgen files: Update and correct copyright credits 2017-05-26 20:46:03 +01:00
paramat
15ff84d767 Mapgen: Remove '#include treegen.h' from non-mgv6 mapgens
Only mgv6 uses the tree functions from treegen.cpp.
2017-04-05 07:30:00 +01:00
Maksim Gamarnik
e05f7db82f Updated to Minetest ver. 0.4.15 2017-01-30 00:44:07 +02:00
paramat
261b30cbd0 Cavegen: Wider tunnels in mgflat, mgfractal, mgvalleys
As mgv7 is now the default mapgen i re-checked its tunnel width on request,
discovered they needed to be wider, and have made this change.
This commit widens the identical 3D noise tunnels in the other mapgens in
exactly the same way.
2016-12-14 06:28:45 +00:00
kwolekr
7af0dede5f Add MapSettingsManager and new mapgen setting script API functions
This commit refactors the majority of the Mapgen settings system.
- MapgenParams is now owned by MapSettingsManager, itself a part of ServerMap,
  instead of the EmergeManager.
- New Script API functions added:
    core.get_mapgen_setting
    core.get_mapgen_setting_noiseparams,
    core.set_mapgen_setting, and
    core.set_mapgen_setting_noiseparams.
- minetest.get/set_mapgen_params are deprecated by the above new functions.
- It is now possible to view and modify any arbitrary mapgen setting from a mod,
  rather than the base MapgenParams structure.
- MapgenSpecificParams has been removed.
2016-07-03 15:38:36 -04:00
paramat
fc986c7adc Mgflat/fractal/v7/valleys: Denser 3D noise tunnels
Reduce spread from 96 to primes 61 and 67 (either side of 64)
Prime spreads help to keep 3D noise periodic features unaligned
'cave width' 0.2 to preserve tunnel width
Reduce octaves to 3 to improve network structure
2016-06-24 02:17:51 +01:00
kwolekr
7dc6369329 Mapgen: Optimize biomemap creation by combining with generateBiomes 2016-06-05 13:30:02 -04:00
kwolekr
ad404363ec Mapgen: Combine dungeon generation code 2016-05-27 23:23:58 -04:00
kwolekr
5697e8daef Mapgen: Deduplicate common constructor code 2016-05-27 23:23:58 -04:00
kwolekr
cdbcf56e65 Mapgen: Remove calculateNoise from most mapgens
This commit moves noise calculation to the functions where the noise is
actually required, increasing the separation of concerns and level of
interdependency for each mapgen method.  Valleys Mapgen is left unmodified.
2016-05-27 23:23:58 -04:00
kwolekr
dadff87b25 Cavegen: Move V5-style caves to CavesNoiseIntersection 2016-05-27 23:23:58 -04:00
kwolekr
67e06fbbec Fix MgStoneType and BiomeType enum names 2016-05-27 23:23:58 -04:00
kwolekr
c71f77da67 Mapgen: Combine generateBiomes, dustTopNodes, and generateCaves
This commit condenses the above methods into a single implementation used by
V7, V5, Flat, Fractal, and Valleys mapgens and introduces MapgenBasic.
2016-05-27 23:23:58 -04:00
kwolekr
18c17ff1fd Move biome calculation to BiomeGen
BiomeGen defines an interface that, given a set of BiomeParams, computes biomes
for a given area using the algorithm implemented by that specific BiomeGen.
This abstracts away the old system where each mapgen supplied the noises
required for biome generation.
2016-05-27 23:23:58 -04:00
Maksim Gamarnik
df40c58333 Fix merge prev commits and fix bugs
Android: mpir, x86 flags, range view, fix favorite server icon, other
2016-05-03 04:21:56 +03:00
Maksim Gamarnik
d5854e5cf7 Merge minetest commits / WIP!
Java part WIP, pls, use prev commits!
2016-04-29 10:11:25 +03:00
paramat
2942a16393 Mapgen: Make 3D noise tunnels' width settable
Correct parameter names mg_valleys to mgvalleys
Remove biome NoiseParams from MapgenValleysParams
Improve format of parameter code
2016-04-28 23:36:19 -04:00
Maksim Gamarnik
6d3bdc5a7d Merge 2016-04-12 21:28:50 +03:00
paramat
362430e603 Mgv7, mgflat, mgfractal: Tunnel generation code optimisation 2016-04-12 06:58:04 +01:00
paramat
78b1913538 Mapgen: Optimise cave noises and tunnel excavation
Instead of doing nothing at node_max.Y + 1 use 1-down
overgeneration for tunnel generation and noisemaps
Move some old unused code in mgv7 to end of file
2016-04-08 03:14:36 +01:00
Maksim Gamarnik
0b19e56113 Merge remote-tracking branch 'upstream1/master' 2016-04-01 00:33:55 +03:00
paramat
77f6a1b898 Mgv7/flat/fractal: Stop tunnel-floor biome nodes being placed everywhere
A bool for 'in or under tunnel' was missing
1-node-deep stone ledges were being
replaced with biome surface material
2016-03-21 17:42:13 +00:00
Maksim Gamarnik
8f6ddcc57c Merge branch 'upstream/master' 2016-03-14 11:44:17 +02:00
paramat
191dd5cdbc Mapgen: Fix light in tunnels at mapchunk borders
Don't excavate the overgenerated stone at node_max.Y + 1,
this creates a 'roof' over the tunnel, preventing light in
tunnels at mapchunk borders when generating mapchunks upwards.
2016-03-14 08:45:01 +00:00
Maksim Gamarnik
d7c0fad71f Merge Minetest commits 2016-02-11 22:35:23 +02:00
paramat
2a92bccd00 FindSpawnPos: Let mapgens decide what spawn altitude is suitable
To avoid spawn search failing in new specialised mapgens
Increase spawn search range to 4000 nodes
Add getSpawnLevelAtPoint() functions to EmergeManager, class Mapgen
and all mapgens
Remove getGroundLevelAtPoint() functions from all mapgens except mgv6
(possibly to be re-added later in the correct form to return actual
ground level)
Make mgvalleys flag names consistent with other mapgens
Remove now unused 'vertical spawn range' setting
2016-02-09 07:14:45 +00:00
Maksim Gamarnik
50c3a3a51a Merge remote-tracking branch 'upstream/master' 2016-02-07 04:07:20 +02:00
paramat
2ca1a56fc1 Mgv5/v7/flat/fractal: Move tunnel noise calculation into generateCaves
Tunnel 3D noises are only calculated when solid terrain is present
in mapchunk, avoiding large amounts of unnecessary calculations
Change 'int' to 's16' in calculateNoise
Change 'i' to 'vi' for voxelmanip indexes for consistency
Keep 'u32 index3d' local to a smaller part of tunnel code
Mgv7: Don't call CaveV7 if no solid terrain in mapchunk
Give 'open' bool a more descriptive name
2016-02-02 06:37:01 +00:00
Maksim Gamarnik
2520ca3ed1 Merge branch 'master' of https://github.com/minetest/minetest 2016-01-31 20:57:03 +02:00
paramat
44001bb716 Mgv7/flat/fractal: Place biome top node on tunnel entrance floor 2016-01-14 04:43:50 +00:00
Maksim Gamarnik
23614e9479 Merge
I have not tested this
2015-12-28 11:26:50 +02:00
Maksim Gamarnik
1fcb1f2fcc MultiCraft 1.0.2 2015-12-27 22:55:32 +02:00
paramat
8c05a407b2 Mgfractal: Add 3D and 4D fractals
3D Mandelbrot/Mandelbar
3D Christmas Tree
3D Mandelbulb
3D Cosine Mandelbulb
4D Mandelbulb
Plus corresponding julia set for each
Add credits for formulas
Rename parameter 'formula' to 'fractal'
Speed optimisations
2015-12-15 04:18:19 +00:00
Maksim Gamarnik
1797862bf9 Merge 2015-12-06 15:00:12 +02:00
paramat
ad5a88f81a Mgv5/v7/flat/fractal: More large pseudorandom caves
Mgv7/flat/fractal: Reduce tunnel noise spreads to 96
2015-12-02 02:19:52 +00:00
Maksim Gamarnik
b3726345ff Merge last minetest commits 2015-11-27 12:57:52 +02:00
paramat
4d4d5a7370 Mgfractal: Move julia set selection into formula parameter
Improve default parameters
Update and improve documentation
Unhide mapgen, but is still unstable
2015-11-23 00:34:09 +00:00
paramat
9a49529472 Mapgen: Add global 'decorations' flag
Flag is set by default in MapgenParams
The global 'trees' flag remains but is now
undocumented and unset by default in MapgenParams
Add mgv6_spflag 'trees' set by default in
defaultsettings.cpp to affect new worlds only
This is automatically backwards
compatible for existing worlds
2015-11-21 00:10:08 +00:00
paramat
1389f26b6c Mgfractal: Revert unnecessary duplication of parameters 2015-11-15 08:13:36 +00:00
paramat
60c73b1877 Mgfractal: Create a choice of 4 mandelbrot formulas 2015-11-14 04:25:47 +00:00
Maksim Gamarnik
18204b95ed Fix 2015-11-10 21:14:24 +02:00
Maksim Gamarnik
bcf249297c Merge last Minetest commits 2015-11-10 20:29:00 +02:00
Maksim Gamarnik
919be490f9 Update
Sync all Minetest commits
2015-11-10 13:49:24 +02:00
paramat
fc5a4ecb0c Cavegen: Make mgfractal use mgv5 cavegen
Remove CaveFractal
Add a lava depth constant to CaveV5 to make it universal
2015-11-09 05:29:42 +00:00
paramat
dc48623b7c Mgfractal: Add filler depth noise 2015-10-29 20:02:57 +00:00
paramat
8032900773 Mgfractal: Independent iterations and scale parameters
Complete set of parameters for each of mandelbrot and julia sets
The julia set structure often needs different iterations and scale
2015-10-24 21:18:40 +01:00
paramat
97adfc69c1 Mgfractal: Independant offset and slice params for mandelbrot and julia
Player now spawns on julia set due to julia offset
Add commented-out '#include profiler.h' for timetaker use
Use v3fs to reduce number of parameters
Tune tunnel width to match mgv7
2015-10-11 23:59:57 +01:00
paramat
bdc3ea710a Fractal mapgen: Fix mysterious bug 2015-10-10 21:27:44 +01:00
paramat
28d614f4a1 Fractal mapgen: Add seabed and large pseudorandom caves 2015-10-07 06:43:46 +01:00