← 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

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 —
LeverControllerexposes a serializedUnityEvent, 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 —
BossMovementextendsEnemyMovement, inheriting patrol and animation handling through aprotected Animatorwhile adding distance-based chase and attack behaviour - Coroutine-driven behaviour sequencing — boss routines (
Boss_Movement,Idle,Chase) and gateTransport()transitions run as coroutines rather than blockingUpdate, keeping timed logic readable - Enum-keyed save system —
Gatesserializes aGateStatusperGatesNointoPlayerPrefsusing the enum name as its key, so every gate you unlock survives a restart - Typed domain model —
KeyType,LeverType,GateTypeandRoomNoenums 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



