I would like some industry advice. I feel like the starting part to every game I create is the character controller. My goal is to create a solid base character controller that I can expand upon for any type of game that I create. That way I'm not recreating the same system over and over again and start focusing on what makes my game unique. I was wondering what system design principles are used to create character controllers that are modular and can easily interact with numerous gameplay features. Here are the features that I think pretty much 90% of character controllers need:
- process Input
- Abilities/ways to interact with the world.
- Reaction/modifiers: how the game world affects the controller/player.
- Some way of dynamically adding and removing abilities and modifiers and allowing and disallowing the ability to use them.
- (optional) replicate and reconcile in a multiplayer context
The most common way I see to achieve this in tutorial land is with a finite state machine. The problem with that approach is as your character controller rises in complexity you come across these issues:
- State explosion
- difficulty to debug and test
- lack of ability to add dynamic behavior
My gut tells me that there is a better way than just state machines.
A new approach that I have seen is Unreal 5 Gameplay ability system (GAS) the problem I hear with that is that it is overly complex and limited to Unreal.
Are there any examples of greatly designed character controllers on the internet? Perhaps if you worked on your own character controller you could share some insight on how it was designed?