Adding components and systems
Add a component
- Define the struct in
Engine/include/Components/.
- Register it in a plugin:
registry.RegisterComponent<T>().
- Add reflection in
Engine/include/Reflection/ComponentReflect.hpp if it should serialize.
- Add an
IPluginEditor if it needs custom inspector widgets.
- Add a Lua binding if scripts need to touch it.
Add a system
- Define the class in
Engine/include/Systems/ and Engine/src/Systems/.
- Register it in a plugin:
registry.RegisterSystem<T>().
- Document ordering constraints: register dependencies first.
Guidelines
- Keep components dumb and small.
- One system, one job.
- Queue destruction; never mutate a container you are iterating.
- Prefer several small components over one large one.
- Bundle registration in a plugin.
See also