Skip to article Developer portalAdd your game

GAMENIGHT / DOCUMENTATION

Performance

A GameNight PC is often a living-room machine, not a gaming rig, and it runs the lobby next to your game. This page collects what our own games learned about staying smooth there. Numbers come from those games; they are examples, not guarantees.

Pick the renderer for the weakest machine

In Godot, gl_compatibility runs on the most hardware and is what Ballkickers, Spellstorm, Downhill Rush and Bombing Bugs use. Forward+ looks better but needs a capable GPU; choose it on purpose and measure it on a modest one. A game that also runs on phones can develop on the Mobile renderer, so every day of development tests the renderer players will get.

The compatibility renderer has low per-object light limits. Raise rendering/limits/opengl/max_lights_per_object and max_renderable_lights when you need more, and split large floors into chunks so each chunk only receives the lights near it.

Load everything before Ready

Prepare happens while the game is hidden. After ready, the Godot SDK throttles a hidden game to 10 frames a second so it does not slow the lobby, so anything still loading after Ready loads slowly. Do the heavy work first:

Smooth motion on 120 Hz TVs

When physics runs at 60 ticks and the screen at 120 Hz, moving characters judder or appear twice. Turn on physics interpolation (physics/common/physics_interpolation), and make the camera follow the interpolated positions rather than the raw physics ones.

Keep heavy work off the frame

Draw less

Hidden and paused cost nothing

While warming or paused, a game shares the PC with the lobby. Stop simulation, disable extra viewports, cap the frame rate and mute audio. Use the game clock for effects and tweens too, so smoke and sound freeze with the game. The Godot GameNightScreen helper does the window, frame rate and master bus; the simulation is yours.

Measure

Headless runs (--headless) don't render, so they say nothing about frame rate. Use them for logic, and real windows for performance.