Introducing Dragonfly Cloud! Learn More

Question: Does Godot have a splash screen feature?

Answer

Yes, Godot has a built-in feature to set up a splash screen for your game.

To configure the splash screen in Godot, follow these steps:

  1. Open your Godot project.
  2. Go to the "Project" menu and select "Project Settings."
  3. Under the "Application" category, you should find an option called "Boot Splash." Here you can set the image that will be used as the splash screen.
# Example: Setting a splash screen image via code (not commonly needed). var splash_image = preload("res://path_to_your_splash_image.png") ProjectSettings.set_setting("application/boot_splash/image", splash_image)

The splash screen will display before the engine initialization is complete and will be shown until the first scene is ready to run. You can also change properties such as the background color and scale mode for the image through the "Project Settings."

Additionally, if you want more control or to animate your splash screen, you would typically create a dedicated scene for it. This scene could include animations, progress bars, or other custom logic before transitioning to the main part of your game.

Here's how you might set up a simple animated splash screen manually:

  1. Create a new scene with a Node as the root.
  2. Add a Sprite node as a child and set its texture to your splash image.
  3. Optionally add AnimationPlayer to animate the sprite or add additional functionality.
  4. In the script attached to the root node of your splash scene, define the duration of the splash screen and connect a signal to change the scene when the animation is done or after a timeout.
extends Node func _ready(): # Assuming the animation length is 3 seconds, # you would wait for it to finish before changing the scene. yield(get_tree().create_timer(3.0), "timeout") get_tree().change_scene("res://path_to_your_main_scene.tscn") # If you're using an AnimationPlayer, you could connect its "animation_finished" # signal to a method that changes the scene instead.

Remember to set this splash scene as the main scene in "Project Settings" under the "Application/Run" category by setting the "Main Scene" to your splash scene's .tscn file.

Was this content helpful?

White Paper

Free System Design on AWS E-Book

Download this early release of O'Reilly's latest cloud infrastructure e-book: System Design on AWS.

Free System Design on AWS E-Book

Start building today 

Dragonfly is fully compatible with the Redis ecosystem and requires no code changes to implement.