# Lag Problems... Again

**URL:** https://forum.makecode.com/t/lag-problems-again/30720
**Category:** Arcade
**Created:** [September 20, 2024, 3:59am UTC](https://forum.makecode.com/t/lag-problems-again/30720 "2024-09-20T03:59:01Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![BlueYoshi507](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/blueyoshi507/32/32630_2.png) [@BlueYoshi507](https://forum.makecode.com/u/BlueYoshi507)
#### Post date: [September 20, 2024, 3:59am UTC](https://forum.makecode.com/t/lag-problems-again/30720/1 "2024-09-20T03:59:02Z")

</div>

i just noticed that my game is going very slow, and I think it’s because of the amount of sprites in it. Can someone tell me what can I do to improve the FPS?  
Thanks!  
[Game](https://arcade.makecode.com/S75142-18075-18107-28023) if you need it

---

<div class="post-metadata">

### Author: ![AlexK](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/alexk/32/33339_2.png) [@AlexK](https://forum.makecode.com/u/AlexK)
#### Post date: [September 20, 2024, 4:06am UTC](https://forum.makecode.com/t/lag-problems-again/30720/2 "2024-09-20T04:06:17Z")

</div>

To see if it’s the sprite count giving you trouble, turn on stats.

1. While your game is running, select **Menu**.
2. From the pause menu, move to **Show Stats**. Press **A**.  
 ![Show Stats in the Pause menu.](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/5/b/5bb423e502d572ef7e70bbb99b18287524080814.png)
3. Move to **Close** (the big red X). Press **A** again.
4. You’ll see both a FPS and a sprite counter on the screen.  
 ![Stats appearing in the simulator.](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/4/7/474552671ae8678630ccd1bdb6fe42b6fcbd0b9d.png)

I’ve let your game run for a little bit without any obvious sprite overload, but I haven’t played it for very long. Keep us posted and let us know if you’re still having difficulties.

---

<div class="post-metadata">

### Author: ![Agent008](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/agent008/32/17266_2.png) [@Agent008](https://forum.makecode.com/u/Agent008)
#### Post date: [September 20, 2024, 4:19am UTC](https://forum.makecode.com/t/lag-problems-again/30720/3 "2024-09-20T04:19:53Z")

</div>

well after I place down a certain amount it starts to lag maybe make a limit?

---

<div class="post-metadata">

### Author: ![ADM\_F](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/adm_f/32/19808_2.png) [@ADM\_F](https://forum.makecode.com/u/ADM_F)
#### Post date: [September 20, 2024, 8:23pm UTC](https://forum.makecode.com/t/lag-problems-again/30720/4 "2024-09-20T20:23:25Z")

</div>

One idea that comes to mind is when 2 Projectiles overlap Make one deleate then change the damage value of it so i still acts as 2? it would be small but it could work

another is the peashooters checking if there is somthing in there lane im not sure what the code looks like for that but if you made it so the whole lane was checked at once insted of each plant it could also remove some lag it wouldnt fix the spirte count but im not sure what could
