Class SymmetryDungeonGenerator

java.lang.Object
squidpony.squidgrid.mapping.MixedGenerator
squidpony.squidgrid.mapping.SymmetryDungeonGenerator
All Implemented Interfaces:
IDungeonGenerator

public class SymmetryDungeonGenerator
extends MixedGenerator
A variant on MixedGenerator that creates bi-radially symmetric maps (basically a yin-yang shape). Useful for strategy games and possibly competitive multi-player games. The Coords passed to constructors as room positions do not necessarily need to be Created by Tommy Ettinger on 11/20/2015.
  • Constructor Details

    • SymmetryDungeonGenerator

      public SymmetryDungeonGenerator​(int width, int height, IRNG rng)
      This prepares a map generator that will generate a map with the given width and height, using the given RNG. This version of the constructor uses Poisson Disk sampling to generate the points it will draw caves and corridors between, ensuring a minimum distance between points, but it does not ensure that paths between points will avoid overlapping with rooms or other paths. You call the different carver-adding methods to affect what the dungeon will look like, putCaveCarvers(), putBoxRoomCarvers(), and putRoundRoomCarvers(), defaulting to only caves if none are called. You call generate() after adding carvers, which returns a char[][] for a map.
      Parameters:
      width - the width of the final map in cells
      height - the height of the final map in cells
      rng - an RNG object to use for random choices; this make a lot of random choices.
      See Also:
      used to ensure spacing for the points.
    • SymmetryDungeonGenerator

      public SymmetryDungeonGenerator​(int width, int height, IRNG rng, List<Coord> sequence)
      This prepares a map generator that will generate a map with the given width and height, using the given RNG. This version of the constructor uses a List of Coord points from some other source to determine the path to add rooms or caves to and then connect. You call the different carver-adding methods to affect what the dungeon will look like, putCaveCarvers(), putBoxRoomCarvers(), and putRoundRoomCarvers(), defaulting to only caves if none are called. You call generate() after adding carvers, which returns a char[][] for a map.
      Parameters:
      width - the width of the final map in cells
      height - the height of the final map in cells
      rng - an IRNG, such as an RNG, to use for random choices; this make a lot of random choices.
      sequence - a List of Coord to connect in order; index 0 is the start, index size() - 1 is the end.
      See Also:
      a class that uses this technique
    • SymmetryDungeonGenerator

      public SymmetryDungeonGenerator​(int width, int height, IRNG rng, OrderedSet<Coord> sequence)
      This prepares a map generator that will generate a map with the given width and height, using the given RNG. This version of the constructor uses a List of Coord points from some other source to determine the path to add rooms or caves to and then connect. You call the different carver-adding methods to affect what the dungeon will look like, putCaveCarvers(), putBoxRoomCarvers(), and putRoundRoomCarvers(), defaulting to only caves if none are called. You call generate() after adding carvers, which returns a char[][] for a map.
      Parameters:
      width - the width of the final map in cells
      height - the height of the final map in cells
      rng - an IRNG, such as an RNG, to use for random choices; this make a lot of random choices.
      sequence - a List of Coord to connect in order; index 0 is the start, index size() - 1 is the end.
      See Also:
      a class that uses this technique
    • SymmetryDungeonGenerator

      public SymmetryDungeonGenerator​(int width, int height, IRNG rng, OrderedMap<Coord,​List<Coord>> connections)
      This prepares a map generator that will generate a map with the given width and height, using the given RNG. This version of the constructor uses a LinkedHashMap with Coord keys and Coord array values to determine a branching path for the dungeon to take; each key will connect once to each of the Coords in its value, and you usually don't want to connect in both directions. You call the different carver-adding methods to affect what the dungeon will look like, putCaveCarvers(), putBoxRoomCarvers(), and putRoundRoomCarvers(), defaulting to only caves if none are called. You call generate() after adding carvers, which returns a char[][] for a map.
      Parameters:
      width - the width of the final map in cells
      height - the height of the final map in cells
      rng - an RNG object to use for random choices; this make a lot of random choices.
      connections - a Map of Coord keys to arrays of Coord to connect to next; shouldn't connect both ways
      See Also:
      a class that uses this technique
    • SymmetryDungeonGenerator

      public SymmetryDungeonGenerator​(int width, int height, IRNG rng, OrderedMap<Coord,​List<Coord>> connections, float roomSizeMultiplier)
      This prepares a map generator that will generate a map with the given width and height, using the given RNG. This version of the constructor uses a LinkedHashMap with Coord keys and Coord array values to determine a branching path for the dungeon to take; each key will connect once to each of the Coords in its value, and you usually don't want to connect in both directions. You call the different carver-adding methods to affect what the dungeon will look like, putCaveCarvers(), putBoxRoomCarvers(), and putRoundRoomCarvers(), defaulting to only caves if none are called. You call generate() after adding carvers, which returns a char[][] for a map.
      Parameters:
      width - the width of the final map in cells
      height - the height of the final map in cells
      rng - an RNG object to use for random choices; this make a lot of random choices.
      connections - a Map of Coord keys to arrays of Coord to connect to next; shouldn't connect both ways
      roomSizeMultiplier - a float multiplier that will be applied to each room's width and height
      See Also:
      a class that uses this technique
  • Method Details