How to Make Opening/Game Over Screen?

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.

1 Like

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

2 Likes

thank you :slight_smile: 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?

1 Like

I recommend to take a comfortable seat and read the documentation :blush:
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

1 Like

i’ve read the documentation, and it hasn’t helped much, that’s why i came to the forum :confused:
what i don’t understand is how i can make this black frame sprite lose opacity while transitioning to the next scene :slightly_frowning_face:

Look you must understand how the engine works in general
The variables are your best friends :wink:
ElevTransition
So here we store the data we want in an object variable

2 Likes

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?

1 Like

You can refer to this for the starting menu. You can follow similar steps to make a game over screen :slight_smile:
http://wiki.compilgames.net/doku.php/gdevelop5/tutorials/space-shooter

2 Likes

Just Do-255*TimeDelta()

3 Likes