oh nvm, I’m stupid. scripts don’t work on serverstorage. couldve sworn it does though
if you set the scripts runcontext to legacy it wont run in server storage but if you set the runcontext to server or client it will run everywhere
this is just how roblox currently works has no relation to the framework
the reason is that when you dont follow these rules, your code becomes janky very quickly and easily breaks. that’s something that might happen while using this. also, thanks for loving my argument, i would say it is pretty crafty myself
You are still not elaborating on why it makes your code janky, stop playing dumb and explain already, I need to know. Prove me wrong or something already.
This is extremely inefficient for something simple
what do you mean by eliminating cyclic modules?
To just clear up any confusion
-
The Global Module, Plugin and Library does not have any circular dependencies within them
-
The Global Framework does not force you to have circular dependencies but gives you the freedom to choose if you want them or not
For anyone that does not know what a circular dependency is here is a example
lets Imagen your making a minecraft style game and you have 2 objects/classes world
and block
-- WorldModule
local Block = require(BlockModule)
local World = {}
local blocks = {}
function World:SetBlock(blockType, x, y, z)
blocks[x][y][z] = Block.new(blockType, x, y, z)
end
return World
-- BlockModule
local Block = {}
function Block.new(blockType, x, y, z)
local block = {}
block.Type = blockType
block.X = x
block.Y = y
block.Z = z
return block
end
return Block
Now at this time World requires Block but Block does not require World so there currently not cyclic but you might notice that even though we have no cyclic dependencies these 2 modules are highly coupled together World does not work without Block and Block does nothing without World ok lets now for example add a explode function for blocks and do it in a way that makes it cyclic
-- BlockModule
-- this is a cyclic require
local World = require(WorldModule)
local Block = {}
function Block.new(blockType, x, y, z)
local block = {}
block.Type = blockType
block.X = x
block.Y = y
block.Z = z
return block
end
function Block:Explode()
for x = -1, 1 do
for y = -1, 1 do
for z = -1, 1 do
World:SetBlock("Air", self.X + x, self.Y + y, self.Z + z)
end
end
end
end
return Block
Now world and block are cyclic they require each other
Some people might say this is bad some might not but the good thing about this framework it gives you the freedom to choose
Would you mind sharing what parts are inefficient so that i can improve them
Any tips on making them efficient would be greatly appreciated
also this framework is open source and if anyone wants to contribute any code towards the project id be happy to review any changes anyone puts forward