UI experiments, and other stuff

So today I’ve been trying a couple of different ideas.  First, I spent some time optimising the “painted terrain” calculations, and basically cut their cost in half.  The best bit about this optimisation was that it’s actually a pair of optimisations inside the VectorStorm library;  one is purely internal (and so will automatically benefit any game which uses dynamic models), and the other exposes a new API which allows dynamic models to specify changing vertex data in a more efficient manner.  If I was to go back and recompile Lord (which I have no desire to do), it’d run substantially faster now.

The other thing I’ve been playing with has been trying to figure out how to make a nice editing interface;  particularly, a way to adjust how large an area you’re going to modify.  That part was actually really easy;  I’ve got it wired up so that the player can use his mouse wheel to increase and decrease the size of the brush.  The hard part is letting the user see how big that brush is.

I’ve tried a couple of options, and haven’t really found one that I like, yet.  I’ve tried little projected circles (which clip into the terrain terribly), and I’ve tried a scaling translucent sphere (pictured here), but none of them really give you a sense of precisely which vertices you’d be affecting;  it’s just really imprecise, and it can be difficult to tell what the sphere is touching, and what it’s merely sitting in front of.

Maybe I shouldn’t be thinking about it as showing a sphere or circle, but instead be using a more traditional 3D program approach, and actually hiliting the specific vertices that would be adjusted, as you move your cursor around.  That might be better, maybe..  though it can be a lot of vertices;  at the current maximum brush size (a sphere 200 meters in diameter), it’d be nearly 2,000 vertices  being moved around at once.  I might try that next, though.  See just how bad the performance really is.