Skip to main content
gamedev.net
🔒 Locked

Entity class, scripting, etc...

Started by no one Sep 3, 2003 at 12:57 PM 1 replies 350+ views
Original Post
no one
no one
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.
"Make it a habit to be loyal to the activities that serve the highest part of yourself."
duke
duke
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
super genius
no one
no one
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.
"Make it a habit to be loyal to the activities that serve the highest part of yourself."

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.