Feb 08

Bits and pieces

Tag: Full Games,MMORPG Tycoontrevor @ 9:46 pm

It’s kind of neat, when you realise that your systems are generic enough that you don’t actually have to write much code to get interesting effects.

Previously, the “selected building” effect I was using was just to draw a simple wireframe box around it.  But there were bugs which caused the box not to z-buffer correctly (that is, the box showed through the building).  But I realised that with my procedural geometry, I’d already built all the tools I needed to draw glowing lines around the procedural shapes themselves;  I’d written it for drawing region outlines that I was showing off months back.

Really, this probably also wants to have lines along the sharp corners, but that’s a little harder to work out;  my procedural geometry is being worked out on a per-vertex basis, not a per-edge basis.  Maybe I ought to switch to per-edge.  That’d also let me cast shadows from these objects, which would be pretty cool.

But I’m not doing that until milestone 2!  :)