Dim: A Light in the Dark

Dim is an atmospheric puzzle game developed in Unity I worked on a few years back in a group of 5 people. In it I was the main developer as well as mechanic designer.

The main puzzle mechanic revolves around the player being able to collect and distribute energy “charges” which he can use to interact with the environment. Similar to a modern day battery, the player has the ability to charge and discharge specific energy containers. This triggers environmental effects (lights turning of, machines starting/stopping) as well as additional puzzle logic. A key example is that of elevators: based on the energy state of the attached container elevates to a different height. Additionally NPCs and other systems also interact with this quantized energy state system to allow for complex puzzles.

Technically the mechanic is implemented using an event system which allows concrete implementations to listen to state changes in associated containers and react accordingly. This allowed for the rapid development of additional layers while ensuring a continued correct behavior of the core system. Additionally, simple juice inducing effects were extremely straight forward to implement, allowing me to delegate this responsibility.

//Affect animations based on energy levels
public class AnimationMotor : BaseEnergyStorageListener
{
    ...
    public override void OnEnergyChange(int newEnergy)
    {
       bool active = newEnergy >= activationEnergy;
       animator.SetBool(IS_ACTIVE_ID, active);
    }
}