Jump to content



Photo
- - - - -

Alternative Alpha Ramp Scripting for Plunger/Lights/etc.


  • Please log in to reply
32 replies to this topic

#21 jpsalas

jpsalas

    Grand Schtroumpf

  • VIP
  • 7,325 posts
  • Location:I'm Spanish, but I live in Oslo (Norway)

  • Flag: Norway

  • Favorite Pinball: I like both new and old, but I guess I prefer modern tables with some rules and goals to achieve.



Posted 07 July 2012 - 09:59 AM

Yes, UW, remember also to change it in my fading lights subs (all those FadeAR and FlashAR subs).

If you want to check my latest uploads then click on the image below:

 

vp.jpg

 

Next table? A tribute table to Stern's Foo Fighters


#22 jimmyfingers

jimmyfingers

    Pinball Fan

  • VIP
  • 832 posts

  • Flag: Canada

  • Favorite Pinball: Comet



Posted 07 July 2012 - 10:05 AM

QUOTE (koadic @ Jul 7 2012, 05:57 AM) <{POST_SNAPBACK}>
QUOTE (jimmyfingers @ Jul 6 2012, 11:06 PM) <{POST_SNAPBACK}>
Hey Koadic, would you be able to post the script for this enhancement on the Alpha Ramp plunger but also with the "either or" approach to the PBWplunger or a key being pressed. You had one earlier that drew correctly regardless of whether or not the analog plunger was used vs. the key being pressed. Hope this rings a bell as I'd like to use this script verbatim (I have a motion sensor but not a plunger which throws it off as it detects the "PBW" even though I don't have a plunger and use a key assignment).

I imagine I could analyze the two and work it out so no big deal if you can't just thought it might save some time for others in the same boat or who want the same functionality but might not be as into script modification / splicing.


You can use the script verbatim, as this is what I included above... You enable the Plunger timer by default with an interval of 40, then use the KeyDown and KeyUp parts for the plungerkey included above, that way whenever the plunger button is pushed, the timer is disabled, then reenabled when it is released. That way the animation works correctly regardless.

Sorry koadic, I see it now in the script you already provided above - I think my first copy and paste was for everything but the keyup and keydown section elements. Easy enough to add now exactly and with the logic. Thanks.

#23 koadic

koadic

    Pinball Fan

  • VIP
  • 1,363 posts
  • Location:Omaha, NE, USA

  • Flag: United States of America

  • Favorite Pinball: Addams Family/Fish Tales/Medieval Madness



Contributor

Posted 07 July 2012 - 10:35 AM

QUOTE (unclewilly @ Jul 7 2012, 04:42 AM) <{POST_SNAPBACK}>
hey jimmy just open the script and do edit replace
search and replace all .widthtop and .widthbottom with .alpha
then change the numbers 0 stays as 0 and any widths say 200 change those to 1


QUOTE (jimmyfingers @ Jul 7 2012, 04:59 AM) <{POST_SNAPBACK}>
In general and so far while editing / assessing some tables for this performance improvement, I noticed that if the ramps are set smaller / narrower in the editor than what they'll be when they are "expanded" as part ot the alpha ramp routine, then those will need to be fixed and set to the width in the editor that they have as parameters for the routine calls or I've been writing a routine to initialize the size (widthtop / widthbottom) that runs in the script so that I don't have to go around all the editor and find the ramps and for which I can copy and paste the current alpha ramp routine calls with the sizes in them, re-format / replace, and place back in as init calls at the top of the table.

This find is massive for performance improvement and the magnitude for which it can help, thanks again Koadic! clapping.gif


I guess in the situation where the ramp width is different in the script than what it is in the editor, the other option is just to ADD the .alpha = 1 to any lines where the ramp width is set, as this shouldn't interfere with the old style, but I would add it before setting the width just in case... and with setting it to 0, you can still REPLACE that part with .alpha = 0 as visually it does the same thing (hope I am making myself clear on this smile.gif)

#24 unclewilly

unclewilly

    sofa king.....

  • VIP
  • 5,173 posts
  • Location:Baltimore, Maryland

  • Flag: United States of America

  • Favorite Pinball: tz, tom, big hurt, who dunnit



Posted 07 July 2012 - 11:23 AM

QUOTE (jpsalas @ Jul 7 2012, 10:59 AM) <{POST_SNAPBACK}>
Yes, UW, remember also to change it in my fading lights subs (all those FadeAR and FlashAR subs).



thanks jp.

i did. i have some custom alpha routines in the light system also for 3 step alpha lights and combinations of alpha and lights and dropwalls.

it is a vast improvement.

thanks for finding this.

jimmy: most likely the reason the routines in the script have different widths than whats in the editor is because he didnt check the sizes when he did the script.
its usually a copy and paste thing

"it will all be ok in the end, if it's not ok, it's not the end"
 
Monster Bash VP10 WIP https://dl.dropboxus... (vpx)WIP15.vpx

uw2.gif


#25 FDSystems

FDSystems

    Eclectic end-user

  • Charter Member
  • 2,477 posts
  • Location:Bahia

  • Flag: Brazil

  • Favorite Pinball: I will have to find out again.............

