I am also exploring the idea of a component-based software architecture for the code, as described by this article on GameArchitect.net. It's quite an interesting read.
So far, my design consists of three separate worlds: rendering, physics, and game. Each object in the game can then have components in each of these worlds. For instance, a static floor would have:
- a rendering component that draws the box representing the floor volume, and
- a physics component that adds a solid, static body to the world in the space the floor occupies.
So what's the point? Read the GameArchitect.net article for more information.
This is just a rough idea. I do not know if it will work or whether it is a better structure. This is an experiment after all. It will most probably change significantly by the time I am done though!
Check back in a day or so. I should have a video to show soon!
Browse the code so far: http://code.google.com/p/glutinous/source/browse/#svn/trunk/carpac/src