Is there a way to remove the splash screen?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Prestidigitator
:warning: Old Version Published before Godot 3 was released.

Hey! I was wondering if there was a way to remove the Godot Engine splash screen in an exported game?

:bust_in_silhouette: Reply From: CowThing

The spalsh screen can’t be removed, because that’s what shows while the engine is loading everything. You can change the image in Scene -> Project Settings -> Application -> Boot Splash

Why is it necessary to show something while the engine is loading everything? Can’t that be an option for the game developer? If you’re working in 2D with nominal assets, the load time may not be long at all.

One problem with having it is that if you change the position of the window in _ready() (for example, to center it on the screen and alter its size a bit) you get a quick flash of the splash screen in the default position before it is moved to the center. (Which kind of makes your game seem a little bit amateurish.)

Is there a way to center the splash screen window and set its size before it displays but after detecting the physical screen size?

Shavais | 2017-05-16 06:04

On modern game consoles, regardless of whether you use Godot, the splash screen that is displayed from your game package (before your code ever runs or is even loaded) is shown until you explicitly tell the console platform API to stop displaying it.

jaysistar | 2018-03-22 21:52

You can shorten how long the splash screen is shown by making your start scene as lightweight as possible, and then dynamically load the heavy main scene from here while showing whatever you want, loading animation etc.

Zylann | 2020-02-25 00:33

I assume that you resize and center the window all in the _ready() function.

if that’s true, then you’re doing it wrong.


WHY:
you resize and center the window at the same time which can cause this task to create a lag.


SOLUTION:
resize the window on the _ready() function and center the
window in the resize listener function as shown below.

EXAMPLE:

func _ready() -> void:
	OS.window_size = Vector2(1280, 720) # replacing the numbers with your desired window size

func _on_yourscenename_resized() -> void:
	OS.center_window()

if the above code does not work, then you can use the alternative below
EXAMPLE 2:

func _init() -> void:
	OS.window_size = Vector2(1280, 720) # replacing the numbers with your desired window size

func _ready() -> void:
	OS.center_window()

Hamion | 2022-02-06 12:34

:bust_in_silhouette: Reply From: jospic

You may use a black image for this in the project settings.

-j

:bust_in_silhouette: Reply From: Rafiz

I wasn’t even searching for solution to such problem, but I discovered that when I set
General->Display->Window->width/height ==> 0
it removes splash art.

Side note :
Be sure to resize your window to non-null size somewhere in script and be aware that it might look strange for end user - new window on task bar appears but nothing displays untill game loads. But if that’s what you need - take it.

That’s a really cool solution!

Yuminous | 2021-07-22 23:49

:bust_in_silhouette: Reply From: CatastrophicDInosaur

It’s a bit hacky but it’s visually possible on computers.

First Way:

In Project Settings
Go to Application → Boot Splash → Show Image and set it to false
Then go to Display → Window → Per Pixel Transparency and set Allowed and Enabled to true
Then in the same page, enable borderless
After all this you go to the first scene the game loads and any script that’s already there you add this code

func _ready():
    OS.window_borderless = false
    #optional
    OS.window_per_pixel_transparency_enabled = false

Second Way:

In Project Settings
Go to Display → Window → Test Width and set it to 0 (You can set the test height to 0 instead, or both)
Again, in the same page, enable borderless
Then add this code instead

func _ready():
    OS.window_borderless = false
    OS.window_size = Vector2(width, height)

Let me know if it works!