Amen AcidArrow!
And this too ^ ^ ^ . No sense confusing yourself by putting everything in little silly boxes just because your CS-100 teacher says you should.
In computer games, especially during prototyping and developing new complex features, larger agglomerations of “multifunction” code simply make more sense.
Tactically I love the C# partial class modifier, which lets me break apart complex large classes into at least smaller editable files, which greatly helps with source control conflicts when working on a team.
Like my Jetpack Kurt controller. Let’s talk about the input → physics chain.
Input can come from many sources: touch, keyboard, mouse, or Android TV.
Each of those is a class. Each input goes through a different filter mechanism actually contained within the class.
But when it comes into the flight control system it is ALWAYS the same: pitch, power, yaw, roll, four float variables from -1 to +1. Yes even power goes from -1 to +1 for consistency.
Now that we’re inside the main player controller, a bunch more processing has to happen, and all of it is related.
First the power is modulated according to engine type: how responsive is the engine control? Instant? Slow?
Next the flight stability augmentation system judges user input and filters it for actual intent: the thrusters all take direct impulse actions but the user inputs are positional, as in “tilt to X degrees.” Therefore a PD controller filters each position input into a rate control according to aircraft attitude:
- if you are upright within normal ranges - standard stability augmentation
- if you are too far over or upside down? stability is disengaged and controls revert to rate law.
Now the inputs are mapped into the visual cockpit control stick, so you see the stick deflecting. That’s just a local piece of geometry within your field of view.
Next up is the fuel system… do you even have the fuel required at this moment to do what you want? If not, controls are nulled out and warnings are generated. The fuel consumer is a separate class instance with a “can I burn?” and “get remaining quantity” and “refuel yourself” API.
Now we have conditioned and filtered pitch, power, yaw and roll… time to scale them for this spacecraft’s particular reaction jets, which is mostly just a scaling operation.
Power is also remapped to 0 to +1 based on current engine mode settings.
Finally in FixedUpdate() the inputs are applied as torques around the three axes, plus power as a force.
Almost all of that happens in one straight line of code, with the tiny classes to one side. Almost every one of those classes began life as a function within the main controller originally, and was gradually extracted out.
But the primary controller still has the bulk of the logic. Partials let me rip it apart, and scenes let me set up the entire player in its own single scene, like so:

As you can see there are several other subsystem “chains” of data: instrumentation, damage
https://www.youtube.com/watch?v=34wbtTIWdDQ