Cytopia icon indicating copy to clipboard operation
Cytopia copied to clipboard

Create Terrain generation dialog

Open SimplyLiz opened this issue 2 years ago • 1 comments

When the player clicks on "New Game" Display a dialog with settings for terrain.

Following settings are available in TerrainGenerator.cxx:

struct TerrainSettings
{
  int mapSize = 128;
  int seed = 0;         // If the seed is 0, a random seed will be generated by TerrainGenerator::generateTerrain()
  int seaLevel = 2;     // All tiles with elevation below this will be set as water.
  int treeDensity = 50; // 0% no trees, 100% All trees everywhere all the time.
  int mountainAmplitude =
      10;              // Both amplifies the mountain noise source, as well as biasing the mountain/plains blend. Expects 0-100.
  int waterAmount = 5; // Density of freshwater in addition to coastlines and rivers. Expects 0-100.
  int coasts =
      1; // 4 least significant bits are bitmasked, where 0 is a land border and 1 is a coastline. Remaining bits reserved for future use.
  int rivers = 1;              ///< Number of rivers to attempt generating.
  std::string biomes = "{}";   ///< JSON string of biomes to attempt using, plus any options associated with them.
  std::string advanced = "{}"; ///< JSON string of arbitrary advanced option data for future use or mods.
};

We need UI Elements for:

  • DropDown Map Size
  • Textfield Seed
  • Slider Water (0-100)
  • Slider Foliage density (0-100)
  • Slider Mountain height (0-100)
  • Slider for sea level
  • DropDown Biome
  • Checkbox Rivers

Buttons:

  • Generate
  • OK

SimplyLiz avatar Jun 05 '22 16:06 SimplyLiz

I'll draw a quick sketch/mockup and either post to discord and/or add as a comment on this ticket.

lizzyd710 avatar Jun 16 '22 13:06 lizzyd710