← Back to games

The Dark Keep

2D platformer RPG with an event-driven lock, lever and key progression system

Unity 2021.3 LTSC#Observer / UnityEventInheritanceCoroutinesAnimator FSM
The Dark Keep

Storm a monster's castle to free the imprisoned princess, through enemies, traps and multi-step room puzzles. Move with WASD or arrows, attack with a sword (Z) or spear (X), and interact with the world using space.

Tech stack

Unity 2021.3 LTS · C# · Rigidbody2D + trigger colliders · Unity Animator state machines · UnityEvents · Coroutines · PlayerPrefs persistence

Architecture & design patterns

  • Observer pattern via UnityEvent — LeverController exposes a serialized UnityEvent, so a lever's effect on gates is wired in the Inspector instead of hard-referenced in code, keeping puzzle authoring data-driven
  • Inheritance & polymorphism — BossMovement extends EnemyMovement, inheriting patrol and animation handling through a protected Animator while adding distance-based chase and attack behaviour
  • Coroutine-driven behaviour sequencing — boss routines (Boss_Movement, Idle, Chase) and gate Transport() transitions run as coroutines rather than blocking Update, keeping timed logic readable
  • Enum-keyed save system — Gates serializes a GateStatus per GatesNo into PlayerPrefs using the enum name as its key, so every gate you unlock survives a restart
  • Typed domain model — KeyType, LeverType, GateType and RoomNo enums drive a room manager that activates chambers independently, making the keep extensible room by room

Enemies are differentiated by reward rather than stats alone: SkullSpiders drop coins, Goop yields a health potion, and Ghosts drop the keys that gate progress.

Gallery

The Dark Keep screenshot
The Dark Keep screenshot
The Dark Keep screenshot
The Dark Keep screenshot