Mod Structure
Mod Structure
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?
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?
Last edited by Mito551 on Sun Oct 28, 2012 20:25, edited 1 time in total.
-
- Member
- Posts: 844
- Joined: Wed Jul 11, 2012 15:02
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.
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.
-
- Member
- Posts: 844
- Joined: Wed Jul 11, 2012 15:02
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)
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)
- GloopMaster
- Member
- Posts: 213
- Joined: Wed Aug 01, 2012 18:03
- Location: http://minetest.net/forum/
Who is online
Users browsing this forum: No registered users and 31 guests