Making a modular game, components or plugins?

I’m starting a new project, I want to avoid past mistakes and keep everything as modular as possible.
My question is, should I separate the different modules in components or plugins?
I want the code to be re usable in other projects, and even share it with other people.
How do I determine what is the best option for each case?

i think to be a plugin it needs to be completely decoupled which is tricky to do in a game,

for instance i have an inventory component which is mostly self contained, but has a Max Weight which is determine by Strength which is on an Attributes component.

so as hard as you try to Decouple things they end up referencing each other.

I put helper things in plugins, kinda like a function library i might reuse but ultimately its whatever servers your game best

1 Like