Posted 07 July 2012 - 11:41 AM

I have a tecnical question:

After showing this thread on their respective monitor, my two laptops have a very large smile ? think.gif

Anybody could explain this ? wink.gif dirol.gif









Koadic, Thank you very much for ALL your contributions to VP ! otvclap.gif otvclap.gif otvclap.gif

Edited by FDSystems, 07 July 2012 - 11:42 AM.

From Brasil. Updated version of 1234fd



#26 JAM0

JAM0

    Pinball Fan

  • Members
  • PipPipPipPip
  • 1,146 posts
  • Location:Spain

  • Flag: Spain

  • Favorite Pinball: Fathom, Elvira

Posted 07 July 2012 - 02:24 PM

Thanks Koadic for this "great find" as JP says!

Tried it out on Checkpoint FS -- got some improvement but table still unplayable for me; obviously there is something else also going on with this table.

Looking forward to trying it out on other tables!

#27 fahq

fahq

    Neophyte

  • Members
  • Pip
  • 9 posts

  • Flag: United States of America

  • Favorite Pinball: silver ball mania

Posted 07 July 2012 - 02:30 PM

i havent looked but i know he used alpha ramps for everything including all the plastics.
i would imagine if the.plastics were switched to walls and lights it would play fine

#28 bmiki75

bmiki75

    Enthusiast

  • VIP
  • 435 posts
  • Location:italy

  • Flag: Italy

  • Favorite Pinball: World Cup Soccer 94



Posted 07 July 2012 - 03:00 PM

Thanks a lot koadic.
Better to reign in hell than serse in heaven.
My recreation and Mod:
Posted ImagePosted Image Posted ImagePosted ImagePosted ImagePosted ImagePosted ImagePosted ImagePosted ImagePosted ImagePosted ImagePosted Image

#29 JAM0

JAM0

    Pinball Fan

  • Members
  • PipPipPipPip
  • 1,146 posts
  • Location:Spain

  • Flag: Spain

  • Favorite Pinball: Fathom, Elvira

Posted 07 July 2012 - 03:19 PM

QUOTE (bmiki75 @ Jul 7 2012, 03:00 PM) <{POST_SNAPBACK}>
Thanks a lot koadic.

Just got some very nice improvement on your cool Jurassic Park, on which I had some stutter tup.gif

#30 teppotee

teppotee

    Enthusiast

  • Members
  • PipPipPip
  • 382 posts
  • Location:Finland

  • Flag: Finland

  • Favorite Pinball: CV

Posted 07 July 2012 - 08:17 PM

This seems great!

Just a suggestion... if the changes are only needed in the table script then would it be possible to share / attach updated scripts in this thread? It would be an easy way to get to try the new versions without updated table uploads at this point. Also working with table scripts in my cab (which is the only place where I have all the tables) is not so easy so simply copy & pasting the new scripts would help a lot.

I would also really like to try these changes to the LW3 but it seems that it takes more work than just search and replace (jimmyfingers wrote "LW3 now runs super smooth and I more than doubled the FPS but it had some extra quirks to really get smooth - had to change how the refresh was happening as well"). So sharing working solutions would help in this case as well. Of course only if it's not considered sharing unauthorized mods.


#31 jimmyfingers

jimmyfingers

    Pinball Fan

  • VIP
  • 832 posts

  • Flag: Canada

  • Favorite Pinball: Comet



Posted 07 July 2012 - 09:58 PM

I'm going to send a PM to oooPlayer1ooo to see if he wants the changes I did or will allow me to post a basic table with the script that can be copy and pasted and the one set of objects that I had to change (along with instructions of course). I've had a few people now ask me so I would prefer to distribute in a method that is approved by oooPlayer1ooo or in line with rules. There were a few areas in the script / routines so section by section would be a little complex than just a complete rip and replace (select all / paste) type thing but that may be more against policy without his permission / blessing.

I'll send him a PM right now.

#32 settingsons

settingsons

    Pinball Fan

  • VIP
  • 959 posts
  • Location:Switzerland

  • Flag: Switzerland

  • Favorite Pinball: Terminator 2 and many EM machines



Posted 07 July 2012 - 09:59 PM

cool.gif Great discovery koadic! cool.gif

#33 jimmyfingers

jimmyfingers

    Pinball Fan

  • VIP
  • 832 posts

  • Flag: Canada

  • Favorite Pinball: Comet



Posted 07 July 2012 - 10:17 PM

QUOTE (JAM0 @ Jul 7 2012, 10:24 AM) <{POST_SNAPBACK}>
Thanks Koadic for this "great find" as JP says!

Tried it out on Checkpoint FS -- got some improvement but table still unplayable for me; obviously there is something else also going on with this table.

Looking forward to trying it out on other tables!

Checkpoint uses a different / older lighting update mechanism and would need an overhaul into how the lights are handled before it could really benefit from the change to the alpha ramp aspects. As it stands they're essentially getting called way too frequently using the PinMAME handling / timer. Saw the same thing you did after playing around with it for a bit today but also can see why in the script this is not going to work much better without major changes to the lighting / flasher scripting.