Wednesday, May 20, 2009

DirectQ 1.6 - Even More Updates

We march on!

The "dying throes" interpolation bug has been FIXED FIXED FIXED! Especially happy to have gotten this, as it's been present in every engine I've ever done, right back to the start. I don't know what other people are doing, as nobody else seems to have ever acknowledged this as a bug - must be something weird, wild or wacky about the way I'm coding it. Anyway, did I say that it's FIXED?

The solution I used was to reset ent->pose1 and ent->pose2 both to 0 if an entity wasn't updated last frame, then check for this when drawing and reset the interpolation cycle if it's happened (but don't do it on viewmodels).

I've been visiting interpolation code quite a lot recently, and will probably do so again before I release. It's gone back to the CPU now (was run in a shader), and an aborted attempt at spline interpolation was made. In the end I decided that the data mangling required to get it was just not worth the effort, and that standard Q1 linear interpolation is just fine, thank you. Then again, we all though no interplation at all was "just fine, thank you" back in 1996, and look where that stands today.

A "Maps" menu! Finally added it in, pleased at that too. The aborted GL engine from last year used a bubble sort to sort map names; this one uses STL sorting so it's more friendly to people who like to have several thousand maps (it's almost 20 years since I last wrote a sort routine myself - don't expect me to bash out a QuickSort...!) Some brain-dead code in there from the evolution of the menu, but it's not that big a deal right now.

While doing this it's become obvious that my menu listbox code needs some pretty radical overhauling. It's not going to happen for this release, but I'll be bearing it in mind for some time in the future.

I've also taken the opportunity to restore some code from my notorious (to me, at least) "lost version". This happened somewhere around 1.2 or 1.3, where I had made a batch of really good updates, then switched to a different PC for a while and forgot to bring the updated code across. These updates had never been in any subseqent version until now.

Overall, 1.6 is shaping up to be the best release yet. I was very fond of the first two releases, there was something really nice and primitve/ramshackle about them, but this one just feels really really solid and together, far in excess of any prior version. It must be all of the ID1 map testing I did for the MHColour utility, and it seems as though it's definitely worth doing a full run through ID1 for each release.

Still on Visual C++ 2008 Express. Intellisense bugs are rearing their heads quite regularly now, but at least MS have acknowledged that intellisense is badly broken in this version, and are doing something about it for the 2010 versions (moving it to SQL Server Compact, from what I read). I'm planning on staying with 2008 for now, as the engine is stable (some of the multithread stuff I did for Direct3D also resolved the MT CRT issues I had previously), and I want to be able to work on a free (as in beer) platform.

0 comments: