how to structure player classes
Balancing SOLID principles against over-engineering depends on project scope, with recommendations ranging from minimal scripts to modular component splits.
- Simple projects can manage with minimal separation like a Player script and a PlayerCamera, avoiding modularity until requirements like multiplayer demand it
- Applying SOLID principles advocates for single-responsibility classes using inheritance, composition, or interfaces to decouple modular features
- A player script reaching thousands of lines indicates a strong need for modular restructuring
- Base classes can be introduced later once shared functionality or multiple implementations become necessary
- A practical middle-ground architecture separates responsibilities into distinct Player, PlayerController, and PlayerAnimator scripts


