WorldEntity
Posted: Mon Jun 25, 2007 5:39 pm
Hi guys
To some of you I already talked about it: WorldEntity is growing big and to me it's not really logical.
There are several classes inheriting from WorldEntity, which need not more than one function/method of WorldEntity and besides have nothing to do with that class.
Then there is the huge amount of variables and methods in WorldEntity which are not used by most of the inheriting classes.
Example: Every WorldEntity has several widgets for it's stats. Widgets are GUI elements used by the HUD. While it makes perfectly sense, that a playable has those widgets or a NPC, I don't really see, why particles need to care about their gui-elements which are never used anyway. Also the skybox: It should never be killed in the first place, right? Even the value "Health" may not be used by all the WorldEntities out there.
I'd like to discuss with you what a WorldEntity is and what it should contain. Redefine WorldEntity in some kind that this mother-class makes more sense again.
After that, I'll create a ticket or I'll strip the WorldEntity off its unusable parts myself.
I think this is necessary, not only because of huge overhead an instance of WorldEntity creates, but also for reasons of readability of our code.
Same problem has the Spaceship class
To some of you I already talked about it: WorldEntity is growing big and to me it's not really logical.
There are several classes inheriting from WorldEntity, which need not more than one function/method of WorldEntity and besides have nothing to do with that class.
Then there is the huge amount of variables and methods in WorldEntity which are not used by most of the inheriting classes.
Example: Every WorldEntity has several widgets for it's stats. Widgets are GUI elements used by the HUD. While it makes perfectly sense, that a playable has those widgets or a NPC, I don't really see, why particles need to care about their gui-elements which are never used anyway. Also the skybox: It should never be killed in the first place, right? Even the value "Health" may not be used by all the WorldEntities out there.
I'd like to discuss with you what a WorldEntity is and what it should contain. Redefine WorldEntity in some kind that this mother-class makes more sense again.
After that, I'll create a ticket or I'll strip the WorldEntity off its unusable parts myself.
I think this is necessary, not only because of huge overhead an instance of WorldEntity creates, but also for reasons of readability of our code.
Same problem has the Spaceship class