Package squidpony.squidgrid.mapping
Class MetsaMapFactory
java.lang.Object
squidpony.squidgrid.mapping.MetsaMapFactory
@Beta public class MetsaMapFactory extends Object
A map generation factory using Perlin noise to make island chain style maps.
Based largely on work done by Metsa from #rgrd . This is marked Beta, despite having been in SquidLib for years, because it could still be modified as a simpler substitute for
Based largely on work done by Metsa from #rgrd . This is marked Beta, despite having been in SquidLib for years, because it could still be modified as a simpler substitute for
WorldMapGenerator. WorldMapGenerator does tend
to produce much higher quality in its maps, however, due to calculating heat and moisture levels as well as height,
then using those to build blending biomes.- Author:
- Eben Howard - http://squidpony.com - howard@squidpony.com
-
Field Summary
Fields Modifier and Type Field Description static doubleBEACH_LEVELstatic doubleDEEP_SEA_LEVELstatic doubleMOUNTAIN_LEVELstatic doublePLAINS_LEVELstatic doubleSEA_LEVELstatic doubleSNOW_LEVEL -
Constructor Summary
Constructors Constructor Description MetsaMapFactory()MetsaMapFactory(int width, int height)MetsaMapFactory(int width, int height, long rngSeed)MetsaMapFactory(int width, int height, StatefulRNG rng) -
Method Summary
Modifier and Type Method Description CoordclosestCity(Coord point)Finds and returns the closest point containing a city to the given point.List<Coord>getCities()intgetHeight()double[][]getHeightMap()doublegetMaxPeak()intgetShadow(int x, int y, double[][] map)intgetWidth()int[][]makeBiomeMap()double[][]makeHeightMap()int[][]makeNationMap()double[][]makeWeightedMap()voidregenerateHeightMap()voidregenerateHeightMap(int width, int height)
-
Field Details
-
SEA_LEVEL
- See Also:
- Constant Field Values
-
BEACH_LEVEL
- See Also:
- Constant Field Values
-
PLAINS_LEVEL
- See Also:
- Constant Field Values
-
MOUNTAIN_LEVEL
- See Also:
- Constant Field Values
-
SNOW_LEVEL
- See Also:
- Constant Field Values
-
DEEP_SEA_LEVEL
- See Also:
- Constant Field Values
-
-
Constructor Details
-
Method Details
-
getShadow
-
closestCity
Finds and returns the closest point containing a city to the given point. Does not include provided point as a possible city location. If there are no cities, null is returned.- Parameters:
point-- Returns:
-
makeHeightMap
-
regenerateHeightMap
-
regenerateHeightMap
-
makeBiomeMap
-
makeNationMap
-
makeWeightedMap
-
getCities
-
getMaxPeak
-
getHeightMap
-
getHeight
-
getWidth
-