# Shaky Sprite

**URL:** <https://forum.makecode.com/t/shaky-sprite/4089>\
**Category:** Help\
**Created:** [October 26, 2020, 4:35pm UTC](https://forum.makecode.com/t/shaky-sprite/4089 "2020-10-26T16:35:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kat](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/kat/32/2596_2.png) [@Kat](https://forum.makecode.com/u/Kat)\
**Post date:** [October 26, 2020, 4:35pm UTC](https://forum.makecode.com/t/shaky-sprite/4089/1 "2020-10-26T16:35:18Z")

</div>

> **[some space game](https://arcade.makecode.com/37456-17011-70130-34430)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

  
Why does it shake so much? 😰

---

<div class="post-metadata">

**Author:** ![FlintAsher](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/flintasher/32/2745_2.png) [@FlintAsher](https://forum.makecode.com/u/FlintAsher)\
**Post date:** [October 26, 2020, 8:45pm UTC](https://forum.makecode.com/t/shaky-sprite/4089/2 "2020-10-26T20:45:04Z")

</div>

The only thing i can think of is that somewhere your setting the sprite and maybe one of the frames is set bigger than the others. like if you have a 20, 30 sprite image plane and a 25, 30 image plane on the next frame the spite will be offset relative to the first frame, and so it’ll look like your sprite is shakeing. This happened to me early this year. Just make sure that your set sprite frame is the same size as all your animation frames and that they’re not triggering out of order after you stop moving.

---

<div class="post-metadata">

**Author:** ![cosmoscowboy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/cosmoscowboy/32/1718_2.png) [@cosmoscowboy](https://forum.makecode.com/u/cosmoscowboy)\
**Post date:** [October 30, 2020, 10:35pm UTC](https://forum.makecode.com/t/shaky-sprite/4089/3 "2020-10-30T22:35:50Z")

</div>

> [@Kat](#):
>
> Why does it shake so much? 😰

@FlintAsher is correct by asking to check for different sizes. You have two animations, one when not moving and one moving left. The frames when not moving are 20 x 45, however, when moving left, they are 30 x 50. Since the camera is following the player, it moves up and down based on the sizes of the animations. I would have thought though, then when the player is no longer moving, that it should just play that animation, and stop shaking.

See if you can make all the images the same size. I know it seems unnatural, since when we walk we bob up and down. You could try lifting the legs up by a few pixels and the torso down a little (like the player is doing a stomach crunch). Then when you take a step forward, you do the opposite (move the torso back up and stretch the legs. Good luck.

---

<div class="post-metadata">

**Author:** ![cosmoscowboy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/cosmoscowboy/32/1718_2.png) [@cosmoscowboy](https://forum.makecode.com/u/cosmoscowboy)\
**Post date:** [October 30, 2020, 10:53pm UTC](https://forum.makecode.com/t/shaky-sprite/4089/4 "2020-10-30T22:53:50Z")

</div>

I made the animations the same width, and the shaking is gone, but so is part of the player’s right leg 😱 If you can get the legs to move in front of each other, while keeping everything at the same dimension, then you will be OK.

> **[some space game (less shaky)](https://arcade.makecode.com/85205-24860-45886-48073)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

I was just thinking, all you need to do is, make the images not moving the same size as those moving.

---

<div class="post-metadata">

**Author:** ![cosmoscowboy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/cosmoscowboy/32/1718_2.png) [@cosmoscowboy](https://forum.makecode.com/u/cosmoscowboy)\
**Post date:** [October 30, 2020, 11:02pm UTC](https://forum.makecode.com/t/shaky-sprite/4089/5 "2020-10-30T23:02:06Z")

</div>

This works better:

> **[some space game (less shaky # 2)](https://arcade.makecode.com/93760-03129-64580-74353)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

I made the ‘not moving’ animation the same size as the ‘moving’ animation and moved the images each time to the right.
