My android game has only one scene. Under one Node2D (/root/Game/Node2D) I have all the game play itself, under another Node2D (/root/Game/Node2D) I have a GameOver screen. The GameOver screen is static, it has 2 sprites and a label with a tween to animate the scale and a sound.
When it's game over, my game sends a "gameover" signal, and the game over function picks the signal, changes the game Node2D.visible to false and the GameOver Node2D.visible to true.
Running this on a fast phone is immediate. If I run this on a older phone, the game freezes the image and I start to hear the sound. When the image finally changes to the Game Over screen, the tween animation is almost done and the sound it's complete.
I thought this could be related to resources, yet, the game is doing solid 60fps and, what's more strange, when I play again (2nd run on the same load) it doesn't freeze at all - looks like it cached something. But I load nothing for the GameOver screen, everything is defined in the editor.
I've tried using direct function call instead of signals, it's the same behaviour. I've tried threads, I've tried having a "while" loop in the GameOver function to do nothing while the game's Node2D is visible - but the property changes immediately to visible = false although it continues to show, preventing my game over screen to appear.
I'm out of ideas. Can someone please help?