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 double
BEACH_LEVEL
static double
DEEP_SEA_LEVEL
static double
MOUNTAIN_LEVEL
static double
PLAINS_LEVEL
static double
SEA_LEVEL
static double
SNOW_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 Coord
closestCity(Coord point)
Finds and returns the closest point containing a city to the given point.List<Coord>
getCities()
int
getHeight()
double[][]
getHeightMap()
double
getMaxPeak()
int
getShadow(int x, int y, double[][] map)
int
getWidth()
int[][]
makeBiomeMap()
double[][]
makeHeightMap()
int[][]
makeNationMap()
double[][]
makeWeightedMap()
void
regenerateHeightMap()
void
regenerateHeightMap(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
-