Page 1 of 1

Mod Structure

PostPosted: Sun Oct 28, 2012 20:12
by Mito551
this question was already asked a long time ago here, but neither i can find the topic with the question nor i believe it is up to date.
the question is:
if it's a modpack (or a game) is it better to have one (big) mod with a lot of code or several (little one) with less code? which is better for perfomance?

and i came up with another question: how to increase stability when you have a lot of mods? is there a way to make minetest less laggy and more stable with 20+ mods?

PostPosted: Sun Oct 28, 2012 20:16
by OdnetninI
i think it's better many little. Example: Messecons.

PostPosted: Sun Oct 28, 2012 20:22
by Mito551
you think or you know it? i need to be 100% sure.
(sorry if it sounds rude, didn't mean it)

PostPosted: Sun Oct 28, 2012 20:31
by OdnetninI
it better litle, but depends.
What are you trying to do?

PostPosted: Sun Oct 28, 2012 20:47
by Mito551
make minetest less laggy and more stable with 20+ mods, generally speaking.

PostPosted: Sun Oct 28, 2012 21:13
by OdnetninI
litle mods

PostPosted: Sun Oct 28, 2012 23:38
by cornernote
I'm not a guru at this, but I think the only difference it will make is startup time. Once the mods are loaded I don't think that it cares a lot that they are in the same mod or a different mod. It's all loaded into memory.

A more important question may be: "should i put all this code into 1 abm, or into many abms". The same can be asked with global_step type functions. These are the chunks of code that slow the game, because they have to execute the function using Lua. Although the function is already in memory, this is still a lot slower than executing a function in c++ because of the overhead of the Lua parser.

PostPosted: Sun Oct 28, 2012 23:43
by cornernote
Another important question when it comes to putting module code into 1 mod or many is: "how easy will this be for others to extend".

I think mesecons works great in a modpack, because each "thing" is its own "thing" that just happens to work with other "things". On the opposite side is technic. RBA decided it was easier for him to develop if they were all in 1 mod, just in their own file. I can see the logic in this option too. If all your files are called init.lua then it gets hard to find the file you want.

Anyway, I think the option of modpack or mod is more of a decision about how you want to structure your mod for development. I don't think performance should be a consideration, unless you care about startup time (or unless I am wrong about it only effecting startup time)

PostPosted: Sun Oct 28, 2012 23:52
by Dragonop
if you press - whit your numeric pad the distanve whil be - and the lag reduces

PostPosted: Mon Oct 29, 2012 02:16
by GloopMaster
we arent talking about render distance...