Jump to content



Photo
- - - - -

Possible New Flasher and BulbBlink commands


  • Please log in to reply
3 replies to this topic

#1 DDH69

DDH69

    Pinball Wizard

  • Platinum Supporter
  • 3,617 posts
  • Location:DOFLinx HQ, Adelaide

  • Flag: Australia

  • Favorite Pinball: Monster Bash

Posted 30 November 2016 - 10:23 AM

Thought I'd break this out as a separate thread given we could need a bit of back and forth as we consider this.

 

Hmmm, that is a bit tricky since I don't know how the status of the flashers is retained by DOFLinx....

 

As an example of my other project.... I wanted to do a repulsor blast effect.    So I wanted to have the flashers slowly fade up "white" to about 75%, then blast to MAX 100% quickly, and then fade down to 0 at a different rate. The Fade Down is the tricky part, as I can't "start" a flasher command at a level other than 0,"off".

 

Maybe have a "single" FADE command.....

 

Flasher Start / End Fade:

 

FF_Flasher DV_FLxx,SE_FD,"time","start","end","Colour"   

 

-this would do only a FADE UP, or a FADE DOWN of the flasher

-the "start" and "end" values are brightness levels, and determine whether its a Fade Up or Fade Down command.

-if "start" is a higher value than "end", then it Fades Down.

-if "start" is a lower value than "end", then it Fades Up.

-choosing "-1" for "start" would use the "current" or "active" brightness level of a flasher while in operation, and then either Fade Up or Down, depending on what value "end" is.

-"Colour" could have an option of "-1" or "Current" that would allow the command to use whatever "Colour" is "current" or "active" while in operation.

 

That would cover all options right there..... took me a while to sort that out in my head.

 

BulbBlink / BlinkPattern:

 

Since we are talking about feature requests.... one other option that could save A LOT of work would be a "BlinkPattern" type of option for the standard flash or fade commands.

 

A flasher in Future Pinball can be set to either ON, OFF, or BulbBlink. If it's BulbBlink, then the flasher will flash on or off based on a pattern of 1's and 0's, like below:

 

Light5.Set BulbBlink, "101000011111111110", 125

 

Every 125ms, Light5 will flash on for every "1" and flash off for every "0"...and then repeat this sequence until another ON or OFF command is given. FP supports a maximum of 32 states.

 

 

So for DOFLinx, you have the standard FF_Flasher command like below:

 

FF_Flasher DV_FLxx,FL_FL,"intervals","time","brightness","Colour"

 

DofLinx real example would be like:

 

FF_Flasher DV_FLOL,FL_FL,2,125,100,"White"

 

To support "BulbBlink" and "BlinkPattern" type of function, the new DOFLinx command could be like this:

 

FF_Flasher DV_FLxx,FL_FL,"BulbBlink","time","brightness","Colour","sequence"

 

real DOFLinx BulbBlink example:

 

FF_Flasher DV_FLOL,FL_FL,BulbBlink,125,100,"White","101000011111111110"

 

This would result in the flasher changing its flash / fade state (to match the 1's and 0's) every 125 ms at 100% brightness, with the colour White. When it reaches the end of the "sequence", it repeats until another FF_Flasher command is given.

 

 

This one command would make matching light sequences on a table sooooo much easier. Just like the FF_FlasherForMs command you created.

 

Man, this went on for longer than I thought it would....good thing I'm off for a few days!   :)

 
As an overall caveat, anything new added needs to be compatible with existing syntax.  In other words doing something like changing the order of parameters for FF_Flasher would be bad.  I know you're not suggesting this, but waned to call it out early.
 
So, firstly the BulbBlink.  How about if we consider a new command something like;
 
FF_BulbBlink HHHHHH,"Colour","0011001101010"
 
Questions;
1) Would a percentage brightness be required?  No problem if it is, just wasn't sure and wasn't sure if you included it just to try and maintain the same format as FF_Flasher.
2) How long does the pattern need to be?  The exiting structure could support a maximum pattern of 20.  Any idea how long the string can be in FP? (is this what you mean by 32 states)
3) How critical is maintaining alignment with FP?  I'm concerned that different program timing might have the pattern "creep" and get out of alignment.
4) HHHHHH times are in hundredths of seconds, so precision like 125mS would not be possible without a new structure for milliseconds. (sort of related to #3 above.
 
How might this happen?
- A new command added to DOFLinx.vbs
- Use a new message type within the existing structure
 
 
Now, secondly, fading.
 
From a message perspective this could be done within the FF_Flasher command via a new action type as you suggest,  A couple of small differences and clarifications about wants vs needs.  So something like;
 
FF_Flasher FF_DVxx, SE_FD,SSS,EEE,HHHHHH,"Colour"
FF_Flasher FF_DVCN,SE_FD,100,0,500,"Red" - centre flasher, red, fade from 100% to 0% over 5 seconds
 
Questions;
1) Are percentage start / end points really required, or is fading down once the real need?
2) If the flasher is not on when this commands processes should it just fail?
 
