Hello,
I am asking this because I have seen many scripts/gamemodes written quite differently. The two main structures I see for gamemodes are like this:
Resources
gamemode folder
client folder
gui folder
-gui_c.lua
server folder
gui folder
-gui_s.lua
In this way everything is contained into 1 resource/script and the say 20-30 other modules or scripts would be contained in there
Resources
gamemode_gui folder
- gui_s.lua
- gui_c.lua
gamemode_spawn folder
- spawn_s.lua
- spawn_c.lua
In this case the gamemode is fragmented into different resources and started seperately
Resources
gamemode folder
- main_client.lua
- main_server.lua
In this case all the code is literally put into 2 lua files which could be very large and hard to organize
Is one design better than the other? In terms of performance? I know for my fragmented resources is better/more organized in my opinion, but with the combined gamemode resource you are getting 1 resource thats being loaded and it is more clean
When you make it one folder for the gamemode you can share functions and such but with the fragmented one you have to repeat certain functions