White screen before building

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.

The first thing they would point out is that we use an old version of GLFW :slight_smile:

But you have a point, I’m pretty sure there’s something we can do to use the clear color set in game.project immediately when we start (I thought we did this already)

Color is read here on engine init:

But we open the window earlier:

Perhaps we can pass in a clear color when the window is opened?

3 Likes

Which part of the engine should I paste these codes into? Thanks! Btw I want to ask if other users using the engine on Windows have ever experienced this behavior too…