# Animation not working in this code

**URL:** <https://forum.makecode.com/t/animation-not-working-in-this-code/15506>\
**Category:** Help\
**Tags:** extension\
**Created:** [September 22, 2022, 7:19pm UTC](https://forum.makecode.com/t/animation-not-working-in-this-code/15506 "2022-09-22T19:19:25Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Vegz78](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/vegz78/32/1201_2.png) [@Vegz78](https://forum.makecode.com/u/Vegz78)\
**Post date:** [October 9, 2023, 10:03pm UTC](https://forum.makecode.com/t/animation-not-working-in-this-code/15506/3 "2023-10-09T22:03:26Z")

</div>

Here’s the updated link to the topic about sprite size vs smooth movements:

> [@Sprites other than 16x16 move unsmoothly?](https://forum.makecode.com/t/sprites-other-than-16x16-move-unsmoothly/23181):
>
> To get some better practice with MakeCode Arcade sprite movements and animations, I have recently been playing around with the [following help request from](https://forum.makecode.com/t/animation-not-working-in-this-code/15506) @jaturn68. What I might have discovered(at least on my computers and browsers), and which baffled me, is that using the regular controller.moveSprite(vx, vy) function on a 16x16 sprite gives silky smooth movement on the x axis with any sprite image and at arbitrary vx speeds, while movement gets choppy for irregularly or different sized sprit…

Perhaps this very thread could work as _the_ best practice example, where @richard / the @makecode team / someone on this forum enhances/optimizes @jaturn68’s code to work fluently with animations in all directions and for all actions, and rewrite the code to be:

- both _efficient and more readable_,
- with _silky smooth movements and animations_, and
- immune to _hang-ups and strange behavior_ resulting from hammering many buttons at the same time?

---

_[View the full topic](https://forum.makecode.com/t/animation-not-working-in-this-code/15506)._
