Jump to content




How to make something fade instead of just clear?



6 replies to this topic

#1 PlotTwistGamer

  • Members
  • 23 posts

Posted 02 September 2017 - 06:37 PM

Is there anyway to make something fade into another program instead of just clear?

#2 KingofGamesYami

  • Members
  • 3,002 posts
  • LocationUnited States of America

Posted 02 September 2017 - 07:14 PM

Not easily... it could be done in the latest beta (1.80)* but there are some special cases you would have to consider. Clearing is definitely the way to go.

You obviously couldn't start fading until the program's drawn stuff, but how do you know that? The program would have to signal the fade effect somehow. Also, what do you do in the case of the program drawing on the same pixel multiple times? What if the program has on-screen movement? How does that fading work? What about controls? Is the program going to recieve events during the fade? etc.

*Similar to this effect.

Edited by KingofGamesYami, 02 September 2017 - 07:15 PM.


#3 PlotTwistGamer

  • Members
  • 23 posts

Posted 03 September 2017 - 12:08 AM

View PostKingofGamesYami, on 02 September 2017 - 07:14 PM, said:

Not easily... it could be done in the latest beta (1.80)* but there are some special cases you would have to consider. Clearing is definitely the way to go.

You obviously couldn't start fading until the program's drawn stuff, but how do you know that? The program would have to signal the fade effect somehow. Also, what do you do in the case of the program drawing on the same pixel multiple times? What if the program has on-screen movement? How does that fading work? What about controls? Is the program going to recieve events during the fade? etc.

*Similar to this effect.

Makes sense, do you need me to upload the install for the program Im making to pastebin so you could check it out??

#4 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 03 September 2017 - 02:59 AM

A direct fade into another script is a bit tricky, but fading the old screen-content to black / white is trivial. You could then additionally draw your script's new content before fading back to a regular palette.

Spoiler


#5 PlotTwistGamer

  • Members
  • 23 posts

Posted 03 September 2017 - 04:13 PM

View PostBomb Bloke, on 03 September 2017 - 02:59 AM, said:

A direct fade into another script is a bit tricky, but fading the old screen-content to black / white is trivial. You could then additionally draw your script's new content before fading back to a regular palette.

Spoiler
To be honest I'm still doing "If Statements" and using them for most of the OS Im making. I did end up learning to code buttons. Which was somewhat complicated for me. But thanks for showing me this, I'll for sure use this :3

#6 Dave-ee Jones

  • Members
  • 456 posts
  • LocationVan Diemen's Land

Posted 04 September 2017 - 12:47 AM

Actually this could be possible however the programs need to be run in a 'wedding cake' formation. E.g. running a base program that modifies the colour palette inbetween programs, making a fade-out/in screen in-between programs.
So it would start to modify the palette (fade-out) when you exit one program, then modify the palette again (fade-in) when the next program is run.

The only inconvenience is having to run the 2 programs above a base program that modifies it, having the other 2 programs running as coroutines. Also the annoyance of having a few seconds' delay between running programs. Would be interesting for a custom shell though.

EDIT: Just saw you mention that you are a bit of a beginner with CC - probably don't try doing this until later on, haha! Coroutines are tricky.

Edited by Dave-ee Jones, 04 September 2017 - 12:48 AM.


#7 KingofGamesYami

  • Members
  • 3,002 posts
  • LocationUnited States of America

Posted 04 September 2017 - 01:54 AM

I tried making a shell-like program using the function provided by BombBloke, but almost every program you'd actually want to consider fading cleans up after itself... For anyone who wants to mess around with what I did, here it is:
Spoiler

Edit: Apologies for the inconsistent formatting, blame Sublime Text.

Edited by KingofGamesYami, 04 September 2017 - 01:58 AM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users