Class AlienBiomes

java.lang.Object
com.github.yellowstonegames.world.AlienBiomes

@Beta public class AlienBiomes extends Object
Generates alien planet Biome tables for a BiomeMapper to use. This currently only works with BiomeMapper.BlendedBiomeMapper, which is usually the best choice anyway. This allows you to generate biome tables with arbitrary colors for oceans, vegetation (or life in general), and barren land. It also lets you adjust the amounts of liquid (oceans and lakes) and life on the planet, both relative to barren land. You can also just throw a random number generator at this and get completely generated colors, amounts, and names for biomes in a randomly generated language.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static com.github.yellowstonegames.place.Biome[]
    generateAlienBiomeTable(com.github.tommyettinger.random.EnhancedRandom random)
    Creates a new Biome table with 66 items, using a mix of randomly selected colors with random liquid and life levels.
    static com.github.yellowstonegames.place.Biome[]
    generateAlienBiomeTable(com.github.tommyettinger.random.EnhancedRandom random, com.github.yellowstonegames.text.Language namer, int liquidAmount, int lifeAmount)
    Creates a new Biome table with 66 items, using a mix of randomly selected colors with the given liquid and life levels.
    static com.github.yellowstonegames.place.Biome[]
    generateAlienBiomeTable(com.github.tommyettinger.random.EnhancedRandom random, com.github.yellowstonegames.text.Language namer, int liquidAmount, int liquidColorOklab, int barrenColorOklab, int lifeColorOklab)
    Creates a new Biome table with 66 items, using a mix of the given Oklab colors that depends on the given liquidAmount and lifeAmount.
    static com.github.yellowstonegames.place.Biome[]
    generateAlienBiomeTable(com.github.tommyettinger.random.EnhancedRandom random, com.github.yellowstonegames.text.Language namer, int liquidAmount, int lifeAmount, int liquidColorOklab, int barrenColorOklab, int lifeColorOklab)
    Creates a new Biome table with 66 items, using a mix of the given Oklab colors that depends on the given liquidAmount and lifeAmount.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AlienBiomes

      public AlienBiomes()
  • Method Details

    • generateAlienBiomeTable

      public static com.github.yellowstonegames.place.Biome[] generateAlienBiomeTable(com.github.tommyettinger.random.EnhancedRandom random)
      Creates a new Biome table with 66 items, using a mix of randomly selected colors with random liquid and life levels. Biomes will have gibberish (alien) names generated by a random Language for namer, using random as an option to seed all other generation. If random is null, a randomly-seeded AceRandom is used.
      This delegates to generateAlienBiomeTable(EnhancedRandom, Language, int, int, int, int, int), with the language generated by Language.randomLanguage(EnhancedRandom), liquidAmount set to a random int between 0 and 5 inclusive, lifeAmount set to a random int between 0 and 10 inclusive (biased toward lower values), and each color randomly selected.
      This chooses colors differently for liquid, barren land, and life-covered land. Each has a completely random hue, but liquid is mid-lightness and mid-saturation, barren land is usually darker and less saturated, and life is more saturated and usually lighter.
      Parameters:
      random - any EnhancedRandom used for all parameters; if null, a randomly-seeded AceRandom will be used
      Returns:
      a new Biome array with gibberish names for biomes that match the 66 expected by BiomeMapper
    • generateAlienBiomeTable

      public static com.github.yellowstonegames.place.Biome[] generateAlienBiomeTable(com.github.tommyettinger.random.EnhancedRandom random, com.github.yellowstonegames.text.Language namer, int liquidAmount, int lifeAmount)
      Creates a new Biome table with 66 items, using a mix of randomly selected colors with the given liquid and life levels. Biomes will have gibberish (alien) names generated by the given Language for namer, using random as an option to seed all other generation. If random is null, a randomly-seeded AceRandom is used.
      This delegates to generateAlienBiomeTable(EnhancedRandom, Language, int, int, int, int, int), with each color randomly selected by random.
      This chooses colors differently for liquid, barren land, and life-covered land. Each has a completely random hue, but liquid is mid-lightness and mid-saturation, barren land is usually darker and less saturated, and life is more saturated and usually lighter.
      This lets you specify a Language to generate Biome names with. You may want to remove accents from any generated Language to make sure it can print in an arbitrary font; use Language.removeAccents() for this. Or, select an existing ASCII-only language, like Language.HLETKIP or Language.DEEP_SPEECH.
      Parameters:
      random - any EnhancedRandom used for all parameters; if null, a randomly-seeded AceRandom will be used
      namer - a Language to generate gibberish names for biomes
      liquidAmount - between 0 (totally dry) and 5 (very wet)
      lifeAmount - between 0 and about 10 (with 5 being a typical Earth-like planet)
      Returns:
      a new Biome array with gibberish names for biomes that match the 66 expected by BiomeMapper
    • generateAlienBiomeTable

      public static com.github.yellowstonegames.place.Biome[] generateAlienBiomeTable(com.github.tommyettinger.random.EnhancedRandom random, com.github.yellowstonegames.text.Language namer, int liquidAmount, int liquidColorOklab, int barrenColorOklab, int lifeColorOklab)
      Creates a new Biome table with 66 items, using a mix of the given Oklab colors that depends on the given liquidAmount and lifeAmount. Biomes will have gibberish (alien) names generated by namer, using random as an option to seed the Biome name generation. The EnhancedRandom is not used for anything else.
      This delegates to generateAlienBiomeTable(EnhancedRandom, Language, int, int, int, int, int), with lifeAmount set to 5.
      This lets you specify a Language to generate Biome names with. You may want to remove accents from any generated Language to make sure it can print in an arbitrary font; use Language.removeAccents() for this. Or, select an existing ASCII-only language, like Language.HLETKIP or Language.DEEP_SPEECH.
      Parameters:
      random - any EnhancedRandom used for Biome names; if null, a randomly-seeded AceRandom will be used
      namer - a Language to generate gibberish names for biomes
      liquidAmount - between 0 (totally dry) and 5 (very wet)
      liquidColorOklab - an Oklab packed int for liquids on the planet, as produced by DescriptiveColor
      barrenColorOklab - an Oklab packed int for barren surfaces, as produced by DescriptiveColor
      lifeColorOklab - an Oklab packed int for vegetation on the planet, as produced by DescriptiveColor
      Returns:
      a new Biome array with gibberish names for biomes that match the 66 expected by BiomeMapper
    • generateAlienBiomeTable

      public static com.github.yellowstonegames.place.Biome[] generateAlienBiomeTable(com.github.tommyettinger.random.EnhancedRandom random, com.github.yellowstonegames.text.Language namer, int liquidAmount, int lifeAmount, int liquidColorOklab, int barrenColorOklab, int lifeColorOklab)
      Creates a new Biome table with 66 items, using a mix of the given Oklab colors that depends on the given liquidAmount and lifeAmount. Biomes will have gibberish (alien) names generated by namer, using random as an option to seed the Biome name generation. The EnhancedRandom is not used for anything else.
      This lets you specify a Language to generate Biome names with. You may want to remove accents from any generated Language to make sure it can print in an arbitrary font; use Language.removeAccents() for this. Or, select an existing ASCII-only language, like Language.HLETKIP or Language.DEEP_SPEECH.
      Parameters:
      random - any EnhancedRandom used for Biome names; if null, a randomly-seeded AceRandom will be used
      namer - a Language to generate gibberish names for biomes
      liquidAmount - between 0 (totally dry) and 5 (very wet)
      lifeAmount - between 0 and about 10 (with 5 being a typical Earth-like planet)
      liquidColorOklab - an Oklab packed int for liquids on the planet, as produced by DescriptiveColor
      barrenColorOklab - an Oklab packed int for barren surfaces, as produced by DescriptiveColor
      lifeColorOklab - an Oklab packed int for vegetation on the planet, as produced by DescriptiveColor
      Returns:
      a new Biome array with gibberish names for biomes that match the 66 expected by BiomeMapper