Wednesday, March 31, 2010

Fun with Various Things

With Release 1.8.2 looking to be quite stable and solid, it's time to start having fun. This is where I dive into some of the more technical internals of the code and work on stuff that isn't a dramatic bugfix or an immediately obvious improvement.

First up is a slight improvement on the timer. ID Quake has serious timer problems on some modern PCs, so DirectQ has used an alternative timing mechanism for the past while (I actually did it for a completely different reason, so that fix was a consequence). However, DirectQ will experience timing problems if your OS has been running for more than 49-odd days. I've reworked this so that now it's the case that you might have problems if DirectQ itself has been running for more than 49-odd days. I've also added code for to handle even that, but obviously I'm not going to test it (and even if I did, you would have to wait almost 2 months for the result).

(Update: no can do on that last point. I need to subtract one number from another and store the result in a 32 bit unsigned int, so there's only so high you can go. What are you doing running DirectQ continuously for 49+ days anyway?)

I've also been experimenting a little with DirectDraw. I've long wanted to do a native DirectDraw version of WinQuake, so I grabbed some online tutorials and wrote a small test application that just fills a window with random data. DirectDraw in a window is SLOW. I mean 6 fps slow. I did manage to optimize this so that it got to 13 fps, but still not usable.

Of course the way Quake needs to use DirectDraw is hardly optimal; a real DirectDraw app would work quite differently. So the experiment was a failure but interesting nonetheless.

More news as it happens.

0 comments: