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


Pro and Con : Game Engine design data manipulation

Recommended Posts

Hello, I just wanted to start a discussion concerning game engine design. Of course every engine will have a specification that relates to the game itself, but we all seem to try our best to make it as generic as possible. One part is the relationship between game data (models, textures, etc ) and the DirectGraphics wrapper (wrapper referring to the class that for the most part handles the calling and use of DirectGraphics). This is what I would like to discuss first. For me, back in the software rendering engine days, up until DX7 and VertexBuffers, I used to have the models themselves contain their data. This of course is bad in that models that have the same data could not re-use the data. So later, if several models had the same data, I would still have one model contain the data, and the others would get a pointer to the same resource. The problem now is that since using VertexBuffers seems to be the way to go, having the game entities themselves hold the model data (now in the form of a VB) may not be so wise. All, or most, of the Dgraphics functionality is contained in our wrapper. When we loose, or create resources, it would seem wise for them to be as close to the wrapper as possible. Right now I am trying a different method. The wrapper part has VB and texture managers that handle the loading and manipulation of the data. Entities that use this data are given IDfs of the data they need. When the Entity is told to draw, it gives its ID to the wrapper, and it does its thing. The only problem I can see here is the time it now takes for the wrapper''s resource manager to find the resource and set it, if it was not the same from the last call. The implementation of the resource handling is not the issue here since it is contained it its own class and can be optimized later. How is everyone else basically handling their data? Do you see any Profs or Confs on this method or something you are using? Just trying to start up a little work-time chat. Take care!

Share this post

Link to post
Share on other sites