Feature creep

Sep 24, 2008@5:04pm

Whew, nothing like getting your code working well and then realizing that adding a new feature to it requires large amounts of refactoring to keep the code readable. I’ve started adding material support to Tsunami, but trying to work it into the mesh creation code was proving extremely difficult. Up until now I had been creating the mesh directly as I parsed the file, but adding materials gummed the works up to the point that I realized I had to throw the existing file parser away. Even if I managed to get it work, the whole thing would be so ugly that nobody else would be able to work with it at all, and I wouldn’t have wanted to.

So, I split the mesh file parsing and mesh construction/rendering code into two separate classes. It’s much, much easier to understand what is going on across the board now, much more robust, and it should also make porting the engine to other platforms (Direct3D, XNA) much simpler later on.

So far the output script for Blender has been modified to export mesh data and the file parsing code to get it into memory on the engine side of things have been completed. Those are the hard bits, too, so actually getting the data out of the parser and into the video card should be a snap.

I need to put some more art up too. The gallery just feels so neglected at the moment.

Filed under: Games - Comments (0)

Leave a Reply

Your email address will not be published. Required fields are marked *