# FPS drop!

**URL:** https://forum.makecode.com/t/fps-drop/27127
**Category:** Help
**Created:** [February 20, 2024, 8:34pm UTC](https://forum.makecode.com/t/fps-drop/27127 "2024-02-20T20:34:09Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Josef](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/josef/32/12457_2.png) [@Josef](https://forum.makecode.com/u/Josef)
#### Post date: [February 20, 2024, 8:34pm UTC](https://forum.makecode.com/t/fps-drop/27127/1 "2024-02-20T20:34:09Z")

</div>

My FPS has been dropping even to 1fps( 😱) Sprites go to even 2000+ and infinitly rise.  
@MakeCode help?

> **[PLATY](https://arcade.makecode.com/S41179-86620-24913-68485)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

### Author: ![WoofWoof](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/woofwoof/32/32523_2.png) [@WoofWoof](https://forum.makecode.com/u/WoofWoof)
#### Post date: [February 22, 2024, 5:38pm UTC](https://forum.makecode.com/t/fps-drop/27127/2 "2024-02-22T17:38:23Z")

</div>

You’re probably spawning a new sprite every (on game update) as soon as that moonrock() variable = 1 2 or 3. I would recommend making a variable that keeps track of whether or not the sprite is spawned and only spawning one if it hasn’t already spawned one. You could just make a variable called SpriteIsSpawned = False at the start, then make SpriteIsSpawned = True when you spawn a sprite. Then you could only let sprites spawn if SpriteIsSpawned = False. You could make multiple different variables for different sprites.

---

<div class="post-metadata">

### Author: ![Josef](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/josef/32/12457_2.png) [@Josef](https://forum.makecode.com/u/Josef)
#### Post date: [February 23, 2024, 7:08pm UTC](https://forum.makecode.com/t/fps-drop/27127/3 "2024-02-23T19:08:14Z")

</div>

Could you help me fix it?idk how to fix 😅

---

<div class="post-metadata">

### Author: ![Josef](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/josef/32/12457_2.png) [@Josef](https://forum.makecode.com/u/Josef)
#### Post date: [February 26, 2024, 5:48pm UTC](https://forum.makecode.com/t/fps-drop/27127/4 "2024-02-26T17:48:08Z")

</div>

the moonrock() variable is to keep track if you’ve collrcted the moonrock.
