Archived

This topic is now archived and is closed to further replies.

no one

Entity class, scripting, etc...

Recommended Posts

no one    133
Hiya Man, I pressed one wrong key and my post was gone! (ERRRR) so this is the second try Ok, well, a few quick questions. 1) Instead of adding vars for physics to each derived class of the entity class, would it be better to add all vars to the entity class and then only use the variables you need in each derived class? (*I want to use lua for level loading and for ai scripting, so I think it would be easier to have the same list of properties for all objects). 2) With physics and rendering alike... In the derived class functions (draw and update)... you could just simply do like so... vehicle::Draw() { RenderEngine render; Render.SetDispProps(blendstyle, uselighting, etc) // where as blend style and use lighting etc are // member of the CEntity class which are derived for // the rendering class. } Ok, well gotta go. Thanks a lot for any feedback.

Share this post


Link to post
Share on other sites
duke    107
1) Depends on your definition of better. If you don''t care about memory usage at all, and I mean at all, then I suppose it is better to do it that way.

2) I don''t understand your #2 at all, is it a question? or a tip? either way it seems like it isn''t the best method, unless a RenderEngine is just handle that calls off to some singleton or something "under the hood".


Jeff

Share this post


Link to post
Share on other sites
no one    133
Well Thats the thing,
I can''t figure out another way to do interface
scripting and such unless I do it that way. Hmmm...
Basicly question 2 was a follow up of question 1.
I would have explained better but I had to hurry up
and leave.

I had gotten the idea from ut2k3. It appears thats how
they did it (and memory...10-30 meg levels which meens
100 meg in ram or more!).

Does anyway one know of a good article that goes over
designing an entity class in cpp? Thats sounds a bit
general, but something like that.

Share this post


Link to post
Share on other sites