Hello!
Many developers are very annoyed by the process of organizing a game. For this reason, they don’t do it and abandon the project. I’ve done it myself.
Now I will describe what is used for what, because some things like the advice not to use StarterGui may seem strange.
First, I advise you to put the UI in ReplicatedFirst and nowhere else and clone them on the client for each player.
Memory Leak: When using the StarterGui interface, | |
---|---|
roblox copies the UI from StarterGui directly on the server. This leads to the fact that in large projects, the server can receive gigabytes of unnecessary information. The solution is to simply clone the UI on the client. To do this, it is most logical to use ReplicatedFirst or ReplicatedStorage. |
dividing Workspace into two large subgroups - GameArt and gameplay. GameArt may contain scripts, however, these scripts should be secondary, if you can say so. Flashing lights, shaking the object. In general, this is about ambient scripting. gamePlay, on the contrary, should contain entirely scratched objects that the player can interact with.
-What is a Utility?
this is an overused feature. In the case of the server, these are validators, read about them. In the case of the client, these are simple functions. Type of formatTime and so on
-the difference between Storage and template library:
the first should store what you need during the game only on the server (in fact, it’s hard to even imagine such a thing, lol), and the second should be a kind of tool box, but only for your game. Keep there what you may need during game editing, but definitely not at the moment after the server is turned on.
-Packages? Why not just libraries and so on?
because I think that Packages is the most correct name in the context of roblox. I divided it into classes, with which everything is clear, managers, with which everything is not so smooth anymore, but I think it’s clear that they work for all objects (ZoneManager, RaceManager, &c.)
as well as libraries. They are needed to store global modules
, which, if they are classes, are singletons. For example, ProfileStore is definitely a library, not a class or a manager.
What else are Core and Server/Client Loaders? The kernel performs a light function - calling the loader module. The loader module, in turn, calls all the other modules that the client or server needs. The difference between the ReplicatedStorage client side and StarterPlayerScripts is that you should put those scripts in ReplicatedStorage… Which are more important, so to speak
so, module for auto download and structure you can load here:
folderStructure.rbxm (9.1 KB)