How can I create an opening screen and a game over screen for my game? Nothing too fancy, just something that transitions to/from the game nicely.
A possible way is to check the delta time
Here when my enemy is dead i check the frames that passed with this way we can hide the corpse with a nice smooth transition from visible to invisible and then i check the opacity and if is 0 i call the delete object action.
You can use just a black frame that fade out and the new scene is now visible for example.
Or you can play with the opacity of several sprites in the new scene and make them appear with fade in transition
thank you 2 quick questions:
1/ how do i make the black frame transition?
2/ when the game ends, typically, you give the player a screen in which they have an option to restart. how would i transition into this?
I recommend to take a comfortable seat and read the documentation
On conditions list you will find the options you need in order to check when/if something happens this something you will define it with actions.
In actions list you can call the change scene option among others
About the frame you can use just a single black frame sprite that blocks everything in the screen at the beginning and make the trick with the opacity.
It’s better to put that black frame sprite to a new layer
i’ve read the documentation, and it hasn’t helped much, that’s why i came to the forum
what i don’t understand is how i can make this black frame sprite lose opacity while transitioning to the next scene
Look you must understand how the engine works in general
The variables are your best friends
So here we store the data we want in an object variable
thank you! how would i reverse the effect, so that the black layer can lower opacity to show the next scene? would i divide 255/TimeDelta to the opacity?
You can refer to this for the starting menu. You can follow similar steps to make a game over screen
http://wiki.compilgames.net/doku.php/gdevelop5/tutorials/space-shooter
Just Do-255*TimeDelta()