# My Cat Hops and pow

**URL:** <https://forum.makecode.com/t/my-cat-hops-and-pow/3905>\
**Category:** Arcade\
**Created:** [October 15, 2020, 9:08pm UTC](https://forum.makecode.com/t/my-cat-hops-and-pow/3905 "2020-10-15T21:08:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![PitSalas](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/pitsalas/32/1954_2.png) [@PitSalas](https://forum.makecode.com/u/PitSalas)\
**Post date:** [October 15, 2020, 9:08pm UTC](https://forum.makecode.com/t/my-cat-hops-and-pow/3905/1 "2020-10-15T21:08:21Z")

</div>

Hello guys, I would like to ask someone for help with a small error that I have in a game. I was creating the game of the cat that jumps on platforms and when I put the sprite to show the animation falling it doesn’t work The cat kind of locks up and jumps is weird, I have everything exactly as explained [https://makecode.com/\_KcpRc3RD3bVL](https://makecode.com/_KcpRc3RD3bVL)

---

<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:** [October 15, 2020, 9:35pm UTC](https://forum.makecode.com/t/my-cat-hops-and-pow/3905/2 "2020-10-15T21:35:13Z")

</div>

I’ve once had that exact problem. I fixed the glitch but now it won’t do the jumping pictures of the `CAT`

> **[PLATAFORMA parte 2.2](https://arcade.makecode.com/98883-80275-21320-43742)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

  
Here’s the link  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/4/4713e6c220e86784166d13ea8e545ca8558befac.png)  
I made the whole math remainder part into its own `if` statement. That fixed the glitch-ness but the jumping images will be the problem

---

<div class="post-metadata">

**Author:** ![livcheerful](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/livcheerful/32/3509_2.png) [@livcheerful](https://forum.makecode.com/u/livcheerful)\
**Post date:** [October 15, 2020, 11:37pm UTC](https://forum.makecode.com/t/my-cat-hops-and-pow/3905/3 "2020-10-15T23:37:26Z")

</div>

hi, @PitSalas good to see you made it to the forum! @jwunderl figured out what was wrong and made a fix here [https://makecode.com/\_KLwEtm2cc1Fv](https://makecode.com/_KLwEtm2cc1Fv) thanks, Joey!!

basically, the image for the standing cat was high up, and it would fall a bit when you made it stand. Joey’s change brought the image down to the bottom:  
before:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/b/b15b3ffe658782fe74bea19a8a7381bc79756a51.png)  
after:  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/2/23eb37877cc7e7f022c47122ce3e923b82023f5c.png)

---

<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:** [October 15, 2020, 11:42pm UTC](https://forum.makecode.com/t/my-cat-hops-and-pow/3905/4 "2020-10-15T23:42:02Z")

</div>

Yup, just a quick note on why this matters – we count collisions / overlaps based on the filled in (non-transparent) pixels in the sprite, so when the image was changed from falling to standing, the cat would now be floating a few pixels in the air; this would no longer be hitting the wall, so acceleration would change the velocity, and the `on game update` saw that and change the image to the falling version – which would hit the wall, switch back to normal, and float – causing the image to switch between the two every other frame.
