Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Fades and Transitions

Author
Message
Richard_6
7
Years of Service
User Offline
Joined: 3rd Feb 2017
Location:
Posted: 24th Oct 2017 15:51
I'm wondering which are the most used methods for transitions between screens and fade/cross-fade effects.

A) SetSpriteTransparency
B) Shaders
C) Tweening
D) A with B
E) A with C
F) All together
G) Other methods?

Which methods do you mostly use?
Kevin Cross
20
Years of Service
User Offline
Joined: 15th Nov 2003
Location: London, UK
Posted: 24th Oct 2017 16:25 Edited at: 24th Oct 2017 16:25
I used A and C (so E) when I display alerts. I fade in a black background sprite with tween to drag the users attention to the alert window on top. It also stops users from clicking outside of the alert.
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 24th Oct 2017 17:06
I use my UI engine to basically fade in a blank sprite, once it's fully transitioned in, it'll trigger a script command to [move the camera to another location] or other such action, then hide the sprite by fading it out.

Think of it a being like a powerpoint presentation, that's kind of how I designed my UI engine. (See below video)
Click here for VR Legend of Zelda stuff
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 24th Oct 2017 21:26
Tweens are really easy to use.
I stack a whole load of tweens and combinations of tweens to fade/bounce/resize etc. I have my own function to add the tween and register it in an array of all active tweens. I also register the time of the longest lasting tween (calculated in the same function) so that I know when to delete them all and the associated resources.
Sounds are slightly trickier, you have to use a custom tween and a little extra code to synchronise them.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
29 games
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: not entirely sure
Posted: 26th Oct 2017 21:04
Depending on the fade effect I'm looking for and what's easiest at the time I use: shaders, colour, transparency, scaling and position.

To control the transition I'll use some sort of maths. It means having to attach some variables to the object / sprite / text in order to do this, mainly a start time and the length of time for the transition, but I don't find this a hassle. What I like about this method is that I can use all sorts of formulas, very easily mix together affect, such as a fade and scale, and get some nice results.

I've only had a brief go a tweens and I felt it wasn't any less or more difficult that writing my own code. They have the advantage of doing the maths for you and I believe they take care of any frame rate issues automatically but I might be wrong on that.

I think this is one of those areas where getting to grips with as many methods as possible is really useful. It gives more freedom to do what you want, gives more options and prevents your games having an identi-kit / copy-cat feel to them.
Hover Car Race Challenge! - available now on Google Play
Invaders of the 29th Dimension - available now on Google Play
Find me on indieDB

Login to post a reply

Server time is: 2024-05-01 22:47:30
Your offset time is: 2024-05-01 22:47:30