# Freeze game

**URL:** <https://forum.makecode.com/t/freeze-game/1397>\
**Category:** Help\
**Created:** [March 13, 2020, 5:34pm UTC](https://forum.makecode.com/t/freeze-game/1397 "2020-03-13T17:34:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![codebott578](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/codebott578/32/690_2.png) [@codebott578](https://forum.makecode.com/u/codebott578)\
**Post date:** [March 13, 2020, 5:34pm UTC](https://forum.makecode.com/t/freeze-game/1397/1 "2020-03-13T17:34:03Z")

</div>

i tried to code something but it freeze when it got overlapped. it is in the b portal. is there anyways i could fix it?

> **[dark dungeons v2.1](https://arcade.makecode.com/19386-20361-72945-73054)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

**Author:** ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)\
**Post date:** [March 13, 2020, 7:58pm UTC](https://forum.makecode.com/t/freeze-game/1397/2 "2020-03-13T19:58:27Z")

</div>

The issue is the repeat block you have in the code. Creating 10000000 sprites all at once will freeze your game for sure!

Here’s an example of a way you could have the boss create projectiles periodically instead of all at once:

 ![Screen Shot 2020-03-13 at 12.56.24 PM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/1X/a01d4a2e7fdaf446df8036db23a833e985afd339.png)

---

<div class="post-metadata">

**Author:** ![codebott578](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/codebott578/32/690_2.png) [@codebott578](https://forum.makecode.com/u/codebott578)\
**Post date:** [March 13, 2020, 8:53pm UTC](https://forum.makecode.com/t/freeze-game/1397/3 "2020-03-13T20:53:51Z")

</div>

oh! i see it now. i’ll try it

---

<div class="post-metadata">

**Author:** ![codebott578](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/codebott578/32/690_2.png) [@codebott578](https://forum.makecode.com/u/codebott578)\
**Post date:** [March 13, 2020, 9:08pm UTC](https://forum.makecode.com/t/freeze-game/1397/5 "2020-03-13T21:08:46Z")

</div>

it works but is there a way that the fireball can -1 health

---

<div class="post-metadata">

**Author:** ![codebott578](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/codebott578/32/690_2.png) [@codebott578](https://forum.makecode.com/u/codebott578)\
**Post date:** [March 14, 2020, 5:52pm UTC](https://forum.makecode.com/t/freeze-game/1397/6 "2020-03-14T17:52:13Z")

</div>

hello?

---

<div class="post-metadata">

**Author:** ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)\
**Post date:** [March 16, 2020, 6:10pm UTC](https://forum.makecode.com/t/freeze-game/1397/7 "2020-03-16T18:10:13Z")

</div>

@codebott578 you want to add an overlap event between “player” and “fireball” and then inside that event destroy the fireball and decrement a life. Check out the “Space Destroyer” game on the home page which does something similar
