66 · Performance · 2D and 3D

Frame budget

16.7 ms to do everything, every frame.

At 60 fps every frame has 16.7 ms for input, gameplay, physics, AI, animation, rendering and audio together. Anything over the budget drops a frame. Splitting the budget between systems and measuring each one tells you what to fix, instead of guessing.

←↑↓→ or WASD moveO optimise on/off · R restartD-pad to dodge

Try this: Dodge the bullet storm for 20 seconds. As bullets pile up the frame goes over 16.7 ms and the game turns choppy. Switch to Optimised and try again.

Bullets 0Hits 0Time 0 s

Unoptimised: once the bullets cost more than 16.7 ms, frames drop and dodging gets hard.

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.

Set a frame budget: at 60 fps there are 16.7 ms per frame, so give gameplay, physics, AI, animation and rendering explicit millisecond budgets, profile on the slowest target device, and warn in the debug overlay when any frame exceeds 0.0167 s.

42 words · one sentence to paste as is

Where it's used

Common mistakes

Measuring average fps instead of frame time and spikes, profiling only on a fast PC, no per-system budgets so nobody owns the overrun, ignoring GPU time, and leaving no headroom.

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.