FANDOM


Biomes are a layer of World Generation.

A biome is a collection of Tiles, which are arranged by a perlin terrain generation algorithm. By the selection and aggrangement of the Tiles a Biome has a distinctive look and identity, such as a generic mixed grassland area or a special mountain area with small lakes inbetween. Every Biome can come with a defined set of Locations and Zones that will be spawned inside (however, it is best to define the Locations in Pockets).

WorldGen 02

ExampleEdit

This example is slightly shortened for improved readability. Go to GitHub to see the the unedited entry.

{
   id: bio-grasslands-generic
   name: txt-bio-grasslands-generic-name
   flags: +grass
   debugColor: green
   eventImg: {day: evt_bio_grasslands_1.png, night: evt_bio_grasslands_1_night.png}
   terrain: [
     {perlin: 0.8, tile: tl-grass}
     {perlin: 0.74, tile: tl-dry}
     {perlin: 0.66, tile: tl-mountain}
     ...
     {perlin: 0.13, tile: tl-river-shallow}
     {perlin: 0.11, tile: tl-river}
     {perlin: 0.1, tile: tl-river-shallow}
     {perlin: 0, tile: tl-river}
   ]
   locations: [
     {select: 1, group: grp-eyeCandy-grasslands}
   ]
   zones: [
     {
       select: 1
       group: [
         {slots: 3, ref: zn-hyena}
         {slots: 1, ref: zn-panther}
       ]
     }
     {
       reqWorld: 2..3
       select: 1
       group: [
         {slots: 1, ref: zn-tiger}
         {slots: 1, ref: zn-panther}
       ]
     }
     {chance: 0.3, select: 1, ref: zn-elephant}
   ]
 }

PropertiesEdit

Name Type Description & Example
id string prefix bio-
id: bio-grasslands-generic
name string The name of the Biome. Will not be shown to Players
name: txt-bio-grasslands-generic-name
flags string The types of flags set for this Biome
flags: +grass
debugColor string The color of the Biome name when using the Hotkey to show the Biome debugging (press B)
debugColor: green
eventImg string The image that will be shown in the background when an event is triggered while Players are located within this Biome
eventImg: {
  day: evt_bio_grasslands_1.png
  night: evt_bio_grasslands_1_night.png
}
terrain data Define the perlin noise settings here for how the Biome will be made out of Tiles. For more information see #Perlin Terrain Generation
terrain: [
     {perlin: 0.5, tile: tl-grass}
     {perlin: 0.1, tile: tl-river-shallow}
     {perlin: 0, tile: tl-river}
]
locations string One or more locations that will be spawned in this Biome. Can be enhanced by using Selection Groups
locations: [
 {select: 1, group: grp-eyeCandy-grasslands}
]
zones string One or more zones that will be spawned in this Biome. Can be enhanced by using Selection Groups
zones: {
  select: 1
  group: [
    {slots: 3, ref: zn-hyena}
    {slots: 1, ref: zn-tiger}
    {slots: 1, ref: zn-panther}
  ]
}

Perlin Terrain GenerationEdit

Perlin-noise
The terrain generation of Curious Expedition relies on the Perlin Noise algorithm. Basically, the algorithm creates a greyscale cloud that, while random, blends smoothly between the different shades between white and black. To tune our terrain for the game, you will assign different Tiles to certain ranges between white and black. Feel free to learn more about how Perlin noise works, however, it won't be necessary in order to be able to work on the terrain generation of our game. You will find the game's standard perlin settings in the game.conf.json.

The basic structure of a terrain setup looks like this:

terrain: [
  {perlin: 0.7, tile: tl-mountain}
  {perlin: 0.5, tile: tl-river}
  {perlin: 0.0, tile: tl-grass}
]

In a sense, the perlin terrain generation allows you to create a sorting order for Tiles, so they are generated within a specific range. A typical entry in a terrain section consists of 2 elements and looks like this:

{perlin: 0.0, tile: tl-grass} 

perlin defines the range within the perlin noise that you are assigning
tile defines the kind of Tile you are assigning to that range

The perlin range will always start at it's defined value and range upwards until there is a new entry. For example, in this setup the tl-grass range will be from 0.0 to 0.4 and tl-thick-jungle will reach from 0.4 to 1 (the perlin range always reaches from 0 to 1).

{perlin: 0.4, tile: tl-jungle-thick} 
{perlin: 0.0, tile: tl-grass}

If generated, this setup will create this kind of terrain:

PerlinGen 01
If now another perlin range is added between the existing entries, the terrain will have the tendency to generate a thin frame of tl-river between the grass and jungle tiles.
{perlin: 0.4, tile: tl-jungle-thick} 
{perlin: 0.3, tile: tl-river}
{perlin: 0.0, tile: tl-grass}
PerlinGen 02
It is important to understand how the ranges are distributed with the given entries. Take a look at the image to the right to see how exactly the range entries of the current example behave.
PerlinGen range 01
Let's move the river entry above the jungle to create water 'inside' the jungle blobs. The range distribution will now look like this:
{perlin: 0.5, tile: tl-river} 
{perlin: 0.4, tile: tl-jungle-thick}
{perlin: 0.0, tile: tl-grass}
PerlinGen range 02
Of course now the water tiles are much more dominant than the jungle, as they are assigned a much wider range within the perlin generation.
PerlinGen 03
Let's add another grass layer of grass after the river. This will create small islands inside the water blobs again:
{perlin: 0.7, tile: tl-grass}
{perlin: 0.5, tile: tl-river}
{perlin: 0.4, tile: tl-jungle-thick}
{perlin: 0.0, tile: tl-grass}
PerlinGen 04
As a final touch, add another shallow river layer between the islands and the river to have the tendency of passages being generated. With this simple setup we have already created an interesting Biome. Feel free to experiment and create much more complex Biome setups. Make sure to see how to easily debug and test Biomes and take a look at some of the Biomes we have created for the game.
{perlin: 0.8, tile: tl-grass}
{perlin: 0.75, tile: tl-shallow-river}
{perlin: 0.5, tile: tl-river}
{perlin: 0.4, tile: tl-jungle-thick}
{perlin: 0.0, tile: tl-grass}
PerlinGen 05

On a personal note I'd like to say that working on the terrain generation was one of the most satisfying aspects of the development. Feel free to experiment and mix together different Tiles to come up with all kinds of crazy and interesting combinations. The best ones are these which not only look good but also present interesting challenges or variations of the gameplay norm to the players.

Debugging BiomesEdit

You can easily debug Biomes by using the Hotkey R. This will re-generate the Biome you are currently located in. Or you can use the debugBar to select a Biome which should be generated at your current location. Just enter the name of the Biome in the Entities section of the debugBar.

BiomeDebug

Community content is available under CC-BY-SA unless otherwise noted.