Configuration
This page contains a list of all the properties that can be configured on the Walker Generator component. This is NOT a good place to start your journey with Frigga. You should first at least watch the Getting Started video. The generator comes with a sensible default configuration so you can usually most of the fields intact.
General
This section contains the general configuration of a procedural level generator.
Theme
The Theme that is used after a layout is generated. This field is mandatory.
Output
References the game object that contains the generated level. This field can be left empty and a new game object will be created for you after you generate the first level. In case you need to customize the structure of the generated level, you can refer to the Customize output page.
Generate On
Configures when a new level should be generated. By default, it is set to Awake
which means that a level is automatically generated during Awake()
when a scene gets loaded. It can also be set to Start
or Manually
. When set to Manually
, no level will be generated automatically and you need to use the scripting API.
The manual approach is recommended for production purposes when working with loading screens and similar, while the automatic approach is great for prototyping because you do not need any extra code to run the generator.
Seed
Random generator seed to be used when generating a new level. Using the same seed leads to two identical levels being produced, which can be useful for save system or multiplayer purposes.
Use Random Seed
Whether a random seed should be generated each time the generator is used. When set to true, the Seed
field is ignored.
Auto Refresh Theme
When enabled, the theme of a level is automatically refreshed when a change is made to it in the editor.
Animation Speed
The speed of the animation when running the generator in an animated mode. How many ms to wait between the steps of the generator.
Show Gizmos
Whether to show generator gizmos, for example, the positions of individual walkers when animating the progress.
Walker - General
This section contains the general configuration of the walker algorithm.
Fixed Level Size
Configures whether the level has a fixed-size frame to fit into or not. If enabled, each level must fit into an N by M frame defined below when a specified ratio of floor tiles is achieved. If disabled, the level is not bound by any fixed frame and the generator is stopped only after a specified number of floor tiles is used.
Setting Fixed Level Size
to true
usually leads to more dungeon-like levels because the generator is forced to use a specified bounding box, forcing the walkers to come back to already explored parts of the level, making passages that lead back to the level. The disadvantage of this configuration is that the frame is apparent in the generated level because you can see a long straight wall.
Setting Fixed Level Size
to false
usually leads to more organic shapes because there is no invisible wall that the walker can bump into into. This can lead to shapes similar to island or continents.
Level Size
Configures the size of a frame into which each generated level must fit. Is used only when Fixed Level Size
is enabled.
Border Size
is always applied on top of the level size. That means that if Level Size
is set to 60x40 and Border Size
is set to 10, the size of the generated tilemap will be 80x60.
Fill Ratio
Configures the target ratio of floor tiles versus wall tiles. Is used only when Fixed Level Size
is enabled. The generator will run until this ratio is fulfilled. A good default value is around 0.3, or 30%. If set too high, the generator might not be able to produce such a level and will stop after Max Iterations
no matter whether the ratio was reached or not.