More options for fade behavior

New releases and general discussions.

Post » Thu Sep 04, 2008 11:01 pm

There are three more options I would like for the fade behavior:

Start at opacity
Fade to opacity - uses are better not fading all the way to 100% opacity
Finish at opacity

All settable via events. Finish at opacity is easy enough via events, so not really important, I just put it there for sake of completeness, but the other two can't be done via events. The best that can be done is if the opacity is too low/high, set it higher/lower, but that messes around with the fading in/out.
Moderator
B
87
S
32
G
33
Posts: 3,005
Reputation: 27,397

Post » Sat Sep 06, 2008 9:00 pm

you could just edit opacity, fade doesnt have much purpose in construct, 1-2 lines or code can get the same efffect done
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610

Post » Sat Sep 06, 2008 9:07 pm

I know it's doable via events - I was thinking more about ease of coding and most importantly, speed. I know the behaviors are much faster than using events, and I tend to use fade on particles, so when there are a lot of objects on screen, that's a lot of objects to cycle through each frame.

Although, I AM running on a p3 600, so I doubt many people would run into this issue anyway. It's not a necessity, just a suggestion. :)
Moderator
B
87
S
32
G
33
Posts: 3,005
Reputation: 27,397

Post » Sat Sep 06, 2008 9:23 pm

i dont know if im right but, i do think fade is the exact same speed as doing it via events.

what you realy need to do is destroy the object if it reaches opacity 0

or else the invisible instances will eat up your proccesor
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610

Post » Sun Sep 07, 2008 3:55 pm

Events will very rarely be the bottleneck of your game. Almost always, you can assume the rendering is going to be what slows your game down, if anything.

Read the article - it explains how quite often the events will actually have zero impact on your game's performance.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,478

Post » Sun Sep 07, 2008 4:09 pm

I suppose this really is all because I'm running on a 600mhz p3. I like to make sure stuff can run on it, because if it can run on my machine, then it can run on pretty much anything, but realistically, most computers are way faster than mine. I was doing some complex stuff with particles - and lots and lots of them - and using the fade behavior did speed it up, but I couldn't do everything I wanted.

Again, it's not really important. Although I would really use the second suggestion, setting the max opacity to fade to very often.
Moderator
B
87
S
32
G
33
Posts: 3,005
Reputation: 27,397


Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 3 guests