Repository navigation
Programming Reference
Programming Reference Materials In this article you can learn about the game actually works.
Learn all about how to make a level in Collapse!
internal struct Collapse.Provider.GenerationRuleset

Generation rulesets expose the following values to tweak the gameplay experience:
- Jellyfish, Anchors, and **Bubbles **Enabled
- How many rows there are on the board to start off
-
Green,Blue,Yellow, andPurpleblocks being enabled/disabled for spawning in -
Green,Blue,Yellow, andPurplebubbles being enabled/disabled for spawning in - How fast new blocks spawn in (Each tick is this much time elapsed from the last)
- How many lines are needed to spawn in to complete the board.
internal class BoardProvider : IProvider
See: BoardProvider.cs
GlacierEngineexposes Providers which will handle aspects of the game's mechanics so it can remain organized. It is highly recommended to use theBoardProvideras opposed to directly accessing theLevelGenerator; however, it is at your discretion.

You can define your own GenerationRuleset per level by editing the rulesets Dictionary in the BoardProvider
public GameBoard Generate(int Level) in: BoardProvider.cs
This will use the rulesets Dictionary to load the level by the defined GenerationRuleset for the provided Level number.
internal bool GenerateNew(GenerationRuleset ruleset, out GameBoard board)
See: LevelGeneration.cs
Attempts to generate a new GameBoard using the given GenerationRuleset data.
internal class GameplayScreen : GameObject See: GameplayScreen

The GameplayScreen hosts the Gameplay for Collapse.
As you can see above, the StartGame function will clean-up the previous session and load the new level.
If your levels require custom logic to be loaded, you should do so in this function.
Since GameBoard inherits GameObject it can be added to the GlacierEngine object graph using the GameObjectManager referenced in the above example.