Geeks With Blogs
Code.Blog Code Talk for the Game Developer

I worked on the DirectX demo last night in hopes of implementing the inheritance model I've been working on.  I had it rendering but the problem is trying to seperate the render methods out of the SceneManager and ModelManager and only allowing them in the GraphicsCore.  How is that a problem?  Well considering my ModelManager stores the model data, I'd have to create some kind of method to retrieve the model data from the ModelManager as well as the number of instances in SceneManager.  Now, this isn't the problem I'm having currently (though it is a fore-seeable problem), my latest problem is accessing the PlayerFactory.

The PlayerFactory is the manager responsible for creating and storing instances of a player (which, for as far as I can see will always only be one, but why restrict it?).  So here's the layout, GraphicsCore points to SceneManager which points to the PlayerFactory and the ModelManager.  To add a character though I have to point to the SceneManager and then point to that PlayerFactory.  Currently it is setup incorrectly and passes by value and in turn puts a player in the list and then never access the list again (since it's destroyed), and when it tries to access the real list throws an out of bounds because technically nothing has been added.  Here's a rough UML of it:


Posted on Tuesday, June 17, 2008 10:33 AM | Back to top

Comments on this post: Last Night

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Matthew Christian | Powered by: