https://egmatic.com/blog/scene-transitions-lag-fix

Scene Transitions Lag Fix: Optimize Your Game Flow

July 3, 2026 · Vladislav Kovnerov · 7

A stutter at a scene transition is almost never a rendering problem. It is the frame that is supposed to draw the new scene also having to load and build it — instantiate every object, decode every asset, and run every object's initialization code, all on the main thread, in the same frame. When that work exceeds one frame's budget, the screen freezes, and the player sees a hitch.

The fix is to stop doing that work on the transition frame. There are three ways to do it, and almost every transition hitch traces back to not using one of them.

The three load patterns

PatternHow it worksWhen to useTrade-off
Blocking (synchronous)Load and instantiate everything on the transition frameTiny scenes, menusFreezes for the duration of the load; fine only if it fits in a frame
Async + loading screenLoad on a background thread, show a loading screen or fade, swap when readyLarge scenes, level loadsPlayer sees a loading screen
Preloaded / streamedStart loading the next scene during the current one's idle timeOpen worlds, adjacent levelsUses more memory; needs careful budgeting

Most games use all three. Menus block (they are small); level loads use a loading screen; an open world streams the next chunk in quietly during play.

Fix 1 — Load asynchronously, not on the transition frame

This is the single highest-impact change. Stop asking the engine to load the next scene in the same call that swaps to it, and let it load in the background instead.

Unity gives you SceneManager.LoadSceneAsync. It returns an AsyncOperation whose progress climbs from 0 to 0.9 as the scene loads. Set allowSceneActivation to false and the scene will preload without swapping; flip it back to true when you are ready to show it. Pass LoadSceneMode.Additive to load the next scene alongside the current one, then unload the old scene yourself — this is the standard pattern for keeping a persistent "managers" scene loaded while gameplay scenes swap in and out beneath it. (One real gotcha: with allowSceneActivation set to false, progress caps at 0.9 and only completes when you re-enable activation — a loading bar that sticks at 90% is almost always this flag, not a real stall.)

Godot gives you ResourceLoader.load_threaded_request to start loading a PackedScene on a background thread. Poll load_threaded_get_status until it reports completion, retrieve the result with load_threaded_get, and then either change_scene_to_file or instantiate it yourself. The official "Background loading" tutorial walks through exactly this pattern for showing an animated loading screen.

Whichever engine, the principle is the same: the loading happens off the transition frame, so the frame that draws the new scene only has to draw it.

Fix 2 — Hide the remaining work behind a loading screen or fade

Even with async loading, the final activation — instantiating the scene's objects and running their first-frame code — still costs something. If you cannot make that cost small, hide it. A fade-to-black, a static loading image, or an animated spinner gives the engine a frame or several frames where the player is not looking at gameplay, so a brief stall goes unnoticed.

This is not a hack — it is the intended design. Loading screens exist because the work of building a scene is real and the player would rather see a progress bar than a frozen frame. Pair the screen with the async load above and the player sees smooth motion the whole time.

Fix 3 — Pool your objects

Instantiation is one of the most expensive things you can do on the main thread, and destruction is worse: it hands work to the garbage collector, and a GC spike on the first frame of the new scene is a classic cause of a hitch right after a transition that looked fine.

Object pooling fixes both. Keep a ready-made set of objects in memory — bullets, enemies, particles, UI elements, anything that appears constantly — and reuse them instead of creating and destroying them each time. When a bullet is fired, you activate a pooled bullet; when it hits, you deactivate it and return it to the pool. No instantiation at the transition, no garbage collection after it.

Pool the things the scene is going to spawn a lot of. Pooling everything is a waste of memory; pooling nothing leaves the spawn cost on the frame.

Fix 4 — Reduce the scene's first-frame cost

Async loading and pooling move work off the transition frame, but you can also shrink the work itself. The usual suspects:

Profile before you optimize. A transition hitch could be the load, the instantiation, the activation, or the first-frame GPU work, and the fix is different for each.

Common mistakes

MistakeSymptomFix
Loading on the transition frameOne long freeze exactly at the swapLoad asynchronously; preload or use a loading screen
Instantiating everything in Awake/_readyHitch as objects activateMove heavy init off the first callback; initialize lazily
No object poolingGC spike right after the transition, stutter on spawnPool frequently-spawned objects
Uncompressed / oversized assetsLong load times, memory pressureCompress and right-size textures and audio
No loading screenThe hitch is fully visible to the playerFade or loading screen to mask remaining work
Optimizing before profilingYou fix the wrong costProfile the transition; find where the time actually goes

How Egmatic fits

Transition problems are easiest to catch when you can see them the instant they appear. With a live preview, you trigger a scene change and watch the frame timing in the same window — no build step between spotting the hitch and testing the fix. Because the engine underneath is cross-platform, the transition you tune on desktop is the one that ships on mobile and console, where a smaller CPU budget makes every saved millisecond more visible. For the broader performance mindset — profiling first, fixing the real cost — see Blueprint Performance Issues: 7 Optimization Tricks, and for the visual side of moving between scenes, 2D Scene Design Guide: How to Create Stunning Visuals.

The bottom line

A transition stutter is a scheduling problem, not a graphics problem. Stop loading and building the next scene on the frame that draws it: load asynchronously, hide whatever remains behind a fade or loading screen, pool the objects the scene spawns, and move heavy initialization off the first callback. Profile the transition to find where the time actually goes — load, instantiation, activation, or first-frame GPU work — and fix that. Do these and your scene changes stop freezing and start flowing.

FAQ

Why does my game stutter when changing scenes?

Because the frame that is supposed to draw the new scene is also the frame that loads and builds it. Instantiating every object, decoding assets, and running each object's initialization callback all happen on the main thread, and if that work exceeds one frame's budget the screen freezes. The fix is to move that work off the transition frame — load asynchronously before the swap, or hide it behind a loading screen.

How do I load a scene asynchronously in Unity?

Use SceneManager.LoadSceneAsync instead of LoadScene. It returns an AsyncOperation whose progress field climbs from 0 to 0.9 as the scene loads; set allowSceneActivation to false to let it preload without swapping, then set it back to true when you are ready. Pass LoadSceneMode.Additive if you want to load the next scene alongside the current one and unload the old one yourself.

How do I load a scene in the background in Godot?

Use ResourceLoader.load_threaded_request to start loading a PackedScene on a background thread, poll load_threaded_get_status until it reports done, then retrieve it with load_threaded_get and call change_scene_to_file or instantiate it. The Godot documentation covers this exact pattern under 'Background loading.' It lets you show an animated loading screen while the next scene builds.

Should I use a loading screen or preloading?

Use a loading screen when the next scene is too big to finish during the previous scene's idle time — the screen hides the remaining work. Use preloading (loading the next scene in the background during gameplay) when scenes are small enough to finish before the player reaches the transition, so the swap is instant and no loading screen is needed. Most games use both, depending on the scene.

What is object pooling and how does it help transitions?

Object pooling keeps a ready-made set of objects in memory and reuses them instead of creating and destroying them each time. At a scene transition, instantiation is one of the most expensive things you can do on the main thread, and destruction triggers garbage collection that can freeze the next frame. Pooling the objects that appear constantly — bullets, enemies, particles, UI — removes both spikes.

Does GameMaker support asynchronous scene loading?

Not in the same way. GameMaker's room_goto is synchronous — the next room loads on the main thread before the next frame. To avoid a visible hitch in large rooms, keep rooms small, pool instances, move heavy work out of the Create event, or use an intermediate 'loading room' that shows a frame before switching to the heavy one.