The high was getting a copy of Eyetoy Play: Hero turn up which was the first game I worked on here at Zoe Mode and my first professionally published game, huzzah!
The low was discovering yet more evil in our graphics/game engine. Not to put to finer point on it I've been moaning about it being crap from day one, which is probably why we are the last game (afaik) to use it.
Anyway deep in the engine I discovered some code in a base class for the materials which;
- in the constructor checked to see if the class was being new'd
- if so it was registering it with a list of materials
- in the destructor it was checking again to see if it was in the list and if so unregistering it
Ok, so far so good, the problem is at the end of a level we need to flush the scene away in order to swap to the next one except if we do that all of the materials for the front end go byebye as well. Well, the materials kind of stay in once piece, because when the sweep is done the deconstructor for the base material class is run, which as it turns out nukes a couple of entries in the vtable for the class so now you are left with pointers to things with half their vtable missing which ofcourse results in a crash.
In the end I disabled it with a view to check that we don't leak resources when I get a spare moment.
The other evil I discovered the other day was again related to our pos engine; shaders when loaded are also registered in a list and also flushed on end of level which, again, knackers the front end stuff. In the end I got around this problem by recreating the loading code game side and folding a reference counted system over it so instead of multiple instance of a shader being loaded (current system!!) it only loads once and counts the users.
All of this begs the question; which code monkey decided that this was a good solution and who the hell doesn't write a reference counted resource system in this day and age?
I shouldn't be having to deal with this tbh, and I swear if this happens in the new engine I will kill someone.
(quiting it also an option because as much as I like working here I'm only prepared to deal with so much evil in my code base. Maybe I should have interviewed for that R&D position after all... of course, that would have also left the current project knackered..)