Progress on Lighting

Wanted to post a quick update.  Work stuff is extremely busy for the next week, possibly the next two weeks, but I’m still getting little bits and pieces done here and there.  I mentioned earlier that I’m working on putting 3D lighting support into VectorStorm, but it’s taking a little longer than I’d hoped.

Here’s the current status.  In order to get proper 3D lighting support, it requires replacing the old rudimentary “color” rendering system with a basic material system.  However, one of the VectorStorm goals is to remain extremely easy to use and to retain backwards compatibility, so the old ‘SetColor’ commands will still be available;  they’ll just internally use the new Material system.

In order to do all this, I’ve been drastically simplifying the rendering code;  moving the code’s smarts from the renderer into the display list class.  I’ve now got it to the stage where most API features are working again, with the simpler code structure.  The only things still broken now are vsOverlays (simple gradients;  I often use these for skies) and vsShaders (modify static display lists;  the “strobing green wireframe” effect seen in the intro for MMORPG Tycoon was achieved using a vsShader, for example).  I’ll get to vsShaders soon.  vsOverlays.. I’m not sure.  But I’ll probably make them work too, sometime soon.

It’s likely that the old-style of rendering, while it still works, might become slightly slower, as it’s not being as intelligently optimised by the internal systems any more.  If that’s an issue, code using the old line-drawing code can be migrated to the new drawing primitives, which allow you to specify an arbitrary number of lines in a single call, instead of multiple MoveTo/LineTo calls.

Anyhow, once vsShaders are working again and the material system is in place, I’ll start looking at generating some proper terrains for MMORPG Tycoon 2.0, and see what I can do with that…  wish me luck!