Who would be a PC programmer? Sometimes I really envy those console programmers with their fixed hardware setups - although I don’t envy them their paltry memory restrictions of course (even next-gen memory specs are rather chucklesome ;).
Today’s issue was that a while back (a long while) I changed the BSPSceneManager to use a fixed set of hardware buffers and 32-bit indexes, to take better advantage of modern cards. It works great, but some people with cards like the GeForce4MX (step outside now please, you’re not welcome here 😉 had issues because their cards didn’t properly support 32-bit indexes. I basically shrugged this off as ‘hard cheese’ - since Q3A was still under strict licensing conditions, people couldn’t use the levels for commercial work anyway so it was always going to be something to play with, rather than anything serious.
Anyway, now that nice Mr Carmack has released the Q3A code under GPL, crucially including the tools code, I thought I’d spend an hour or two making a backport for older cards in case anyone wants to start taking it forward. Well, it works but hot damn, it’s 3 times slower. It seems that treating hardware buffers like the software buffers of old really doesn’t work well at all - I think even pure software buffers were faster than this. I had a few ideas - like batching up groups of leaves into chunks which fitted in 16-bit indexing limits and being smart about which ones I had to re-upload etc, but in the end I have better things to be doing. I’ve shelved the diff for the moment, I may come back to it, I may not.
The sad fact is the .bsp format is horrendously outdated and just not suitable for modern hardware without significant changes (the data is just too fragmented, made up of tiny clusters of geometry which don’t make ‘batch friendly’ GPUs very happy). To make the kinds of changes I think are necessary to make it most useful in the noughties crosses over heavily into areas I’m already working on (or trying to, anyway) for my private project, so I just can’t jusify the time to do it. Perhaps someone else will take over the maintenance of BspSceneManager if they really want to use the Q3A level compilation tools, but I’m moving on.
I’ve finished the commercial work I was doing for a US customer last week, so from this week I’m getting back into my private project again. I still have hopes that I can have something ready by the end of the year, although there are some significant pieces of work to get through. I’m going to refer to this project by the codename Kadath in future on this blog - the reasoning being that it represents both a dream and a nightmare for me. The dream is that I get it done and it works as I hope it will, the nightmare is how much work it will take to get there and the possibility of abject, crushing failure. 😀Anyhow, Phase 1 appears to be working well, once I’ve done a little more testing I’m going to move onto .. wait for it .. Phase 2. Phase 3 scares the willies out of me and requires that I go ‘back to school’ to brush up on my multivariable calculus. I’m expecting to hit quicksand right about then, so we’ll see how my self-imposed deadlines stack up 😉