37 · UI/UX · 2D and 3D

Pause and time scale

Freeze the game, not the menu.

Pausing is usually done by setting the game's time scale to 0, and slow motion by setting it below 1. Everything that should stop must use scaled time, and everything that must keep working, like the pause menu, buttons and music, must use real (unscaled) time. Mix them up and the menu freezes along with the game.

P pause↑↓ time scaleU menu on game time / real timeTap the scene to pause

Try this: Pause with P, then switch the menu to Game time with U: the menu freezes too. Drag time scale to 0.25 for slow motion.

Game time 0.0 sReal time 0.0 s

Pause the game.

Prompt bit

Works for 2D or 3D in any engine (Unity, Unreal, Godot, web). Paste the short one for a quick fix, or the detailed one when you want it done properly.

Pause by setting time scale to 0: gameplay, physics and cooldowns use scaled delta time, the pause menu, tweens, input and music use unscaled time, and clear the 0.1 s jump buffer on pause so resuming never fires a stale jump.

41 words · one sentence to paste as is

Where it's used

Common mistakes

Pause menus animated on scaled time (they freeze at 0), gameplay timers on real time so cooldowns keep counting while paused, inputs pressed during pause firing on resume, and hit stop or slow motion resetting the scale back to 1 during a pause.

Writing this with an AI assistant? See our best AI coding assistants for game developers.

Missing a concept? Request one.

Related concepts

New concepts, in your inbox.

One short email when we add new concepts, plus our weekly roundup of AI tools for game devs. Unsubscribe any time.