How might this happen;
- Exiting FF_Flasher message and structure
- Using the existing colour would be an empty string "" not -1
 
Remember, just because its been thought of we don't need to get "locked in" and create it if through further discussion it turns out to not be such a good idea.
 
I'm sure there is more, just throwing it around for now.
 

 

Hmmm, that is a bit tricky since I don't know how the status of the flashers is retained by DOFLinx....

 

As an example of my other project.... I wanted to do a repulsor blast effect.    So I wanted to have the flashers slowly fade up "white" to about 75%, then blast to MAX 100% quickly, and then fade down to 0 at a different rate. The Fade Down is the tricky part, as I can't "start" a flasher command at a level other than 0,"off".

 

Maybe have a "single" FADE command.....

 

Flasher Start / End Fade:

 

FF_Flasher DV_FLxx,SE_FD,"time","start","end","Colour"   

 

-this would do only a FADE UP, or a FADE DOWN of the flasher

-the "start" and "end" values are brightness levels, and determine whether its a Fade Up or Fade Down command.

-if "start" is a higher value than "end", then it Fades Down.

-if "start" is a lower value than "end", then it Fades Up.

-choosing "-1" for "start" would use the "current" or "active" brightness level of a flasher while in operation, and then either Fade Up or Down, depending on what value "end" is.

-"Colour" could have an option of "-1" or "Current" that would allow the command to use whatever "Colour" is "current" or "active" while in operation.

 

That would cover all options right there..... took me a while to sort that out in my head.

 

BulbBlink / BlinkPattern:

 

Since we are talking about feature requests.... one other option that could save A LOT of work would be a "BlinkPattern" type of option for the standard flash or fade commands.

 

A flasher in Future Pinball can be set to either ON, OFF, or BulbBlink. If it's BulbBlink, then the flasher will flash on or off based on a pattern of 1's and 0's, like below:

 

Light5.Set BulbBlink, "101000011111111110", 125

 

Every 125ms, Light5 will flash on for every "1" and flash off for every "0"...and then repeat this sequence until another ON or OFF command is given. FP supports a maximum of 32 states.

 

 

So for DOFLinx, you have the standard FF_Flasher command like below:

 

FF_Flasher DV_FLxx,FL_FL,"intervals","time","brightness","Colour"

 

DofLinx real example would be like:

 

FF_Flasher DV_FLOL,FL_FL,2,125,100,"White"

 

To support "BulbBlink" and "BlinkPattern" type of function, the new DOFLinx command could be like this:

 

FF_Flasher DV_FLxx,FL_FL,"BulbBlink","time","brightness","Colour","sequence"

 

real DOFLinx BulbBlink example:

 

FF_Flasher DV_FLOL,FL_FL,BulbBlink,125,100,"White","101000011111111110"

 

This would result in the flasher changing its flash / fade state (to match the 1's and 0's) every 125 ms at 100% brightness, with the colour White. When it reaches the end of the "sequence", it repeats until another FF_Flasher command is given.

 

 

This one command would make matching light sequences on a table sooooo much easier. Just like the FF_FlasherForMs command you created.

 

Man, this went on for longer than I thought it would....good thing I'm off for a few days!   :)

 

DOFLinx
Contributions for equipment to help with ongoing DOFLinx development can be made here

#2 TerryRed

TerryRed

    Pinball Wizard

  • Silver Supporter
  • 2,002 posts

  • Flag: Canada

  • Favorite Pinball: Too many to choose...

Contributor

Posted 30 November 2016 - 06:23 PM

I definetly don't want to break existing syntax...that would be bad   :(    So I was trying to come up with ideas within that to my best understanding.

 

BulbBlink:

 

1-brightness percentage is always good to have as an option

2-if the pattern could be up to 32 that would be perfect. Yes FP manual says string can be up to 32.

3-as for timing... basically if we can just enter the same time value that we see in the script and have it try to match it, that would be great (similar to what you did for "FlashForMs"). I'm under no illusion that timings will be exact with what we see in FP gameplay. The idea is to be to able easily create a sequence of our own...or to mimic a sequence (as close as we can) in the script without having to create HUGE subroutines and Timers for everything.

4-FP manual says time between Blink intervals must be at last 25 ms. I don't know how all the math works. Maybe a similar method as you did with FlashForMs? I would prefer ms if possible. I'm not good with numbers...

 

