#single vs multi script architecture
1 messages · Page 1 of 1 (latest)
Have you looked at this yet?
https://youtu.be/Yxh8IsUIsZk?si=u2HpVyl59O18zAXJ
Chapters:
0:00 Intro
0:39 What is it?
2:56 Which do I use?
5:34 Examples
8:36 Final thoughts
A single script architecture means the client and server utilizes one single script to handle all game logic. They typically (always) use modules. This is good for almost any project you make and allows for easy loading systems to be made out of them.
Multiple scripts are also good and is an easy way to create systems pretty fast. Though one problem does arise and it's multi-script communication but there are many ways to fix that issue. It's all about what you're most comfortable with tbh
I prefer a single script architecture just because it's ease of use and allows me to execute scripts in a specific order I want
Single script gives me more control over what happens when, multi script is more simple since the server script just runs. Single script is used more and is usually recommended more for organization and stuff but if you do it bad, it’s a nightmare
Using both systems can be modular, it’s really just up to preference. Of course a module script can always act like a server script, you can just control when it runs
But why are they better for making systems
Why is single script better for systems is what your asking
?
Having 10 files that are 100 lines each is better than having 1 file that is 1000 lines in terms of readability.
you can have 10 files that have 100 lines in both single script arch and multi script arch?
i think you dont know what single script arch is
a single script architecture doesn't mean you actually use 1 single script (in roblox standards)
I have a module that loads my Handlers and Controllers within the subfolders under the Handlers folder
The one client script handles all logic for most client behavior (ui, movement, etc.)
While a multi-script architecture will most likely ditch the modules and use scripts for each system which is fine
thats what im trying to figure out
oh didn't see this
For me it allows to load modules in a certain order
So systems with higher priority to load first can load first
Thats about it rlly
thanks for your help @solar sleet now i know why to use it