Should i use a framework?

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
}

for smaller or simpler games, using frameworks can sometimes add unnecessary complexity. If you’re comfortable with it and the game architecture is not too complicated, you can continue with OOP and frameworks to build more modular and reusable code. however sticking to simple scripts and modules might be more efficient and easier to maintain. it depends on your project’s scale and complexity. Keep experimenting to find what best suits your workflow.

1 Like