# Jittery movement - Ollie and Auto clone

**URL:** https://forum.makecode.com/t/jittery-movement-ollie-and-auto-clone/26819
**Category:** Help
**Created:** [February 12, 2024, 4:51pm UTC](https://forum.makecode.com/t/jittery-movement-ollie-and-auto-clone/26819 "2024-02-12T16:51:27Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![tyzr](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/tyzr/32/13620_2.png) [@tyzr](https://forum.makecode.com/u/tyzr)
#### Post date: [February 12, 2024, 4:51pm UTC](https://forum.makecode.com/t/jittery-movement-ollie-and-auto-clone/26819/1 "2024-02-12T16:51:27Z")

</div>

Hi,

I’m trying to make the Ollie & Auto game from the live streams following it step by step, but I have a problem. The character movement is super jittery when I added the jump function. I think it has to do with the y acceleration. Without it the characters move smooth from left to right. The blocks for movement are identical to the original so I don’t know where to look.

Here is the original: [https://arcade.makecode.com/S05674-85544-39804-31460](https://arcade.makecode.com/S05674-85544-39804-31460)  
And here is my version: [https://arcade.makecode.com/S59886-36058-52515-43529](https://arcade.makecode.com/S59886-36058-52515-43529)

Please note I haven’t added B button function, and unlock doors etc. But this has no influence on the movement.

Thanks

---

<div class="post-metadata">

### Author: ![tyzr](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/tyzr/32/13620_2.png) [@tyzr](https://forum.makecode.com/u/tyzr)
#### Post date: [February 12, 2024, 10:14pm UTC](https://forum.makecode.com/t/jittery-movement-ollie-and-auto-clone/26819/2 "2024-02-12T22:14:05Z")

</div>

Ok I found the cause of the jittery movement, apparently you can’t leave a blank pixel line at the bottom of one of your frames. It messes up the collision detection at the bottom.

So if there is gravity on you character it uses the bottom pixels for collision. Is there maybe a solution for this? Like using one block or shape for collision detection for all frames and not every frame of you animated character?

---

<div class="post-metadata">

### Author: ![Jedi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/jedi/32/14307_2.png) [@Jedi](https://forum.makecode.com/u/Jedi)
#### Post date: [February 12, 2024, 10:15pm UTC](https://forum.makecode.com/t/jittery-movement-ollie-and-auto-clone/26819/3 "2024-02-12T22:15:37Z")

</div>

make sure the size of the sprite is even pixels (not 15x15, like 16x16)  
and welcome!

---

<div class="post-metadata">

### Author: ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)
#### Post date: [February 12, 2024, 10:17pm UTC](https://forum.makecode.com/t/jittery-movement-ollie-and-auto-clone/26819/4 "2024-02-12T22:17:26Z")

</div>

@tyzr there’s a simple trick to fixing this, check out my comment on this post:

> [@My Mario is teleporting](https://forum.makecode.com/t/my-mario-is-teleporting/16397/3):
>
> @Milo I think your animations are the culprit: Because you have animations that change size each frame, you might want to try creating a hidden “body sprite” that you use for all of your physics and a second “display sprite” that just animates. Here’s some example code demonstrating what I mean: The sprite on the left is actually two sprites; one is running an animation that changes size each frame and the other doesn’t animate at all. We do all of the physics/controls/overlaps etc. on the …

---

<div class="post-metadata">

### Author: ![RobbyZero](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/robbyzero/32/17188_2.png) [@RobbyZero](https://forum.makecode.com/u/RobbyZero)
#### Post date: [February 12, 2024, 10:18pm UTC](https://forum.makecode.com/t/jittery-movement-ollie-and-auto-clone/26819/5 "2024-02-12T22:18:32Z")

</div>

I guess the problem has been found but anyway welcome to our forum and if you need any further help we’re always here.

---

<div class="post-metadata">

### Author: ![tyzr](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/tyzr/32/13620_2.png) [@tyzr](https://forum.makecode.com/u/tyzr)
#### Post date: [February 13, 2024, 2:10am UTC](https://forum.makecode.com/t/jittery-movement-ollie-and-auto-clone/26819/6 "2024-02-13T02:10:38Z")

</div>

Thank you for tips and welcoming.

@richard that is exactly what I needed, thank you!

---

<div class="post-metadata">

### Author: ![AbstractDesigner](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/abstractdesigner/32/22531_2.png) [@AbstractDesigner](https://forum.makecode.com/u/AbstractDesigner)
#### Post date: [February 15, 2024, 12:51am UTC](https://forum.makecode.com/t/jittery-movement-ollie-and-auto-clone/26819/7 "2024-02-15T00:51:29Z")

</div>

Welcome to the forums @tyzr!
