How to Fix Lag in Scratch Projects
By Senty ยท Updated October 4, 2026
Scratch targets 30 frames per second. When a project runs below that, motion looks choppy and inputs feel late. Two problems cause most lag: too much work per frame, or time spent in the Scratch interpreter.
Work through the steps below in order. The first steps are free. The later steps change the project.
Step 1: Run the project in TurboWarp
TurboWarp compiles the scripts to JavaScript before the project starts. The compiler removes most of the per-block overhead. The TurboWarp documentation reports 10 to 100 times faster results on heavy projects.
This costs nothing. Open the project here, or paste its ID into the box on the home page. If the project still stutters, the work per frame is the problem.
Step 2: Turn on turbo mode
Turbo mode runs every loop many times per frame instead of once. It behaves like a "run without screen refresh" block for the whole project.
- In Scratch: hold Shift and click the green flag, or open Edit > Turn on Turbo Mode.
- In TurboWarp: open Edit > Turn on Turbo Mode.
Turbo mode is not safe for every project. A project that counts frames to keep time will run faster than the author intended. Test the project after you turn it on.
Step 3: Try interpolation before 60 FPS
Interpolation smooths sprite motion between frames. Scripts still run at the normal rate, so the project keeps its timing.
Do not use interpolation on these projects:
- 3D projects and raytracers.
- Pen projects, because interpolation cannot move pen strokes.
- Projects that are already slow. Interpolation adds work and slows them more.
Interpolation can add up to one thirtieth of a second of input delay. Complex scrolling platformers may show small graphical glitches.
Step 4: Change the frame rate only when the project supports it
The 60 FPS option runs scripts 60 times per second instead of 30. A script that moves a sprite one step per frame now moves it 60 steps per second instead of 30. Most projects break with this option.
Use 60 FPS when you wrote the project for it. The correct way is delta time: measure the time between frames and scale motion by it. TurboWarp also accepts a custom rate from 1 to 250. A value of 0 follows the screen refresh rate and may stop when the tab is hidden.
Step 5: Reduce clones
Scratch allows at most 300 clones at once. A project that creates clones in a loop and never deletes them will slow down, then stop creating clones.
- Delete clones when they leave the screen or finish their job.
- Reuse a small pool of clones for bullets or coins instead of creating one each time.
- Do not create a clone on every frame.
- Keep particle effects small. Hundreds of particle clones cost more than they look.
TurboWarp's Infinite Clones setting removes the 300 limit. Use it only when a project needs more clones and your device can handle them. More clones always cost more performance.
Step 6: Cut down drawing and collision work
Drawing and collision checks cost the most. Look for these in your project:
- Many "touching" checks each frame. Check the player against a few important sprites, not every sprite.
- Large costumes and full-screen effects. Scaling and color effects make the browser work harder.
- Pen projects that draw thousands of points per frame. Draw less, or stamp a costume instead.
- Sprite "stamping" in a loop. Stamp once and keep the result.
- Projects with hundreds of sprites. Hide sprites you do not need and stop their scripts.
Step 7: Move heavy code into a run without screen refresh block
A My Block with "run without screen refresh" checked runs its whole body before the screen updates. Put heavy loops and calculations there. The work then happens in one pass instead of one frame at a time.
Do not put a forever loop inside such a block. It freezes the project. TurboWarp's Warp Timer catches that case and drops the frame rate instead of locking up.
Step 8: Check the TurboWarp settings
Open the Settings menu in the player and review these options:
| Setting | Effect on speed |
|---|---|
| High Quality Pen | Draws more pixels. Turn it off for slow pen projects. |
| Warp Timer | Catches stuck loops but has a large performance cost. It is on by default only in the editor. |
| Infinite Clones | Removes the 300 clone limit. Only use it when needed, because more clones cost more. |
| Custom Stage Size | A larger stage means more pixels to draw. Keep 480x360 for speed. |
| Remove Fencing | May slightly improve performance in some projects, and may break others. |
| Remove Miscellaneous Limits | Removes sound and pen limits. It does not make a project faster by itself. |
| Disable Compiler | Turns the compiler off. Use it only while editing a project, never while playing one. |
Step 9: Fix the project itself
- Stop scripts you do not need. Use "stop this script" and the stop sign.
- Add a short wait to scripts that do not need to run every frame.
- Avoid a forever loop that checks a condition on every frame. Use a broadcast or a "wait until" block instead.
- Split a very long script into smaller scripts that take turns.
- Precompute values in a list instead of recalculating them in a loop.
- Keep the number of backdrop and costume switches per frame low.
If the project is not yours, you need a remix to fix it.
Frequently asked questions
- What causes lag in Scratch?
- Two common causes: the project does too much work in one frame, or the project wastes time in the Scratch interpreter. Clones, touching checks, and drawing cause the first. Many running scripts cause the second.
- Does turbo mode break timing?
- Yes, if the project uses the frame rate as a clock. Animations can run too fast. Test the project after you turn turbo mode on.
- Should I use 60 FPS or interpolation?
- Try interpolation first. It keeps script speed the same and only smooths motion. The 60 FPS option doubles how often scripts run, so most projects break with it.
- Why is a project faster on TurboWarp than on Scratch?
- TurboWarp compiles scripts to JavaScript instead of interpreting blocks at runtime. The compiler removes the interpreter overhead.
- What does Warp Timer do?
- It checks run-without-screen-refresh loops for long or endless work and lowers the frame rate instead of freezing. It fixes crashes but has a large performance cost. It is on by default in the TurboWarp editor.
- Can I fix lag without changing the project?
- Sometimes. A faster browser, a smaller stage, and turning off High Quality Pen can help. Large gains usually need changes inside the project.
Sources
- TurboWarp documentation: How TurboWarp runs Scratch projects 10-100x faster
- TurboWarp documentation: 60 FPS (Custom FPS)
- TurboWarp documentation: Interpolation
- TurboWarp documentation: Infinite Clones
- TurboWarp documentation: Warp Timer
- TurboWarp documentation: High Quality Pen
- TurboWarp documentation: Remove Fencing
- TurboWarp documentation: Remove Miscellaneous Limits
- TurboWarp documentation: Disable Compiler
- Scratch Wiki: Turbo Mode
- Scratch Wiki: Cloning (300 clone limit)
- Scratch Wiki: My Blocks (run without screen refresh)