So I have a difficulty setting which is currently saved on an episode basis thanks to GG fantastic GGData library.
I have numerous modules that need to refer to this setting, so my question is:
Is it better to load in the GGData box (which contains the difficulty setting) everywhere it’s required, i.e require the GGData module and access the setting in every module that needs it.
OR
Upon initialisation load the setting once from the box and set a global variable that all additional modules can refer to?
Always followed the ‘local is better’ methodology, but the more modules I create and keep having to require GGData, access the setting, initialise a local variable, etc… makes me question whether this is actually the better approach.
Thoughts and opinions would be appreciated. [import]uid: 33275 topic_id: 35192 reply_id: 335192[/import]