I’ve read multiple threads about this topic and some of the questions of I have were either un asked or just left me more confused.
I’m new to using module loader and I feel so dumb that I didn’t think of handling things like that. I have a few questions for anyone that can assist me.
So I noticed that it requires every module in the folder, even if they don’t have a start function.
I understand that some modules will be for util, which would be in another folder. For the modules that the loaders init, should they all have a start function - even if they’re not supposed to run at runtime? Should I take out the modules that don’t have a start from the modulefolder that’s being loaded? I don’t see the point in requiring them when they’re not needed, unless there’s a benefit that I don’t know about.
If they don’t run at runtime, would it be considered a “Util” module? Even though it’s a huge part of my game (GunManager).
I’m still confused as to what modules should be loaded from the moduleloader, would it just be important game logic like data manager for server and ui manager for client? Again, how about the modules that don’t need to run at runtime?
Yeah this topic is pretty complicated, I’ll post some resources on this topic.
For a question like this it is ultimately up to you if you can find it. If you are working in a team then its a shared responsibility that requires an additional category you can give it a name like “ObjectUtilityLibrary” or whatever.
Fundamentally it’s a software design pattern from my research.
Example of other code organization Model View Controllers: