aboutsummaryrefslogtreecommitdiff
path: root/src/mapgen_fractal.cpp
AgeCommit message (Collapse)Author
2017-11-08Move files to subdirectories (#6599)Vitaliy
* Move files around
2017-09-17Biome API: Revert biomes, decos, ores being relative to water levelparamat
Feature is unnecessary and would greatly complicate future development, it would also make 'get biome at pos' extremely complex. Mgv7: Revert option to repeat surface biomes in floatlands, which depended on the above.
2017-09-03Use member initialization list instead of the constructor's body (#6371)Dharkael
* Use member initialization list instead of the constructor's body
2017-08-26Mgfractal: Use 'switch case' instead of 'if else' (#6314)Paramat
2017-07-30Dungeons: Use biome 'node_stone' if normal stone types not detectedparamat
Construct dungeons from the node defined as biome 'node_stone' if 'mapgen_stone', 'mapgen_desert_stone' and 'mapgen_sandstone' are not detected. Feature long-intended by kwolekr/hmmmm and present in code as a TODO.
2017-07-17Mgfractal: Improve spawning behaviourparamat
Spawn player 1 node higher to avoid spawning waist-deep in a possible biome 'dust' node, such as tundra snowblock. Tune default offset to spawn players in a more interesting location on the mandelbrot sets, on a raised area that looks like a spawn platform. Tune julia parameters to help avoid spawn search failing, especially for fractal 6.
2017-07-11Biomes/decorations/ores: Make relative to 'water_level' settingparamat
Add 'biome_zero_level' argument to 'generateBiomes()', 'deco_zero_level' argument to 'placeAllDecos()' and 'ore_zero_level' to 'placeAllOres()' to allow mapgens to vertically shift the registered biomes, decorations and ores per-mapchunk. Will also allow many realm possibilities in future mapgens.
2017-06-30Mapgen: Remove unnecessary 'this->' from constructors (#6069)Paramat
2017-06-22CavesRandomWalk: Make 'lava_depth' a mapgen parameterparamat
As with 'large_cave_depth', lava depth was previously a fixed y value and therefore incompatible with the ability to shift terrain vertically. Add 'lava_depth' mapgen parameter to mgflat, mgfractal, mgv5, mgv7.
2017-06-21Mgv5/v7/fractal: Add 'large_cave_depth' parameter to replace fixed valueparamat
The value cannot be fixed because we can shift terrain vertically. This also makes these mapgens consistent with mgflat and mgvalleys which have 'large_cave_depth' parameters.
2017-06-17Cpp11 initializers 2 (#5999)Loïc Blot
* C++11 patchset 10: continue cleanup on constructors * Drop obsolete bool MainMenuData::enable_public (setting is called with cURL in server loop) * More classes cleanup * More classes cleanup + change NULL tests to boolean tests
2017-05-26Mapgen files: Update and correct copyright creditsparamat
2017-04-05Mapgen: Remove '#include treegen.h' from non-mgv6 mapgensparamat
Only mgv6 uses the tree functions from treegen.cpp.
2016-12-14Cavegen: Wider tunnels in mgflat, mgfractal, mgvalleysparamat
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-07-03Add MapSettingsManager and new mapgen setting script API functionskwolekr
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-06-24Mgflat/fractal/v7/valleys: Denser 3D noise tunnelsparamat
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-05Mapgen: Optimize biomemap creation by combining with generateBiomeskwolekr
2016-05-27Mapgen: Combine dungeon generation codekwolekr
2016-05-27Mapgen: Deduplicate common constructor codekwolekr
2016-05-27Mapgen: Remove calculateNoise from most mapgenskwolekr
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-27Cavegen: Move V5-style caves to CavesNoiseIntersectionkwolekr
2016-05-27Fix MgStoneType and BiomeType enum nameskwolekr
2016-05-27Mapgen: Combine generateBiomes, dustTopNodes, and generateCaveskwolekr
This commit condenses the above methods into a single implementation used by V7, V5, Flat, Fractal, and Valleys mapgens and introduces MapgenBasic.
2016-05-27Move biome calculation to BiomeGenkwolekr
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-04-28Mapgen: Make 3D noise tunnels' width settableparamat
Correct parameter names mg_valleys to mgvalleys Remove biome NoiseParams from MapgenValleysParams Improve format of parameter code
2016-04-12Mgv7, mgflat, mgfractal: Tunnel generation code optimisationparamat
2016-04-08Mapgen: Optimise cave noises and tunnel excavationparamat
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-03-21Mgv7/flat/fractal: Stop tunnel-floor biome nodes being placed everywhereparamat
A bool for 'in or under tunnel' was missing 1-node-deep stone ledges were being replaced with biome surface material
2016-03-14Mapgen: Fix light in tunnels at mapchunk bordersparamat
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-02-09FindSpawnPos: Let mapgens decide what spawn altitude is suitableparamat
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-02Mgv5/v7/flat/fractal: Move tunnel noise calculation into generateCavesparamat
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-01-14Mgv7/flat/fractal: Place biome top node on tunnel entrance floorparamat
2015-12-15Mgfractal: Add 3D and 4D fractalsparamat
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-02Mgv5/v7/flat/fractal: More large pseudorandom cavesparamat
Mgv7/flat/fractal: Reduce tunnel noise spreads to 96
2015-11-23Mgfractal: Move julia set selection into formula parameterparamat
Improve default parameters Update and improve documentation Unhide mapgen, but is still unstable
2015-11-21Mapgen: Add global 'decorations' flagparamat
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-15Mgfractal: Revert unnecessary duplication of parametersparamat
2015-11-14Mgfractal: Create a choice of 4 mandelbrot formulasparamat
2015-11-09Cavegen: Make mgfractal use mgv5 cavegenparamat
Remove CaveFractal Add a lava depth constant to CaveV5 to make it universal
2015-10-29Mgfractal: Add filler depth noiseparamat
2015-10-24Mgfractal: Independent iterations and scale parametersparamat
Complete set of parameters for each of mandelbrot and julia sets The julia set structure often needs different iterations and scale
2015-10-11Mgfractal: Independant offset and slice params for mandelbrot and juliaparamat
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-10Fractal mapgen: Fix mysterious bugparamat
2015-10-07Fractal mapgen: Add seabed and large pseudorandom cavesparamat
2015-10-06Mapgen: Add 4D fractal mapgenparamat