Class WorldMapGenerator.LocalMimicMap

All Implemented Interfaces:
Serializable
Enclosing class:
WorldMapGenerator

public static class WorldMapGenerator.LocalMimicMap
extends WorldMapGenerator.LocalMap
An unusual map generator that imitates an existing local map (such as a map of Australia, which it can do by default), without applying any projection or changing heat levels in the polar regions or equator. Example map, showing a variant on Australia
See Also:
Serialized Form
  • Field Details

  • Constructor Details

    • LocalMimicMap

      public LocalMimicMap()
      Constructs a concrete WorldMapGenerator for a map that should look like Australia, without projecting the land positions or changing heat by latitude. Always makes a 256x256 map. Uses FastNoise as its noise generator, with 1.0 as the octave multiplier affecting detail. If you were using LocalMimicMap(long, Noise2D, double), then this would be the same as passing the parameters 0x1337BABE1337D00DL, DEFAULT_NOISE, 1.0.
    • LocalMimicMap

      public LocalMimicMap​(GreasedRegion toMimic)
      Constructs a concrete WorldMapGenerator for a map that should have land in roughly the same places as the given GreasedRegion's "on" cells, without projecting the land positions or changing heat by latitude. The initial seed is set to the same large long every time, and it's likely that you would set the seed when you call WorldMapGenerator.generate(long). The width and height of the map cannot be changed after the fact. Uses FastNoise as its noise generator, with 1.0 as the octave multiplier affecting detail.
      Parameters:
      toMimic - the world map to imitate, as a GreasedRegion with land as "on"; the height and width will be copied
    • LocalMimicMap

      public LocalMimicMap​(long initialSeed, GreasedRegion toMimic)
      Constructs a concrete WorldMapGenerator for a map that should have land in roughly the same places as the given GreasedRegion's "on" cells, without projecting the land positions or changing heat by latitude. Takes an initial seed and the GreasedRegion containing land positions. 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. Uses FastNoise as its noise generator, with 1.0 as the octave multiplier affecting detail.
      Parameters:
      initialSeed - the seed for the GWTRNG this uses; this may also be set per-call to generate
      toMimic - the world map to imitate, as a GreasedRegion with land as "on"; the height and width will be copied
    • LocalMimicMap

      public LocalMimicMap​(long initialSeed, GreasedRegion toMimic, double octaveMultiplier)
      Constructs a concrete WorldMapGenerator for a map that should have land in roughly the same places as the given GreasedRegion's "on" cells, without projecting the land positions or changing heat by latitude. Takes an initial seed, the GreasedRegion containing land positions, and a multiplier that affects the level of detail by increasing or decreasing the number of octaves of noise used. 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. Uses FastNoise as its noise generator, with the given octave multiplier affecting detail.
      Parameters:
      initialSeed - the seed for the GWTRNG this uses; this may also be set per-call to generate
      toMimic - the world map to imitate, as a GreasedRegion with land as "on"; the height and width will be copied
      octaveMultiplier - used to adjust the level of detail, with 0.5 at the bare-minimum detail and 1.0 normal
    • LocalMimicMap

      public LocalMimicMap​(long initialSeed, GreasedRegion toMimic, Noise.Noise2D noiseGenerator)
      Constructs a concrete WorldMapGenerator for a map that should have land in roughly the same places as the given GreasedRegion's "on" cells, without projecting the land positions or changing heat by latitude. Takes an initial seed, the GreasedRegion containing land positions, and parameters for noise generation (a Noise.Noise3D 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. Both FastNoise and FastNoise make sense to use for noiseGenerator, and the seed it's constructed with doesn't matter because this will change the seed several times at different scales of noise (it's fine to use the static FastNoise.instance or FastNoise.instance because they have no changing state between runs of the program). Uses the given noise generator, with 1.0 as the octave multiplier affecting detail.
      Parameters:
      initialSeed - the seed for the GWTRNG this uses; this may also be set per-call to generate
      toMimic - the world map to imitate, as a GreasedRegion with land as "on"; the height and width will be copied
      noiseGenerator - an instance of a noise generator capable of 3D noise, usually FastNoise or FastNoise
    • LocalMimicMap

      public LocalMimicMap​(long initialSeed, GreasedRegion toMimic, Noise.Noise2D noiseGenerator, double octaveMultiplier)
      Constructs a concrete WorldMapGenerator for a map that should have land in roughly the same places as the given GreasedRegion's "on" cells, using an elliptical projection (specifically, a Mollweide projection). Takes an initial seed, the GreasedRegion containing land positions, parameters for noise generation (a Noise.Noise3D 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. FastNoise will be the fastest 3D generator to use for noiseGenerator, and the seed it's constructed with doesn't matter because this will change the seed several times at different scales of noise (it's fine to use the static FastNoise.instance because it has no changing state between runs of the program). 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.
      Parameters:
      initialSeed - the seed for the GWTRNG this uses; this may also be set per-call to generate
      toMimic - the world map to imitate, as a GreasedRegion with land as "on"; the height and width will be copied
      noiseGenerator - an instance of a noise generator capable of 3D noise, usually FastNoise or FastNoise
      octaveMultiplier - used to adjust the level of detail, with 0.5 at the bare-minimum detail and 1.0 normal
    • LocalMimicMap

      public LocalMimicMap​(long initialSeed, Noise.Noise2D noiseGenerator, double octaveMultiplier)
      Constructs a 256x256 unprojected local map that will use land forms with a similar shape to Australia.
      Parameters:
      initialSeed -
      noiseGenerator -
      octaveMultiplier -
    • LocalMimicMap

      Copies the LocalMimicMap other to construct a new one that is exactly the same. References will only be shared to Noise classes.
      Parameters:
      other - a LocalMimicMap to copy
  • Method Details