Page 1 of 1

A flashing light on the road to Damascus [SOLVED]

Posted: Tue Feb 05, 2008 2:01 pm
by chuck_starchaser
I think I just got an idea inspired by the muses...

Flashing lights on stations (and large ships) could immensely benefit from a small parameter addition or two.

Well, to get lights that flash, there's typically two ways, right? One is to use two glow textures with an spr that alternates them; but this is rather inefficient in the use of the texture. The other is to have a separate mesh for a light, and have two glow textures for it, but these are small textures, so, less waste. The only problem remaining is that the lights would still all flash synchronously.

But with an extra parameter in spr files, or in .py file functions that call for spr's, could solve this probem: An optional boolean to indicate whether the starting time in the spr frequency should be randomized.

And yet another parameter could also add a random variation to the speed of spr sequencing.

Posted: Wed Feb 06, 2008 1:34 am
by ace123
That parameter is already here. I added it recently to help randomize the splash screens.

Good idea to put it on the blinkenlights... I never thought of that.

Actually, there's a chance it will be shared among all of the instances. So this might not work. But it's worth a try.

Specify the "startRandom" flag in the .ani files.
For an example, vegastrike's data4.x/animations/load_screen.ani/load_screen.ani has:

Code: Select all

.3 .3
5 20.0 startRandom
Jackal.png
FraternalWar.png
Shapers.png
Jackal.png
FraternalWar.png
The flags go after the number of frames and the time per frame.

I believe this same flags line occurs in animated .spr's as well, as long as you put it on the same line with the number of frames.

Posted: Wed Feb 06, 2008 1:43 am
by ace123
Unfortunately Speed changing is not possible, but with some copying and pasting blanks and duplicate items you can simulate this.

The reason it is hard to do is because it multiplies the number of frames by the time per frame.

Posted: Wed Feb 06, 2008 5:26 am
by chuck_starchaser
Ah, the speed is not important. I can just use all different but fixed speeds. Random starts are all that really matters. This is great! Thanks!