Single Script Arc: Would this be bad practice/inefficent?

Ive been doing research on single script architecture(module based). I still haven’t fully wrapped my head around it and was wondering if this is how i am suppose to do it.

Game(Server Script) – Will require the controller scripts inside
ShopModule – Used to buy in game/dev items
vehicleModule – used to handle vehicles
InventoryModule – This will have modules inside handling: camos, backpack, etc
DailyRewardModule – Handles assigning player daily rewards.

Would it be efficient for this one server script to handle all these game tasks? Such as creating weapons and cloning to backpack, or spawning vehicles, customizing characters, etc?

Or would it be better for each to have its own server script?
So a Inventory Server Script that would have modules that deal with applying weapon customization, creating weapons, etc

It all comes down to preference, although personally I would recommend not doing a single script arc because I have worked with “big scripts” and they are not that fun to work with; even when the script is organized.

I personally have multiple scripts per system because I believe systems within the game should interact as little as possible with each other and it is easier to control the system interactions when they are separated.

But to answer your question: a single script arc is not “bad practice” or “inefficient” because it all comes down to how you organize your game which is different for each developer (although they may have the same central idea) they will ultimately be different.

There’s been quite a couple of threads about single-script architecture on the DevForum, so it would help to have searched for those first.

Here’s a response I offered to an old thread regarding it:

1 Like