Object Pool Management

I'm always looking for performances (too much I guess) and everybody knows that a malloc/free is expensive. That's why I was using a Object (can be Unit, Towers, Ammos....) array as a fixed memory and a vector of Object pointer as a list pointing to some of the array objects. The only problem was about the constructor. I didn't find a way to call it without "new"

That's why I took a look at the boost library. In the first hand, they have a constructor template to call the constructor. This is the first cool thing! The other one is the object_pool (from the boost::pool) which does exactly what I was doing before (Except it uses the constructor). There is no big improvement in the game but it is now a bit more clean.

For the fun I tried to fill the map with towers. It was the Debug mode (even worth, I was debugging it), and my cpu was in low mode (in FullScreen). It's still running at 60fps all the time (don't look at the screen fps, the screen print really slows down the fps during the screen shot). I'm happy for that.

During those days I've read a lot about metaprogramming, which is really interesting. Specially because it can be done in C++ directly in the code with the boost::mpl library.

The game makes me learn some cool new features of the next C++ (and also the current TR1 and...)
I really advice any new programmer to read tutorials about boost to start a new project.

Multiplayer : lot of towers