-
Book Overview & Buying
-
Table Of Contents
Godot 4 Game Development Projects - Second Edition
By :
The title screen is the first thing the player will see, and the game will return to this screen when the player dies and the game ends.
Start with a Control node and set Layout to Full Rect. Add a TextureRect node using the back.png image. Set Layout to Full Rect and Stretch Mode to Keep Aspect Covered.
Add another TextureRect, this time using middle.png and setting Stretch Mode to Tile. Drag the width of the rectangle until it’s wider than the screen and arrange it so that it covers the bottom half.
Add two Label nodes named Title and Message and set their Text properties to Jungle Jump and Press Space to Play, respectively. Add the font to each one as you’ve done before, setting the title to size 72 and the message to size 48. Set the title’s layout to Centered and the message’s layout to Center Bottom.
When you’re finished, the scene should look like this:
Figure 4.24: Title screen...