Original Post
Hello everybody,
I am currently writing my first "real" Game-Engine with C++, OpenGL and SDL. The problem is: how to manage objects?
At the moment I'm doing some kind of mix. I would say a "distributed scenegraph" - i got multiple data structures managing the objects:
For example: Updateable.hpp contains a vector, there will probably be a "Moveable" class containing all dynamic objects...
In the internet I found that scenegraphs are outdated and shouldn't be used any more.
While searching for a solution I found the "component based" model, but I do not really understand it
and don't know how to implement such a model in C++. (how should a class get elements of another without inheritance?)
I need an advice and if someone could give me a hint how to implement components, I'd be thankful
So the possibilities are:
1. classic scenegraph (I don't see any advantages in that)
2. component model (sound's nice, but no idea)
3. stay with distributed datastructures (implementation is easy, access is no problem since i've got a central Manager-class, but is it still working when project get's bigger?)
4. other suggestions?
Thanks for replies!
I am currently writing my first "real" Game-Engine with C++, OpenGL and SDL. The problem is: how to manage objects?
At the moment I'm doing some kind of mix. I would say a "distributed scenegraph" - i got multiple data structures managing the objects:
For example: Updateable.hpp contains a vector
In the internet I found that scenegraphs are outdated and shouldn't be used any more.
While searching for a solution I found the "component based" model, but I do not really understand it
and don't know how to implement such a model in C++. (how should a class get elements of another without inheritance?)
I need an advice and if someone could give me a hint how to implement components, I'd be thankful
So the possibilities are:
1. classic scenegraph (I don't see any advantages in that)
2. component model (sound's nice, but no idea)
3. stay with distributed datastructures (implementation is easy, access is no problem since i've got a central Manager-class, but is it still working when project get's bigger?)
4. other suggestions?
Thanks for replies!