SINGLE, MULTIPLE, or REPEAT:

 

-having the option to be able to have a Blink Pattern run ONCE, a specific number of times, or continually REPEAT would also be amazing.

-also being able to either "flash" or "fade" in the pattern would also be excellent (I know fade may be more complicated on your end)

 

So maybe:

 

FF_FlashBlink DV_FLxx,RRR,HHHHHH,BBB,"Colour","Pattern"

 

FF_FadeBlink DV_FLxx,FFF,RRR,HHHHHH,BBB,"Colour","Pattern"

 

RRR = number of times to repeat the pattern. 1 is single, 0 is continuous repeat, or other specified number of times

 

HHHHHH = time preferably in ms if possible (to try match FP as best as possible), otherwise whatever you can work out

 

BBB = brightness %

 

"Colour" = is the colour

 

Pattern = up to 32 if possible

 

FF_FlashBlink = a normal "flash" type of operation

 

FF_FadeBlink = a "fade" type of flash

 

FFF = time for the fade UP (from 0 to 1) or DOWN (from 1 to 0) . This is separate from (but must be less than) the interval time HHHHHH. Anything higher would just use the interval time. If this is too difficult to achieve, then have no FFF option and just use the HHHHHH value

 

 

The bottom line would be a single DOFLinx command to run a sequence of "flash" or "fade" commands, following a specific pattern, and time interval. That pattern can either repeat, or run a specific number of times. This would eliminate the need to use Timers for almost EVERYTHING. This would save SOOOO much time and allow for some simple yet powerful DOFLinx functionality.

 

 

============================================================

 

 

FADING:

 

​Your example:

 

FF_Flasher FF_DVxx, SE_FD,SSS,EEE,HHHHHH,"Colour"
FF_Flasher FF_DVCN,SE_FD,100,0,500,"Red" - centre flasher, red, fade from 100% to 0% over 5 seconds
 
1-the option of having a start / end would allow for a specific "transition" type of effect. This would be a "manually" controlled transition. Nice for the "in between" moments and allows for total control. This would be very useful for a Fade UP or a Fade Down.
2- For the SE_FD command, if the flasher is currently OFF or at 0 brightness, the "FADE" would still occur from the "start" (turn it ON to that %) and "end" values, because this is controlled "manually"
 
Maybe change it up a little, FD_SE instead:
 
FF_Flasher DV_FLxx,FD_SE,SSS,EEE,HHHHHH,"Colour" 
 
- would simply be a manually controlled Fade UP or Fade Down transition command.
 
 
 
​Then we could have a "Resume" type of FADE command (automatic):
 
FF_Flasher DV_FLxx,FD_RS,EEE,HHHHHH,"Colour"
 
- this would check to see if the flasher is currently ON, and see what brightness level it's at
- it would do a FADE from the flasher's current brightness to whatever value EEE is
- if EEE is higher than the current flasher brightness, then its a Fade UP
- if EEE is lower than the current flasher brightness, then its a Fade DOWN
- HHHHHH is the time of the Fade
- if the flasher is currently OFF, or brightness at 0, then this command will do nothing
 
This would make for a VERY nice way to have seamless transitions or FADES from ANY current flasher condition.
 
Having the option of using the existing colour with an empty string "" for all commands would also be great!
 
=========================
 
 
So to sum it up:
 
 
FlashBlink
 

FF_FlashBlink DV_FLxx,RRR,HHHHHH,BBB,"Colour","Pattern"

 

FadeBlink

 

FF_FadeBlink DV_FLxx,FFF,RRR,HHHHHH,BBB,"Colour","Pattern"

 

FadeStartEnd
 
FF_Flasher DV_FLxx,FD_SE,SSS,EEE,HHHHHH,"Colour" 
 
FadeResume
 
FF_Flasher DV_FLxx,FD_RS,EEE,HHHHHH,"Colour"
 
 
 
Phew....  hope that helps explain things a bit better.  Don't know how much of that is possible, but there it is.

Edited by TerryRed, 30 November 2016 - 08:05 PM.


#3 TerryRed

TerryRed

    Pinball Wizard

  • Silver Supporter
  • 2,002 posts

  • Flag: Canada

  • Favorite Pinball: Too many to choose...

Contributor

Posted 30 November 2016 - 07:40 PM

So as an example, this sub-routine script here, that uses Timer "DOFLinx_LR_Red" set to 70 ms

 

This would have an animated Outer Left to Outer Right fading flasher sequence​.

 

