VectorStorm is already a somewhat idealised version of vector graphics. That is, it’s taking the principles behind real-world classic vector graphics hardware, and is pushing a little beyond what ever actually existed.
For example, VectorStorm supports hardware-accelerated transformations. It allows blending between two different colors along the length of a vector. And it supports rendering ‘points’, which are not lines at all. No real vector graphics system (at least, that I’m aware of) has actually supported these features.
So I’m thinking about going further with it, based on the things I wanted to be able to do in Damsel, but couldn’t. And first among these is the ability to lay down solid areas of color, rather than solely lines. This would have helped distinguish between grass and road, without the need to draw huge outlines, which are functional but not particularly attractive.
In order to lay down areas of color, I’ll need to add a way to draw filled triangles. (Do I want to make them opaque triangles, like in normal 3D games, or should I stick with additive, as in traditional vector graphics? Opaque lets you use a lot more techniques, such as layering.. and you’d be able to easily do things like have asteroids block the stars in the background, by filling it with black triangles.. but additive is more accurate to the methods used to actually draw on a vector-style screen. Will need to consider this)
To implement triangle rendering, I’ll need to take a few steps.
- Need to extend fsFile to be able to cope with multiple-line commands, instead of requiring each command to fit onto a single line.
- Using these multi-line commands, extend the vsDisplayList to also accept vertex arrays and then implement indexed vector rendering commands referencing those vertex arrays (“MoveToIndex”, “LineToIndex”, etc.)
- Update fsFile to be able to cope with variable-length commands, instead of requiring a fixed number of arguments for each command.
- Use the variable length commands to add a new vsDisplayList command: “LineStrip i1 i2 i3 i4…”. This will let me remove a lot of optimisations from the vsDisplayList rendering of ‘MoveTo’ and ‘LineTo’ functions, by defining explicit strips directly in the data files.
- With all of the above working and in place, add triangle rendering commands referencing the same vertex arrays (“Triangle i1 i2 i3”, “TriangleStrip i1 i2 i3 i4…”, “TriangleFan i1 i2 i3 i4…”, etc)
So I’ll be poking with this stuff for the next couple of days. I’m hoping to have it all working by sometime early next week, though I only have limited time to work on it. Guess we’ll see how I go! :)