We're making an RPG styled game with lots of functions for story events. They're not run consecutively; just called once when they occur in the plot. The idea is that the array we're using for storing dialogue also stores function strings that we call for certain scenes. So for example, a function for a scene with a character repairing a machine, a function for an earthquake scene with a rumbling camera and surprised NPC's, stuff like that.
How heavily is performance or memory usage affected by putting a function in an event sheet, even if not being called at the moment? (basically
And stemming off of that, what's an ideal number of functions in your game to stay below? 100, 200, 500, etc?
I apologize if this is a stupid or redundant question lol
Total number of functions that exist, it's not going to matter. They're not running all the time it should have no effect.
Develop games in your browser. Powerful, performant & highly capable.
A function that is not called has no performance overhead.
Unless you call tens of thousands of functions per tick, the CPU overhead will probably be negligible.
You can always make your own measurements too.