Sub DOFLinx_LR_Red_Expired()
  Select Case DOFLinx_LR_Red_Stage
    Case 1 : DOFLinx_LR_Red_Stage=2
               FF_Flasher DV_FLOL,FL_FD,2,10,100,"Red"
    Case 2 : DOFLinx_LR_Red_Stage=3
     FF_Flasher DV_FLIL,FL_FD,2,10,100,"Red"
    Case 3 : DOFLinx_LR_Red_Stage=4
     FF_Flasher DV_FLCN,FL_FD,2,10,100,"Red"
    Case 4 : DOFLinx_LR_Red_Stage=5
               FF_Flasher DV_FLIR,FL_FD,2,10,100,"Red"
    Case 5 : DOFLinx_LR_Red_Stage=1
     FF_Flasher DV_FLOR,FL_FD,2,10,100,"Red"
             DOFLinx_LR_Red.Enabled=false
  end Select
End Sub

 

Using FF_FadeBlink DV_FLxx,FFF,RRR,HHHHHH,BBB,"Colour","Pattern"

 

...it would be replaced with:

 

Sub DOFLinx_LR_Red()

       FF_FadeBlink DV_FLOL,10,1,70,100,"Red","10000"

       FF_FadeBlink DV_FLIL,10,1,70,100,"Red","01000"

       FF_FadeBlink DV_FLCN,10,1,70,100,"Red","00100"

       FF_FadeBlink DV_FLIR,10,1,70,100,"Red","00010"

       FF_FadeBlink DV_FLOR,10,1,70,100,"Red","00001"

End Sub

 

 

With just normal flash (no fading):

 

Using FF_FlashBlink DV_FLxx,RRR,HHHHHH,BBB,"Colour","Pattern"

 

...it would be replaced with:

 

Sub DOFLinx_LR_Red()

       FF_FlashBlink DV_FLOL,1,70,100,"Red","10000"

       FF_FlashBlink DV_FLIL,1,70,100,"Red","01000"

       FF_FlashBlink DV_FLCN,1,70,100,"Red","00100"

       FF_FlashBlink DV_FLIR,1,70,100,"Red","00010"

       FF_FlashBlink DV_FLOR,1,70,100,"Red","00001"

End Sub

 

 

No need for Timers. No need to wait for the first "cycle" of a Timer before an animation sequence can begin. Much more cleaner and easier to use.

 

Any "Blink" commands currently running a cycle of the pattern would be automatically stopped and over written when any new kind of flasher command is used.

 

=============================

 

Mimicking Future Pinball BulbBLink commands and Light Sequences.

 

This is from a Future Pinball light sequence in a table script. It will repeat the pattern for each light until a BulbOff is set.

 

 Light1.Set BulbBlink, "101000011111111110", 125
 Light2.Set BulbBlink, "101000001111111110", 125
 Light3.Set BulbBlink, "101000000111111110", 125
 Light4.Set BulbBlink, "101000000011111110", 125
 Light5.Set BulbBlink, "000101000001111110", 125

 

 This would be a pain to try to mimic. I know...I've done it   :)

 

With  FF_FlashBlink DV_FLxx,RRR,HHHHHH,BBB,"Colour","Pattern",       this would now be as simple as:

 

Sub DOFLinx_FP_Mimic_Red()

       FF_FlashBlink DV_FLOL,0,125,100,"Red","101000011111111110"

       FF_FlashBlink DV_FLIL,0,125,100,"Red","101000001111111110"

       FF_FlashBlink DV_FLCN,0,125,100,"Red","101000000111111110"

       FF_FlashBlink DV_FLIR,0,125,100,"Red","101000000011111110"

       FF_FlashBlink DV_FLOR,0,125,100,"Red","000101000001111110"

End Sub

 

Instead of having to come up with up to 90 different DOFLinx commands (as well as Timer and Stage variables), I would only have to use 5. The sequence will continue until another flasher command is issued. (I would just use a DOFLinx_FLASHERS_OFF sub-routine) Much easier and cleaner.

 

 

Those would be some typical uses, and would take A LOT of guess work out of adding DOFLinx commands to match FP Light Sequences, as well as doing your own custom effects.

 

 

Hope this helps to clarify.


Edited by TerryRed, 30 November 2016 - 08:58 PM.


#4 DDH69

DDH69

    Pinball Wizard

  • Platinum Supporter
  • 3,617 posts
  • Location:DOFLinx HQ, Adelaide

  • Flag: Australia

  • Favorite Pinball: Monster Bash

Posted 01 December 2016 - 08:47 AM

That is it!

 

:tongue3:  I'm not asking any more questions as it's just getting more complex  :shutup:  

 

 

 

 

 

 

 

 

I'll start thinking.


Edited by DDH69, 01 December 2016 - 08:47 AM.

DOFLinx
Contributions for equipment to help with ongoing DOFLinx development can be made here