# How to fix overlapping sprites?

**URL:** <https://forum.makecode.com/t/how-to-fix-overlapping-sprites/38022>\
**Category:** Arcade\
**Created:** [July 13, 2025, 3:43am UTC](https://forum.makecode.com/t/how-to-fix-overlapping-sprites/38022 "2025-07-13T03:43:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![YanTheCat](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/yanthecat/32/23413_2.png) [@YanTheCat](https://forum.makecode.com/u/YanTheCat)\
**Post date:** [July 13, 2025, 3:43am UTC](https://forum.makecode.com/t/how-to-fix-overlapping-sprites/38022/1 "2025-07-13T03:43:18Z")

</div>

> **[Totally Normal Dungeon Game](https://arcade.makecode.com/S13263-76134-91235-53049)**
>
> Microsoft MakeCode Arcade 出品，肯定用 ❤️。

A few days ago, I posted this game, me and my brother’s first ever game, but now I want to fix this feature.

So sometimes the slimes overlap, and when you think there is only one of them, there is, in fact, tens of them, and you get insta-killed when you touch the inconspicuous stack of slimes. Reducing the spawn rate is easy enough, but how do I make it so that they don’t stack???

---

<div class="post-metadata">

**Author:** ![mmurray1019](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/mmurray1019/32/23334_2.png) [@mmurray1019](https://forum.makecode.com/u/mmurray1019)\
**Post date:** [July 15, 2025, 5:49pm UTC](https://forum.makecode.com/t/how-to-fix-overlapping-sprites/38022/2 "2025-07-15T17:49:39Z")

</div>

you could try destroying one of them when they overlap

“on sprite of type (enemy) overlaps othersprite of type (enemy)  
destroy (othersprite)”

you could also potentially use an extension to make the slimes have pathfinding. I am not experienced with doing this, and believe it could make your game extremely laggy, but would solve the problem. Either of these should work:

> **[GitHub - jwunderl/arcade-tilemap-a-star: a star implementation for tilemaps in pxt-arcade...](https://github.com/jwunderl/arcade-tilemap-a-star)**
>
> a star implementation for tilemaps in pxt-arcade ---beta

> **[GitHub - UnsignedArduino/TilemapPath: Have sprites follow paths on tilemaps in MakeCode...](https://github.com/UnsignedArduino/TilemapPath)**
>
> Have sprites follow paths on tilemaps in MakeCode Arcade!
