Steam
BlogContact
<- back

Dev-Log: Screen Transition Improvements

3/26/2026

I've been able to improve screen transition performance drastically. Moving into a big screen used to have stutters of up to 50ms, meaning that the frame that you go into a screen would take 50ms. This is much longer than a frame should take. Now there is no additional frame delay when going into screens of any size, meaning that the frame rate stays a constant smooth rate.

First: Results!

This is before. First is the screen transition frame itself. In the top graph you can see the red bar being the frame, and you can see that the frame takes 54ms. Below you can see the game in action and the stutter when moving between the large screen.

Now after my changes! As you can see the frame now takes as much time as any other frame (around 15ms in this case) and the stutter in the game footage is gone!

Now onto how I achieved this.

First of all, some necessary details on how my game works. My game is made in Godot so the implementation details will be specific to that. My game loads neighboring screens in a separate thread whenever you enter a new screen. The loaded screens get stored for later use.

My previous setup was that I have a SubViewport that renders my game and a list of inactive nodes that store the neighboring screens. Whenever the player moved into a new screen the previous screen would be removed from the SubViewport and the new screen would be moved into the SV. Moving these large screens around was what caused the hiccups.

My new solution inverts this approach. I have a list SubViewports. The active screen is in one of them and the neighboring screens are in the other ones. Only the one SV with the active screen renders anything the other ones are disabled (meaning they have their Update Mode set to 'Disabled'). Whenever the player moves into a neighboring, screen instead of the screen being moved, I now only move the player. The player gets put into the SV of the screen and the SV gets set as the active one. Thats all that needs to happen now. This is much more performant since the player is a lot less complex than the screens, so moving it around in the scene tree is much simpler.

That's it, thanks for reading. I'm happy with how smooth my game runs now :)

For any further questions feel free to contact me.

-soraslove
<- back