This is something I have trouble doing or managing.
I want wondering on how should I be sorting or Organizing my Modules, because when using them, I usually have one for a separate task, but some modules are inside modules, so now I’m kind of concerned on how I should be doing it at the moment as right now, It feels like I’m looking through so many areas for modules.
? Sorry I’m a little confused, also for what I know ModuleScripts are made to store information that more than one Script will need more than once, like the Owner’s ID, or Gamepasses IDs, I think I would use them for different tasks, like on to store Gamepasses IDs, one for keeping Exploiters IDs, one for keeping Variables that a lot of Scripts will need multiple times, even though I never effectively used them , thsi is only how I think they would and should be used, I’m not a Programmer so take thsi withh a grain of salt
Wait, that’s even a thing? You mean like a ModuleScript that has a Child that is a ModuleScript? If you mean that I think taht if you sue it like: AI Script: Flee Or Fight Script Pathfinding Script Attack Script
Etc…
You should only sue thsi method if you are having a lot of different Variables taht are used a lot and are not just a few
If I have subclass modules that extend the original module,I put them parented under the superclass module script. It helps with sorting and visualization. If not, they go under the origin main script in ServerScriptStorage. That way, it makes it much easier to share module environments between modules, and a lot easier to manage.
Whenever you want to make a new feature, such as enemies or npcs, make a new module script. If it needs another module to function, put it under the module it needs. If it requires more than one, put it under the main script.
How I’m currently sorting it (from memory is something like this)
In serverscriptstorage there’s a “modules folder”
I’m that folder I have the following folders:
Util,
Core,
Player,
Gameplay
It’s nice and simple. And in these four categories I can almost fit everything. Sometimes for totally unrelated stuff I either make a “other folder” or just parent it to the modules folder
Also what @Sniperkaos mentioned is a good idea to further enhance the “workflow” of your modules
From the structure in your picture it sort of looks as if you were using a Framework, such as Knit or AGF (AeroGameFramework), but if you aren’t I would recommend looking into them as you can learn how to structure and organize games effectively.
I personally recommend learning Knit as its one of the most popular options
Thats okay, I was recommending these frameworks so you could check out how other well reputable people organize their games to give you an idea if itd benefit you or not