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). |
Example[]
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} ] }
Properties[]
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 Generation[]
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 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).
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 Biomes[]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. |