public static class WorldMapGenerator.TilingMap extends WorldMapGenerator
WorldMapGenerator
that tiles both east-to-west and north-to-south. It tends
to not appear distorted like WorldMapGenerator.SphereMap
does in some areas, even though this is inaccurate for a
rectangular projection of a spherical world (that inaccuracy is likely what players expect in a map, though).
You may want WorldMapGenerator.LocalMap
instead, for non-world maps that don't tile.
Example map.WorldMapGenerator.BiomeMapper, WorldMapGenerator.DetailedBiomeMapper, WorldMapGenerator.EllipticalHammerMap, WorldMapGenerator.EllipticalMap, WorldMapGenerator.HexagonalMap, WorldMapGenerator.HyperellipticalMap, WorldMapGenerator.LocalMap, WorldMapGenerator.LocalMimicMap, WorldMapGenerator.MimicMap, WorldMapGenerator.RotatingSpaceMap, WorldMapGenerator.RoundSideMap, WorldMapGenerator.SimpleBiomeMapper, WorldMapGenerator.SpaceViewMap, WorldMapGenerator.SphereMap, WorldMapGenerator.TilingMap
Modifier and Type | Field and Description |
---|---|
Noise.Noise4D |
heat |
protected static double |
heatFreq |
Noise.Noise4D |
moisture |
protected static double |
moistureFreq |
protected static double |
otherFreq |
Noise.Noise4D |
otherRidged |
Noise.Noise4D |
terrain |
protected static double |
terrainFreq |
Noise.Noise4D |
terrainRidged |
protected static double |
terrainRidgedFreq |
cacheA, cacheB, centerLongitude, coastalWaterLower, coastalWaterUpper, deepWaterLower, deepWaterUpper, DEFAULT_NOISE, forestLower, forestUpper, grassLower, grassUpper, heatData, heatModifier, height, heightCodeData, heightData, landData, landModifier, maxHeat, maxHeight, maxHeightActual, maxWet, mediumWaterLower, mediumWaterUpper, minHeat, minHeight, minHeightActual, minWet, moistureData, rng, rockLower, rockUpper, sandLower, sandUpper, seedA, seedB, shallowWaterLower, shallowWaterUpper, snowLower, snowUpper, startCacheX, startCacheY, startX, startY, usedHeight, usedWidth, width, zoom, zoomStartX, zoomStartY
Constructor and Description |
---|
TilingMap()
Constructs a concrete WorldMapGenerator for a map that can be used as a tiling, wrapping east-to-west as well
as north-to-south.
|
TilingMap(int mapWidth,
int mapHeight)
Constructs a concrete WorldMapGenerator for a map that can be used as a tiling, wrapping east-to-west as well
as north-to-south.
|
TilingMap(long initialSeed,
int mapWidth,
int mapHeight)
Constructs a concrete WorldMapGenerator for a map that can be used as a tiling, wrapping east-to-west as well
as north-to-south.
|
TilingMap(long initialSeed,
int mapWidth,
int mapHeight,
Noise.Noise4D noiseGenerator)
Constructs a concrete WorldMapGenerator for a map that can be used as a tiling, wrapping east-to-west as well
as north-to-south.
|
TilingMap(long initialSeed,
int mapWidth,
int mapHeight,
Noise.Noise4D noiseGenerator,
double octaveMultiplier)
Constructs a concrete WorldMapGenerator for a map that can be used as a tiling, wrapping east-to-west as well
as north-to-south.
|
TilingMap(WorldMapGenerator.TilingMap other)
Copies the TilingMap
other to construct a new one that is exactly the same. |
Modifier and Type | Method and Description |
---|---|
protected void |
regenerate(int startX,
int startY,
int usedWidth,
int usedHeight,
double landMod,
double heatMod,
int stateA,
int stateB) |
codeHeight, decodeX, decodeY, generate, generate, generate, getCenterLongitude, project, removeExcess, setCenterLongitude, wrapX, wrapY, zoomIn, zoomIn, zoomOut, zoomOut
protected static final double terrainFreq
protected static final double terrainRidgedFreq
protected static final double heatFreq
protected static final double moistureFreq
protected static final double otherFreq
public final Noise.Noise4D terrain
public final Noise.Noise4D terrainRidged
public final Noise.Noise4D heat
public final Noise.Noise4D moisture
public final Noise.Noise4D otherRidged
public TilingMap()
TilingMap#TilingMap(long, int, int, Noise4D, double)
, then this would be the
same as passing the parameters 0x1337BABE1337D00DL, 256, 256, WorldMapGenerator.DEFAULT_NOISE, 1.0
.public TilingMap(int mapWidth, int mapHeight)
WorldMapGenerator.generate(long)
. The width and
height of the map cannot be changed after the fact, but you can zoom in.
Uses FastNoise as its noise generator, with 1.0 as the octave multiplier affecting detail.mapWidth
- the width of the map(s) to generate; cannot be changed latermapHeight
- the height of the map(s) to generate; cannot be changed laterpublic TilingMap(long initialSeed, int mapWidth, int mapHeight)
initialSeed
parameter may or may not be used, since you can specify the seed to use when you call WorldMapGenerator.generate(long)
.
The width and height of the map cannot be changed after the fact, but you can zoom in.
Uses FastNoise as its noise generator, with 1.0 as the octave multiplier affecting detail.initialSeed
- the seed for the GWTRNG this uses; this may also be set per-call to generatemapWidth
- the width of the map(s) to generate; cannot be changed latermapHeight
- the height of the map(s) to generate; cannot be changed laterpublic TilingMap(long initialSeed, int mapWidth, int mapHeight, Noise.Noise4D noiseGenerator)
Noise.Noise4D
implementation, which is usually FastNoise.instance
. The initialSeed
parameter may or may not be used, since you can specify the seed to use when you call
WorldMapGenerator.generate(long)
. The width and height of the map cannot be changed after the fact, but you can zoom
in. Any seed supplied to the Noise4D given to this (if it takes one) will be ignored, and
Noise.Noise4D.getNoiseWithSeed(double, double, double, double, long)
will be used to specify the seed many
times. The detail level, which is the octaveMultiplier
parameter that can be passed to another
constructor, is always 1.0 with this constructor.initialSeed
- the seed for the GWTRNG this uses; this may also be set per-call to generatemapWidth
- the width of the map(s) to generate; cannot be changed latermapHeight
- the height of the map(s) to generate; cannot be changed laternoiseGenerator
- an instance of a noise generator capable of 4D noise, recommended to be FastNoise.instance
public TilingMap(long initialSeed, int mapWidth, int mapHeight, Noise.Noise4D noiseGenerator, double octaveMultiplier)
Noise.Noise4D
implementation, which is usually FastNoise.instance
, and a
multiplier on how many octaves of noise to use, with 1.0 being normal (high) detail and higher multipliers
producing even more detailed noise when zoomed-in). The initialSeed
parameter may or may not be used,
since you can specify the seed to use when you call WorldMapGenerator.generate(long)
. The width and height of the map
cannot be changed after the fact, but you can zoom in. Any seed supplied to the Noise4D given to this (if it takes one) will be ignored, and
Noise.Noise4D.getNoiseWithSeed(double, double, double, double, long)
will be used to specify the seed many
times. The octaveMultiplier
parameter should probably be no lower than 0.5, but can be arbitrarily
high if you're willing to spend much more time on generating detail only noticeable at very high zoom;
normally 1.0 is fine and may even be too high for maps that don't require zooming.initialSeed
- the seed for the GWTRNG this uses; this may also be set per-call to generatemapWidth
- the width of the map(s) to generate; cannot be changed latermapHeight
- the height of the map(s) to generate; cannot be changed laternoiseGenerator
- an instance of a noise generator capable of 4D noise, almost always FastNoise
octaveMultiplier
- used to adjust the level of detail, with 0.5 at the bare-minimum detail and 1.0 normalpublic TilingMap(WorldMapGenerator.TilingMap other)
other
to construct a new one that is exactly the same. References will only be
shared to Noise classes.other
- a TilingMap to copyprotected void regenerate(int startX, int startY, int usedWidth, int usedHeight, double landMod, double heatMod, int stateA, int stateB)
regenerate
in class WorldMapGenerator
Copyright © Eben Howard 2012–2022. All rights reserved.