# Anybody know why my game is so laggy?

**URL:** <https://forum.makecode.com/t/anybody-know-why-my-game-is-so-laggy/41931>\
**Category:** Help\
**Created:** [February 6, 2026, 5:43pm UTC](https://forum.makecode.com/t/anybody-know-why-my-game-is-so-laggy/41931 "2026-02-06T17:43:49Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![YamJam](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/yamjam/32/29681_2.png) [@YamJam](https://forum.makecode.com/u/YamJam)\
**Post date:** [February 6, 2026, 5:43pm UTC](https://forum.makecode.com/t/anybody-know-why-my-game-is-so-laggy/41931/1 "2026-02-06T17:43:49Z")

</div>

Here is my game

> **[Monster survival!](https://arcade.makecode.com/S10192-54622-18780-74900)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

some people might recognize this one, and I tried to keep fixing bugs myself so I didn’t have to annoy people with the same game over and over again. But I keep seeing that my game is so laggy and that sometimes the projectiles you shoot don’t even go anywhere. Could someone please help? Thanks

---

<div class="post-metadata">

**Author:** ![redSprite](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/redsprite/32/34262_2.png) [@redSprite](https://forum.makecode.com/u/redSprite)\
**Post date:** [February 6, 2026, 10:35pm UTC](https://forum.makecode.com/t/anybody-know-why-my-game-is-so-laggy/41931/2 "2026-02-06T22:35:35Z")

</div>

It’s probably the crap-ton of sprites you create on the start of a wave  
using “show stats” the sprites skyrocket and the FPS drops.

---

<div class="post-metadata">

**Author:** ![kaleb3335](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/kaleb3335/32/16382_2.png) [@kaleb3335](https://forum.makecode.com/u/kaleb3335)\
**Post date:** [February 6, 2026, 10:37pm UTC](https://forum.makecode.com/t/anybody-know-why-my-game-is-so-laggy/41931/3 "2026-02-06T22:37:30Z")

</div>

Its so laggy because of the insane amount of sprites you have in the game at one time

in level one you have 300!!! SPRITESSS

---

<div class="post-metadata">

**Author:** ![YamJam](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/yamjam/32/29681_2.png) [@YamJam](https://forum.makecode.com/u/YamJam)\
**Post date:** [February 6, 2026, 11:56pm UTC](https://forum.makecode.com/t/anybody-know-why-my-game-is-so-laggy/41931/4 "2026-02-06T23:56:57Z")

</div>

Ohh… that makes sense, the problem is that I need a lot of sprites for you to fight, or else it’ll be really boring 🫤

---

<div class="post-metadata">

**Author:** ![kaleb3335](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/kaleb3335/32/16382_2.png) [@kaleb3335](https://forum.makecode.com/u/kaleb3335)\
**Post date:** [February 9, 2026, 4:52am UTC](https://forum.makecode.com/t/anybody-know-why-my-game-is-so-laggy/41931/5 "2026-02-09T04:52:53Z")

</div>

then don’t spawn them all at once

---

<div class="post-metadata">

**Author:** ![not\_a\_lemon](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/not_a_lemon/32/35289_2.png) [@not\_a\_lemon](https://forum.makecode.com/u/not_a_lemon)\
**Post date:** [February 9, 2026, 6:50pm UTC](https://forum.makecode.com/t/anybody-know-why-my-game-is-so-laggy/41931/6 "2026-02-09T18:50:20Z")

</div>

Here’s the trick: in a game update, detect if they are within half the screen size plus a little of the player, and if they aren’t, destroy them but use place a specific tile where they are destroyed. In the same game update, detect if you are within range of the tile, and if you are then spawn a sprite on top of it and remove the tile. This way you won’t have 300 sprites at one time in the game; it will be more like 15 or so, and to reduce lag even more you can use a variable to detect how many sprites are in the screen; if over 15 or so then don’t spawn sprites on in-screen spawn tiles. You’ll now have 300 sprites in one level, but only a few showing at once.

---

<div class="post-metadata">

**Author:** ![YamJam](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/yamjam/32/29681_2.png) [@YamJam](https://forum.makecode.com/u/YamJam)\
**Post date:** [February 9, 2026, 11:46pm UTC](https://forum.makecode.com/t/anybody-know-why-my-game-is-so-laggy/41931/7 "2026-02-09T23:46:43Z")

</div>

I already fixed this, I just made it so that the enemies die when you aren’t in range and reduced the amount that spawn. I actually did this while fixing a problem where you can just walk away and there won’t be any enemies to fight.
