Possession Mechanic & Ghosty System
The game features a mechanic where the player can use tiny creatures called "Ghosties" to possess and control certain environmental objects.
The Ghosty behavior is driven by a simple state system implemented using enums, which controls transitions between following the player, moving toward a target object to initiate possession, and remaining in the possession state while attached to an object. The simple design made the system easy to maintain and debug while fulfilling the design requirements.
I implemented the core possession and extraction mechanics that allow the player to send Ghosties into certain objects in the environment. When a Ghosty possesses an object, the object can perform specific actions such as moving, rotating or other actions. The player can also extract Ghosties from objects, returning most of the objects to its default state and allowing the Ghosty to resume following the player.
The system also included a command mechanic where the player can command the ghosty that was possessing an object to do the certain action, mostly move from point A to point B that was chosen by the player. This was cut for scope reasons.