Sunday, December 7, 2008

Moving to Direct 3D - Part 2

The world render (currently textures only) is now done. :)



Matrixes were a bee-hatch. The problem is, and I find this with OpenGL too, a lot of the samples and tutorials out there focus on the most simplistic ways of doing things, whereas in practical real-word scenarios things are actually very different. An example that gives single axis rotation, for instance, is of no use whatsoever when you're working on a game engine. The way Direct 3D matrixes work make this even worse, it's not just useless, it's dangerous too. There are other factors too; I realised quickly enough that you don't actually need a view transformation, but it would have been nice if the documentation had actually said that.

The next steps are to finish off the basic world render (adding lightmaps and sky), then add in alias models. That will get things to a stage where there's really just polishing off to do; some simple things (particles, sprites, some 2D stuff) that I haven't done yet, and a bit of final polishing off. I also want to move the static geometry to a Vertex Buffer, the API is just so much nicer than OpenGL here, so there seems no real reason not to.

I think I'm going to release this engine. It started out as a proof of concept (was it really only yesterday?) but it's becoming a viable port. It's just a straight port of stock GLQuake to C++ and Direct 3D, no real flashy added features or anything, but as basic as it is, I'm feeling somewhat fond of it.

0 comments: