Tuesday, June 27, 2006

Day 165 : I won't be meeting the deadline

As my vacations dwindle away it seems obvious the milestone I had set for myself, to have a complete 1 level working prototype by the end of the month, will not be met. To establish a quick post-mortem. Vacations always bring up unexpected events. My parents visited, take away 2 days. I cleaned up my apartment (a bit) take away 2 other days. Those are outside factors.

The single inside factor was the implementation of resource management inside the game. Up to now I had simply avoided resource management. I used the good old-fashioned "load when needed" that's built into Ogre. It meant tons of pauses with every first appearance of a bad guy. Not big deal I thought. Implementing resource management will be a breeze. It wasn't. I have to say, as much as I love Ogre, that it's resource manager is somewhat of an Achilles heel. Mainly because it has a tendency to crash inside without throwing an exception. If I could make two recommendations to the people out these using Ogre, it would be these:

- Start early. Don't do like me and wait until you have many groups containing many resources and world geometries all auto-loading and go "let's do a nice and proper progress bar in front of all of that". It's easier to implement if you have few resources and groups, and build from there.

- Ogre.log is your best friend. I had forgotten all about this one. I had so little problems with Ogre that I never really got to use it that much recently. When Ogre crashed repeatedly inside the resource manager, I didn't know where to look for answers. The debugger wasn't of much help, and (as it is often the case) when I tried smaller levels with fewer resources the crash never happened. Well, when I finally remembered that good ole file, I could pinpoint the crash times a lot quicker.

I'd like to point out that all the crashes within Ogre were created by my misuse of the resource manager (declaring resources that didn't have a path leading to it, and such and such) but it's true that I faced a lot of exceptionless crashes (mainly the dreaded "iterator cannot be dereferenced") that led to a lot of frustration.

I like to think that this is all behind me, but as with everything else. Time will tell. Tomorrow I will test everything out. Friday, Saturday and Sunday I plan on actually be on vacation from all of that. Maybe do a little Silent Hill 4 marathon. I still have reached two important milestones during these vacations : integration of the different level segments and integration of proper resource management. Not too bad.

No comments: