My current project has grown to consume more resources than I like, so I’ve been looking for ways to optimize.
One thing that keeps bringing me back is the input handling.
The game uses a single “Mode” BP but plays in several play modes, primarily third person, first person for range device, another third person for the use of the various vehicles in the world and after some creative input, I have added a sustained drivable ‘tumble’ state.
I’m taking each input in the Character BP and running it through a Switch On Int to handle it based on the mode.
A very simplified example (to fit it onto a single screen) is this.
(Just imagine there is a Play_Mode Get attached to the “Selection” pin on the Switch.)
And I know that if I were doing this in C++ directly this would be the optimal method, or far superior to polling for the game state and then testing for inputs.
But for some reason I cannot shake the notion that this, too, is not the most efficient method.
Any advice on this? Is this as good as it gets or am I overlooking something?