Posted March 24, 2025 by Vojguard
Wave Function Collapse This code is the main algorithm for the level generation. It hold all the parts of WFC (Collapsing the cell with the lowest entropy and propagating the updated tiles set). The level is generated from a base size and is larger with a higher number of rifts that need to be spawned.
The preprocessing is divided into several steps:
Enemy Controller The Enemy Controller script holds the enemy stats scriptable object, part of it are also AI behaviours for the different states of the enemy. The controller chooses the best state depending on some external factors and acts on it using the enemy behaviours in the scriptable object. These AI Behaviour scriptable objects have three methods:
Player Health The small but mighty Player Health script takes care of the health and shield status of the player. If the shield active the player doesn’t take permanent damage to the health. The shield regenerates after some time, when no damage is taken. The health doesn’t regenerate, to heal the player needs to pick up a health box. Each change triggers a tween on the respective bar. When the player dies, a tween is called on the dissolve coefficient property of the Shader Graph material on the player.
Code I am the proudest of: Editor Extension - Enemy Stats
Code that should receive a complete overhaul: HiveMind Manager (AI)