# Why is this guy floating

**URL:** https://forum.makecode.com/t/why-is-this-guy-floating/3059
**Category:** Help
**Created:** [August 9, 2020, 12:39am UTC](https://forum.makecode.com/t/why-is-this-guy-floating/3059 "2020-08-09T00:39:54Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![LcAtonal](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/lcatonal/32/16800_2.png) [@LcAtonal](https://forum.makecode.com/u/LcAtonal)
#### Post date: [August 9, 2020, 12:39am UTC](https://forum.makecode.com/t/why-is-this-guy-floating/3059/1 "2020-08-09T00:39:54Z")

</div>

> **[Why is this guy floating](https://arcade.makecode.com/50867-13491-78947-40456)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

  
He jumps continuously  
please stop this

---

<div class="post-metadata">

### Author: ![Dreadmask197](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/dreadmask197/32/10494_2.png) [@Dreadmask197](https://forum.makecode.com/u/Dreadmask197)
#### Post date: [August 9, 2020, 12:30pm UTC](https://forum.makecode.com/t/why-is-this-guy-floating/3059/2 "2020-08-09T12:30:07Z")

</div>

My guess is that there is huge amounts of lag because of the 10 different guns and ammo

---

<div class="post-metadata">

### Author: ![LcAtonal](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/lcatonal/32/16800_2.png) [@LcAtonal](https://forum.makecode.com/u/LcAtonal)
#### Post date: [August 9, 2020, 2:21pm UTC](https://forum.makecode.com/t/why-is-this-guy-floating/3059/3 "2020-08-09T14:21:01Z")

</div>

How do i change that

---

<div class="post-metadata">

### Author: ![Dreadmask197](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/dreadmask197/32/10494_2.png) [@Dreadmask197](https://forum.makecode.com/u/Dreadmask197)
#### Post date: [August 9, 2020, 10:07pm UTC](https://forum.makecode.com/t/why-is-this-guy-floating/3059/4 "2020-08-09T22:07:17Z")

</div>

Delete some guns

---

<div class="post-metadata">

### Author: ![Dreadmask197](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/dreadmask197/32/10494_2.png) [@Dreadmask197](https://forum.makecode.com/u/Dreadmask197)
#### Post date: [August 9, 2020, 10:07pm UTC](https://forum.makecode.com/t/why-is-this-guy-floating/3059/5 "2020-08-09T22:07:53Z")

</div>

I don’t know. I’m not smart. It might not be the guns but some flaw or bug. Just a hypothesis

---

<div class="post-metadata">

### Author: ![LcAtonal](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/lcatonal/32/16800_2.png) [@LcAtonal](https://forum.makecode.com/u/LcAtonal)
#### Post date: [August 10, 2020, 2:08am UTC](https://forum.makecode.com/t/why-is-this-guy-floating/3059/6 "2020-08-10T02:08:05Z")

</div>

I dont feel like doing so tho

---

<div class="post-metadata">

### Author: ![LcAtonal](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/lcatonal/32/16800_2.png) [@LcAtonal](https://forum.makecode.com/u/LcAtonal)
#### Post date: [August 10, 2020, 8:28am UTC](https://forum.makecode.com/t/why-is-this-guy-floating/3059/7 "2020-08-10T08:28:50Z")

</div>

![Screen Shot 2020-08-10 at 4.26.31 PM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/0/039d237c8026e7eac3ee9a754b7fffa973c4f716.png)  
The picture above shows that i won’t jump in this tilemap  
It is not the guns. That tilemap is making some weird things

---

<div class="post-metadata">

### Author: ![darzu](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/darzu/32/1882_2.png) [@darzu](https://forum.makecode.com/u/darzu)
#### Post date: [August 11, 2020, 4:51pm UTC](https://forum.makecode.com/t/why-is-this-guy-floating/3059/8 "2020-08-11T16:51:40Z")

</div>

Hey @LcAtonal, we’re not sure what the issue is yet, there’s likely a bug in the game engine. We’re tracking the problem here: [https://github.com/microsoft/pxt-arcade/issues/2320](https://github.com/microsoft/pxt-arcade/issues/2320) . We’re taking a look now and we’ll post back here with any updates.

(Awesome level and character design, btw! Very excited about this game)

---

<div class="post-metadata">

### Author: ![jwunderl](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/jwunderl/32/5308_2.png) [@jwunderl](https://forum.makecode.com/u/jwunderl)
#### Post date: [August 11, 2020, 6:45pm UTC](https://forum.makecode.com/t/why-is-this-guy-floating/3059/9 "2020-08-11T18:45:15Z")

</div>

Here’s a version that is fixed (I think) for the level you sent, there are some notes below on how to make it work on other levels that might have perf issues as well: [https://makecode.com/\_6wzUjxP0APfX](https://makecode.com/_6wzUjxP0APfX)

The main issue here is lag – if you let it sit for a while, you should see that eventually the sprite hits the ground, it’s just moving at 1 frame every second or two and so it takes a long time for it to travel ~ 50 tiles.

A big portion of that is in the number of sprites that exist; when you make the health boxes in that level, it creates a total of around 400 sprites, which is a lot more than we typically see in our games. Swapping the sprites with just using a tile overlap event instead of a sprite makes everything work again. (I only changed that for healthpacks, but you should be able to switch over the guns / armour / etc – anything where you’re just creating a sprite on top of the tile for the overlap event and not so that it moves around like an enemy).

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/3/37099dbc8600408c9b5bdc303f9e1d093e080d71.png)

There’s definitely work we can do to make the engine more performant in cases where there’s lots of sprites, and I need to double check that I follow the behavior when everything was moving slow / see if anything buggy is going on there.

---

<div class="post-metadata">

### Author: ![LcAtonal](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/lcatonal/32/16800_2.png) [@LcAtonal](https://forum.makecode.com/u/LcAtonal)
#### Post date: [August 12, 2020, 7:04am UTC](https://forum.makecode.com/t/why-is-this-guy-floating/3059/10 "2020-08-12T07:04:15Z")

</div>

Thanks! I will try it out. Inform you if there is any problem.

---

<div class="post-metadata">

### Author: ![LcAtonal](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/lcatonal/32/16800_2.png) [@LcAtonal](https://forum.makecode.com/u/LcAtonal)
#### Post date: [August 12, 2020, 8:08am UTC](https://forum.makecode.com/t/why-is-this-guy-floating/3059/11 "2020-08-12T08:08:17Z")

</div>

It actually worked!

---

<div class="post-metadata">

### Author: ![LcAtonal](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/lcatonal/32/16800_2.png) [@LcAtonal](https://forum.makecode.com/u/LcAtonal)
#### Post date: [August 12, 2020, 8:43am UTC](https://forum.makecode.com/t/why-is-this-guy-floating/3059/12 "2020-08-12T08:43:24Z")

</div>

> **[Zombie Uprising Chapter3 {Test}](https://arcade.makecode.com/16280-14265-99988-81425)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.
