Originally posted by penguin
This was before all the "blinking lights" stuff started to surface, though... any ideas how to implement that?
Blinking lights are so inherently flexible that controlling them could easily become insanely complex. We should accept that it's not practical to create an interface that will let you pull off Las Vegas-style displays.
So here's a random proposal... just thinking into the keyboard here...
Instead of specifying light data in the POF, just give each light a bank number. Then, in the tables for the ship, have something like:
$Lights:
+Bank: 1
+Start Time: 0
+Time On: 10
+Time Off: 100
+Bitmap: glowred01
$Lights:
+Bank: 2
+Start Time: 2
+Time On: 10
+Time Off: 100
+Bitmap: glowblue01
This would have several advantages. It would simplify the POF structure, it would make it trivial for designers to tweak the lights on a ship, and it would reduce memory requirements. Also, randomly flashing lights in the same bank would flash together, creating the appearance of all the lights being on the same circuit.
That's the simple version. Now for a slightly more complicated/flexible version:
$Lights:
+Bank: 1
+Start Time: 0
+Delay: 50
+Delay: 100
+Bitmap: glowred01
+Bitmap: glowgreen01
+Bitmap: glowblue01
In this arrangement, you can put as many Delays and Bitmaps in each bank of lights as you want (well okay, limit it to 32 or something). The code would cycle through the delays and bitmaps sequentially. Thus the entry above would generate a light like this:
red for 50ms
green for 100ms
blue for 50ms
red for 100ms
etc..
You could have a single bitmap blink out a morse code message, or a dozen colors at a fixed rate. Flexible enough?