Fix lag while editing?

I’ve been working on the brawl stars pvz themed game and it’s been getting really laggy. At first google couldn’t take it anymore so I switched my browser to arc, and currently the offline makecode editor, but it’s still lagging while in the blocks editing space. Also takes like 15 secs to load the game preview after editing it a while. Any suggestions to fix?

1 Like

Ah yeah, that’s classic “MakeCode Arcade gets heavy when the project grows” syndrome :sweat_smile:. When your project has tons of blocks, sprites, animations, and logic, both the previewer and the block editor start to slow down because it’s running everything in the browser or offline runtime. Here’s how to tackle it:


1. Split your project

  • Make smaller “modules” or extensions for different parts of your game (like Brawl Stars units, PVZ plants, projectiles).
  • Only include the module you’re actively working on in the main project. This reduces the amount of code the editor has to keep track of.

2. Limit the number of sprites running

  • Too many active sprites or constantly updating animations in the preview can kill performance.
  • Try to remove or destroy sprites that aren’t needed right now.

3. Use smaller images

  • Large 16x16, 24x24 sprites are fine, but hundreds of them with multiple frames will slow things down.
  • Reduce frame count in animations if possible.

4. Keep logic efficient

  • Avoid giant onUpdate loops that run every frame doing heavy calculations.
  • Use events (onOverlap, onButtonPressed) instead of checking conditions every single frame when possible.

5. Browser vs. Offline Editor

  • Offline editor can be faster, but make sure it’s the latest version.
  • Browsers like Arc or Chrome might still lag if the project is huge. Sometimes splitting and working on smaller parts is the only real fix.

6. Preview tweaks

  • When the preview lags, close the blocks tab temporarily and just test your game.
  • You can also pause animations or reduce updates while editing.