I’m currently getting into OOP for script organization purposes, but i recently found that many people recommend not to use OOP or frameworks, and rather do simple scripts and modules for all of this, before that, i was making a custom framework for my games (making things by myself help me understand what they are used for) but i don’t know if i should continue it or use a regular game structure.
Here is how my game architecture look:
ReplicatedFirst >
- Scripts (folder)
- InitClient (local script)
ReplicatedStorage >
- Components (folder) >
-
- Library1 (module)
-
- Library2 (module)
- Framework (module)
ServerScriptService >
- Scripts (folder)
- InitServer (script)
Here is how my folder architecture look:
Library:
local TestLibrary = {}
TestLibrary.FullName = "Test Library"
TestLibrary.Requirements = require(script["Requirements"])
TestLibrary.Core = "(what's getting returned when using Framework:GetLibrary(libraryName))"
return TestLibrary
Content: depending on the libraries need
Init: module script, getting :Init(unpack(requirements)) when the game loads
Requirements: contains the libraries requirements (for exemple other libraries or if it requires to init): exemple:
local Requirements = {
["_init"]={},
["_self"]={}
}
return {
Requirements=Requirements,
Completed=false
}