Posseslime - Controller System

A highly modular controller system made for Posseslime.

In this 3rd person plateformer/puzzle game you are a slime that can possess creatures to overcome obstacles.

I have been hard at work since october 2022 as one of the game designers and the lead programmer. Very early on I started working on the controller system since we didn't know how many abilities, movement types and camera systems would be needed. And we needed to have a system that would allow to easily change the inner workings of each and every system and have the same system across multiple creatures. We also wanted a fusion system, which didn't make it into the game but it forced us to have one system for all the creatures so the player could use one and seamlessly start using an other and mix and match abilities from multiple creatures.

The controller is separated into the PlayerController and the Controller, the PlayerController is used by the player to forward inputs to the possessed controller (be it the slime or an other creature)

The Controller receives camera inputs, movement inputs and ability inputs. The camera inputs are sent to the CameraConfiguration which is used to move the camera thats in the CameraController.

The movement inputs are processed by the Controller depending on the relativity types : World, Camera, Object, Self, etc... and then it is sent in World Space to the ControllerMovement which is the custom movement module set in the Controller. It means you can have the same module and send the inputs relative to the camera or relative to World Space and it will work the same way. This is useful for the AI since it can use the same module as the player and just send the inputs relative to World Space.

The controller can have as much abilities as you want, you just need to determine an input it should respond to and the Controller will send the input press/release accordingly. All ControllerAbility can respond to the same input and can be ported and reused across all Controllers and switched at runtime. All abilities have cooldowns and input buffer that can be activated/deactivated and set.

The controller also has additionnal functions like ground, wall, ceiling detection, custom gravity, etc... and a ground reference system which can be used to move the controller when it is grounded on any moving object, be it a plateform or an other controller.

When no PlayerController is using the Controller, the AIController activates itself and sends inputs to the Controller based on the tasks the behaviour tree gives to it (go here, use this ability, etc...).

The list of abilities is also used to display the UI and the abilities that can be used at the moment. The UI doesn't display the cooldowns and the input buffer of each ability, even though it could.

This system meant we could develop one jump and have multiple creatures using it with different metrics, and if we needed to add, remove or change things all creatures would be affected by the changes. The system used offered great manoeuvrability throughout the project

To go back to the main article, check the link section.

Don't forget to send feedbacks !