Candle-Fire / umbra

1 stars 3 forks source link

[RFC-003] Namespace segregation #37

Open TheCurle opened 3 months ago

TheCurle commented 3 months ago

I feel like using the SH namespace (as per RFC-001, which I remain in favor of) for all engine provided tools is rather restrictive.

It leads to situations where code utilities like the event manager, module system, timer, etc are in the same namespace as game-world functions like the scene, components, entities, systems...

I feel like we should have a namespace for game-world, separate from SH.

Perhaps something like SW, standing for Shadow World?

dpeter99 commented 3 months ago

What would you put in the SW namespace? The actual entity components like: SW::PointLight and SW::Mesh ?

TheCurle commented 3 months ago

In short, things that can affect the actual game scene. SW::Scene, SW::Light, SW::Entity, SW::Component, SW::Model.

dpeter99 commented 3 months ago

Sure I can look into refactoring those, might make some of the entity code a bit more spread out over 2 namespaces tho... I'll put that into the V3 of the ECS

TheCurle commented 3 months ago

I think there's not much entity code that won't be in the new namespace; if the whole ECS module is in SW namespace, it should be really self contained.