Why your Godot game lags for some players, and how to find out
The Glitchless team · November 23, 2026 · Godot 4.4 and later (the renderer and shader-compile readings came in 4.4)
Your game holds 60 fps on your machine, and a few players say it lags. They're usually right, and your machine can't show you why: it isn't their GPU, their screen or their renderer. To find out, send a short summary of how each session ran, with the device it ran on, and compare devices. The devices that run badly tell you which kind of problem it is.
This guide is about frames: stutter and a low frame rate. In a multiplayer game, players also call network delay lag, and that's measured with ping, not frames. The frame summary this guide asks your coding agent for was tested on Godot 4.7.2.
The short answer
- The usual reasons it's only some players: a slower GPU, shaders compiling the first time something is drawn (worse on phones), a renderer fallback to Compatibility on older hardware, a 120 or 144 Hz screen that halves the time a frame has, and phones that slow down as they heat up.
- Send a summary every 30 seconds of play: the typical, 95th percentile and worst frame, how many frames went over 50 ms, how many shaders compiled, and the device (OS, model, GPU, renderer after any fallback, screen refresh rate, build).
- Rank devices by their 95th percentile frame and hitches per minute. One GPU vendor at the top, one renderer, or one build: each points somewhere different.
- Match the pattern to the fix, then reproduce it on the same kind of device or renderer before you change anything.
- Time frames from the clock, not from
delta: Godot smoothsdeltaby default, which can hide a hitch.
Why only some players
A game that's smooth on one machine and not on another usually comes down to one of these:
- A slower GPU or CPU. The same frame takes longer, and anything near your machine's limit goes over theirs.
- Shaders compiling on first use. Godot compiles a pipeline the first time a material is drawn. On your GPU it may take a few milliseconds; on a mid-range phone it can freeze a frame. The stutter guide covers the fix.
- A renderer fallback. When a device can't run the renderer you chose, Godot can fall back to Compatibility, and the game looks and runs differently there. The project setting doesn't tell you;
RenderingServer.get_current_rendering_method()does. - A fast screen. At 120 Hz a frame has 8.3 ms instead of 16.7, so a game that just fits at 60 Hz stutters on a 120 Hz phone or monitor.
- Heat. Phones slow their CPU and GPU down as they warm up, so a game that starts smooth can lag after ten minutes.
- Old mobile GPUs on Compatibility. Some can't build every shader and log errors such as
exceed GL_MAX_FRAGMENT_UNIFORM_VECTORS, then carry on without the effect.
Send a frame summary with the device
Your coding agent can add an autoload that times every frame from the clock and, every 30 seconds of play, sends one summary: frame times, frames over 50 ms, shaders compiled, the scene, and the device. It sends no player ID: comparing devices doesn't need one.
A few readings need care:
- The pipeline-compile counters (Godot 4.4 and later) only count on Forward+ and Mobile, so on Compatibility they stay at 0.
- The screen's refresh rate is -1 where the OS won't say, as on the web.
- The render times are the last frame's, where the driver reports them.
Ask your coding agent
Add an autoload named LagReport (lag_report.gd) to my Godot game, for Godot 4.4 and later, that sends a summary of how the game ran every 30 seconds of play, with the device, so I can compare players: - Time each frame from the clock with Time.get_ticks_usec(), not from delta: Godot smooths delta, which can hide a hitch. Skip any gap over 1 second: the game was paused or came back from the background, so it isn't a frame. - At start, turn on render timing for the main viewport with RenderingServer.viewport_set_measure_render_time, and read the device once: version (application/config/version), os (OS.get_name()), model (OS.get_model_name()), gpu and gpu_vendor (RenderingServer.get_video_adapter_name() and get_video_adapter_vendor()), renderer (RenderingServer.get_current_rendering_method(), which is the renderer after any fallback), driver (get_current_rendering_driver_name()), refresh_hz (DisplayServer.screen_get_refresh_rate()) and cpu_cores (OS.get_processor_count()). - Every 30 seconds of play, send the device with: scene (the current scene's file path), frames (how many), frame_ms_p50, frame_ms_p95 and frame_ms_worst (to 0.1 ms), hitches (frames over 50 ms), pipeline_compiles (shaders compiled since the last summary: the change in Performance.PIPELINE_COMPILATIONS_DRAW plus PIPELINE_COMPILATIONS_SURFACE, which count only on Forward+ and Mobile), and render_cpu_ms and render_gpu_ms (the last frame's, from RenderingServer.viewport_get_measured_render_time_cpu and _gpu, to 0.01 ms). - POST each summary as JSON with a new HTTPRequest node, freed when the request completes, to an address I control: ask me for it. - Send no player ID: comparing devices doesn't need one.
Tested on Godot 4.7.2 with a 120 ms freeze put in on purpose: the summary reported a worst frame of about 122 ms and one hitch, at a typical 16.7 ms. Run in a window on a Mac, it named the GPU (Apple M3 Max (Apple9)), the vendor and a 60 Hz screen; the GPU time stayed at 0, because Godot doesn't time the GPU on Metal. Run headless, with no screen, the GPU name is empty and the refresh rate -1.
Rank the devices
Store each summary as a line of JSON. Then have your coding agent group them by GPU (or phone model where the GPU is unknown), renderer and build, worst first:
Ask your coding agent
Write a Python script, frames_by_device.py, that reads the frame summaries LagReport sent and my server stored (one JSON object per line, in the file I pass it) and ranks devices, worst first: - Group the summaries by device (gpu, or model where gpu is empty, or else os), renderer and version. - For each group, print the device, renderer and build, how many summaries it has, the median of their frame_ms_p95, hitches per minute (each summary covers 30 seconds of play) and the total pipeline_compiles. - Sort the groups by that median 95th percentile, highest first. Then run it on my stored summaries and show me the top rows.
Look at the top rows, and only at groups with enough summaries to mean something: one session on an odd laptop is a story, fifty sessions on one GPU is a pattern.
Match the pattern to the fix
| What the ranking shows | Likely cause | Where to look |
|---|---|---|
| Hitches with shader compiles above 0, worst on phones | Pipelines compiling on first use | Precompile them while loading: shader compilation |
| One GPU vendor or driver at the top, many hitches | A driver issue or a shader that's slow on that GPU | Test that vendor; try a simpler material on the effect it draws |
gl_compatibility at the top, with Forward+ or Mobile elsewhere | A renderer fallback on older hardware | Run with --rendering-method gl_compatibility on your machine |
| High p95 everywhere on phones, few hitches | Too much drawing for mobile GPUs | Draw calls and overdraw: fewer lights, MultiMesh, lower resolution |
| Only 120 or 144 Hz screens | The frame budget halved | Cap the frame rate (Engine.max_fps) or make the work fit 8.3 ms |
| Gets worse the longer a session runs | A leak, or a phone heating up | Orphan nodes in a debug build; compare the first and last summaries |
Then reproduce it before you change anything: the same kind of device, the same renderer, the same scene.
Reproduce it on your desk
- The renderer: start the game with
--rendering-method gl_compatibility(ormobile) to run the renderer the struggling players got. - The device: one-click deploy puts a debug build on an Android or iOS device on your network, and remote debugging shows the profiler and monitors from it.
- The screen: set a 120 Hz monitor to 120 Hz, or cap your own frame rate to see what fits.
- The heat: play for fifteen minutes on a phone in your hand, not on a charger on the desk.
Every player's frames, already split
The Glitchless addon for Godot (4.5 and later, open source) does this summary for every frame of every session, and merges them across players, so the 95th and 99th percentiles cover everyone, not one machine. Each hitch names its likely cause from what the slow frame measured: a pipeline compile, a scene change, a burst of new nodes, slow _process code, physics, rendering, or the GPU and OS. It splits by device tier, renderer, refresh rate, level and build, and keeps the events from just before each hitch.
Your coding agent reads it over MCP and can check its own fix: glitchless_performance gives frame times by device and level, and a build started with --glitchless-measure=10 prints its own numbers before and after a change.
Ask your coding agent
Use Glitchless to find which players my Godot game lags for. Split frame times and hitches by device and renderer with glitchless_performance, find the group that runs worst and the hitch causes behind it, fix the top one in this project, then measure the build with --glitchless-measure=10 to show the difference.
Frequently asked questions
Why does my Godot game run fine in the editor but lag for players?
The editor runs on your hardware, often with shaders already compiled from earlier runs. Players run an export on their own GPU, screen and renderer, and the first time they see each effect its shaders compile. Measure an exported build, and send a summary from players' devices.
How can I tell a GPU problem from a CPU problem?
Compare the render times with the frame time. If the GPU time is close to the frame time, the GPU is the limit; if _process and physics take most of it, it's your scripts. Godot only reports GPU time on some drivers (Vulkan and Direct3D 12), so on iPhones and the Compatibility renderer it isn't available.
Why does the game lag only after a few minutes?
Either something builds up, such as nodes that are removed but never freed (orphan nodes, visible in a debug build), or the device is getting hot and slowing down. Compare the first and last summaries of long sessions: steady numbers that suddenly drop on phones suggest heat.
Is lag in a multiplayer game the same thing?
Not always. Players also call network delay lag: it shows as other players jumping around while your own frames are smooth. Measure ping and packet loss for that, apart from frame times.
Sources
- Godot docs: Performance monitors
- Godot docs: Reducing stutter from shader (pipeline) compilations
- Godot docs: RenderingServer
- Godot docs: OS
- Godot docs: DisplayServer
- Godot docs: Command line tutorial
- Godot docs: One-click deploy
Something wrong or out of date? Email support@glitchless.gg and we'll fix it. Glitchless isn't affiliated with the Godot Foundation; product names are their owners' trademarks.