Monday, April 19, 2010

Templates, Singletons and Factories oh my!

So after I put the finishing touches on basic camera movement today Andy and I were going over how we wanted to have the objects get the appropriate rendernodes from his scene manager. Initially I did not plan on writing my factory for PoC but rather FF1, but it would be alot easier for me to just tackle the Factory now and having that interface with the scene manager which then tells his node factory.

I did a few hours of research and found out that google thinks that I am looking for an industrial park or wanting to recycle factory equipment (I want our factory to behave like the one we did in AI where it would put the memory that was allocated for an object that is no longer in use back into the pool for recycling memory purposes, cutting down on new calls == win.)

I stumbled on one source code example that did perhaps the craziest macro I had seen to date, which can be found HERE. Yeah, its madness, but luckily I was able to use pieces of it for what I had intended.

Currently I'm trying to decide whether or not to use multiple vectors or a map to store the objects to be created now...

No comments:

Post a Comment