White screen before building

Hi, here’s another build issue. Build works well, but my game always runs after a white screen which appears for about a second and then turns off automatically. At first, I just let it go lightly, but I’m getting more and more concerned. Is there any solution? Thanks

This probably happens because your main collection contains a lot of resources that need to be loaded. What I recommend you to do is to have a minimal main collection (like a splash screen) that leads your main collection.

You can see an example of this here with a small loader collection that proceeds to load a menu:

Also note that you should be able to change the default colour in game.project from white to something else. Defold project settings

But the same thing happens when I create an empty desktop template project and run it right away…


When I build, this screen comes out for about 0.5 seconds.

Then the white screen disappears automatically and the normal game turns on again. The feature of this white screen is that the project name does not appear on the top of the game.

Can you please try to bundle an executable in release mode? The delay could be caused by the connection that is established between the editor and engine when you build and run from the editor.

I’ve tried, but the same thing happened when I released it in a bundle. Even if I run exe after the release, it appears like this before the game runs.

Just to confirm: Did you select Release from the drop-down in the bundle dialog?

Course I did…

Sorry, I thought this problem got better, but it still bothers me. I think it’s similar to this case. White flash on startup - Questions - Defold game engine forum Is it because of the engine?

Can you please bundle a release mode version of your game and try that? Does it behave the same way?

Unfortunately… It does :cold_sweat:

Does this also happen with an empty project?

Yeah, it does. Even empty projects…

Ok, hmm, if this happens in a release build (important!) then something in the OS is preventing the window from opening as fast as we want to. You’re on Windows right?

Yes I’m on Windows. And it’s happening both in release build and in f5 start.

This happens in our games as well as blank projects on Windows. Flash of white before clearing with the color we want (black). Maybe it’s caused by the glClearColor clear function not being called at all until the game sim begins, and in that time it just draws white for Windows. And no matter how small the project there is still some time necessary for init on Windows before game sim begins. Or it’s something in GLFW which draws white on Windows until it’s told otherwise (maybe glfwSwapBuffers isn’t being called until gamesim begins). Since the source for it all is up on GitHub, could ask the GLFW people directly if they have an idea of the cause for why all Defold games on Windows are being white flashing stun grenades on launch.

3 Likes

Good point. But is it possible that this behavior only happens when running Defold engine, not other applications? For example, games made with Defold downloaded from itch.io have never had this behavior. Only the things I built are like this.

Can you link an example?

Are you using any extensions? I can see a black flash on iOS as well before the clear color and I still need to fully investigate, but I think that might be an extension.

I’m not using any extensions because I believed that extensions are only temporary solutions and that something in the pc would be set incorrectly.

All the Defold games of itch work fine.