How do I have a smooth transition between scenes?
Hi!
By defailt, when the scenes change, they change instantly.. But is there a way to have a smoother transition, as for example the scenes scrolling to the left or to the right?
Thanks!
-Dmitry.
By defailt, when the scenes change, they change instantly.. But is there a way to have a smoother transition, as for example the scenes scrolling to the left or to the right?
Thanks!
-Dmitry.
Comments
Basically , if your game is not in one scene and by transitions you mean actually change a scene, all you need to do is to split your transition into 2 halfs , put the first half in your current scene right before you'r gonna change to the next one , and put the second half in the initial opening of your second scene .
If you want an example , you can download my game "Spin The Nut Lite" (its free)
And see the scene transition i did in this game .
Hope this helps
EDIT:
"By defailt, when the scenes change, they change instantly"
HAHA Yeah right
Roy.
From a simple fade to black, to something more intricate.
Check this video I made with a few examples :
As an example in that video : Fade to black 2 : works as follows
There is an actor, black in colour, size 480x320 and put in in the middle of the scene at the front of all the layers, in a non-scrollable layer (if you are scrolling)
There is an actor with the "Loading" graphic on the same layer, infront of the black actor, hidden off the bottom of the screen/scene.
In the black actor rules :
1. Change attribute : self.colour.alpha to 0 << this makes the actor invisible until you need to trigger the effect
2. When you want to fade (when you win a level for example) have a boolean attribute called dotransition or something else meaningful to you, and flag it as true. then:
When dotransition=true : interpolate self.colour.alpha to 1 - duration 1 second
This will give the effect that the screen is fading to black, as the black full screen actor is covering everything else.
Then, once the alpha is fully at 1, and the screen is back, interpolate the self.position.Y of the "loading graphic" actor to 160 << this slides the loading image into the middle of the screen
Then...trigger your change scene rule to go to your next scene.
If you wanted to fade in from black at the start of the scene, do pretty much the same thing, but start with the black actor's alpha at 1, and interpolate it to 0 as the scene starts
The others in that video work in similar ways, usually having some sort of actor to cover the screen in some sort of interesting way....or....utilise some way of moving the camera to give a certain effect.
Hope that made sense.
Sparky.
I've used quite a few like that in my games.
One thing I might add, and this depends on the game, but you can make a scene twice it's width and the just have Scene one on the left and Scene two on the right. Then, you have an actor with a control camera behavior interpolate over to the right side from the left. I use this extensively in my game MarbleMania.
Hope that helps
-Thomas