It is currently April 25th, 2024, 6:26 am

Help with fader in ActionTimer!

Get help with creating, editing & fixing problems with skins
User avatar
andersonventura
Posts: 57
Joined: December 11th, 2018, 7:38 pm
Location: Brasil

Re: Help with fader in ActionTimer!

Post by andersonventura »

Im reducing the slices size from 96x108 to 40x48 and this is taking me a lot of work... about 2160 actions... and 1080 meters! Any way to do this effect without this lot of actions?

I tried:

Update=1000 and [!Redraw]
The images delay to apear and when i moves the mouse fast, some images dont load.

Update=-1 and [!Redraw]
The skin shows a lot of lag to display the images, but shows all images.

The only way i find to do this work is Update=1, no [!Redraw], and actionlists like this:

Code: Select all

ActionList1=Repeat FadeIn1,#Wait#,25
FadeIn1=[!SetVariable Alpha1 "(Clamp(#Alpha1#+10,1,255))"]#U#

ActionList2=Repeat FadeOut1,#Wait#,25
FadeOut1=[!SetVariable Alpha1 "(Clamp(#Alpha1#-10,1,255))"]#U#
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Help with fader in ActionTimer!

Post by jsmorley »

You have 1,084 images in the skin? Yike.
User avatar
andersonventura
Posts: 57
Joined: December 11th, 2018, 7:38 pm
Location: Brasil

Re: Help with fader in ActionTimer!

Post by andersonventura »

jsmorley wrote: December 12th, 2018, 12:49 am You have 1,084 images in the skin? Yike.
1080

1.56kb each one
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Help with fader in ActionTimer!

Post by jsmorley »

My advice is to use Update=-1 and [!Redraw], then reduce the number of "steps" for each transition, and increase the amount of transition to match. You won't find much visible difference going from 1 to 255 in 51 steps of 5 each, or 26 step of 10 each, but the performance will be drastically better.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Help with fader in ActionTimer!

Post by jsmorley »

1,080 images in a skin is asking a lot. I can't promise that isn't going to get overwhelmed if you move the mouse around quickly.
User avatar
andersonventura
Posts: 57
Joined: December 11th, 2018, 7:38 pm
Location: Brasil

Re: Help with fader in ActionTimer!

Post by andersonventura »

jsmorley wrote: December 12th, 2018, 12:54 am My advice is to use Update=-1 and [!Redraw], then reduce the number of "steps" for each transition, and increase the amount of transition to match. You won't find much visible difference going from 1 to 255 in 51 steps of 5 each, or 26 step of 10 each, but the performance will be drastically better.
andersonventura wrote: December 12th, 2018, 12:46 am Im reducing the slices size from 96x108 to 40x48 and this is taking me a lot of work... about 2160 actions... and 1080 meters! Any way to do this effect without this lot of actions?

I tried:

Update=1000 and [!Redraw]
The images delay to apear and when i moves the mouse fast, some images dont load.

Update=-1 and [!Redraw]
The skin shows a lot of lag to display the images, but shows all images.

The only way i find to do this work is Update=1, no [!Redraw], and actionlists like this:

Code: Select all

ActionList1=Repeat FadeIn1,#Wait#,25
FadeIn1=[!SetVariable Alpha1 "(Clamp(#Alpha1#+10,1,255))"]#U#

ActionList2=Repeat FadeOut1,#Wait#,25
FadeOut1=[!SetVariable Alpha1 "(Clamp(#Alpha1#-10,1,255))"]#U#
Yep!

I came to this conclusion after trying different configurations!
and at the moment I'm using 25 updates of 10 each.


Is there no way to use less actions? or just one or two actions to be used by all meters?
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Help with fader in ActionTimer!

Post by jsmorley »

andersonventura wrote: December 12th, 2018, 1:03 am Yep!

I came to this conclusion after trying different configurations!
and at the moment I'm using 25 updates of 10 each.


Is there no way to use less actions? or just one or two actions to be used by all meters?
Not easily. The problem is that with using the same variable for all the meters is that when you change it and update, they all change at the same time. You can probably try targeting the !UpdateMeter to just the meter in question, but it all gets complicated, as then you can't use the single #U# variable to do the update.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Help with fader in ActionTimer!

Post by jsmorley »

To be honest, I can't envision a case where I would ever want 1,080 images in a single skin. That just can't end well...
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Help with fader in ActionTimer!

Post by jsmorley »

I mean I don't want to rain on your parade, but 1,080 images in a single skin is just not a great idea. So you are basically going to just fill the entire screen with 48 X 48 images, and have mouse-over on any of them redraw the entire screen, including each and every one of the 1,080 images, 25 times in 200 milliseconds. The work involved in checking each of those image files, to be sure they havn't changed, and then redrawing all those images on the screen is just going to be enormous. I personally would re-think this approach entirely.

The problem isn't how this is being done. It's as efficient as it can be. The problem is the shear scope of the work involved. Show me ANY website that displays 1,080 images on the screen at once, and animates them. If you can find one, I promise it will be a pig...

20-30 images in a skin? Sure. 1,080? I don't think so Tim.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Help with fader in ActionTimer!

Post by jsmorley »

About the only thing I can think of, and I can't promise even this will perform really well is a completely different approach.

Have a SINGLE .jpg image file that has all the 1,080 images in it, arranged any way you want in rows and columns.
Create 1,080 Shape meters to act as "lids" for each of the separate pictures displayed in the image. Have them start "opaque". No images are shown.
On mouse-over of a given Shape meter, transition the opacity of the shape from 255 to 1, showing the appropriate part of the image below it, and on mouse-leave transition it back to 255 to hide that part of the image again.

Any way you look at it, it's a boatload of code.