# Increasing player speed with movement?

**URL:** <https://forum.makecode.com/t/increasing-player-speed-with-movement/11602>\
**Category:** Help\
**Created:** [January 4, 2022, 5:13pm UTC](https://forum.makecode.com/t/increasing-player-speed-with-movement/11602 "2022-01-04T17:13:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nicky](https://avatars.discourse-cdn.com/v4/letter/n/f0a364/32.png) [@Nicky](https://forum.makecode.com/u/Nicky)\
**Post date:** [January 4, 2022, 5:13pm UTC](https://forum.makecode.com/t/increasing-player-speed-with-movement/11602/1 "2022-01-04T17:13:01Z")

</div>

Hello  
I want to make a side scroller where the player gradually increases speed as they hold down the right key. So they move to the right and gradually get faster. I can’t find this covered in any tutorial and I’m not sure how to make it happen. I’ve tried watching some racing tutorials thinking people would surely make racing games where the cars go gradually faster. However all I can find are games where a separate button instantly changes the speed.  
If anyone can help me with this I’d appreciate it so much!  
Thanks, Nicky

---

<div class="post-metadata">

**Author:** ![jackal](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/jackal/32/19506_2.png) [@jackal](https://forum.makecode.com/u/jackal)\
**Post date:** [January 4, 2022, 6:38pm UTC](https://forum.makecode.com/t/increasing-player-speed-with-movement/11602/2 "2022-01-04T18:38:10Z")

</div>

Use change (velocity x) by (num)

---

<div class="post-metadata">

**Author:** ![Kiwiphoenix364](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/kiwiphoenix364/32/14368_2.png) [@Kiwiphoenix364](https://forum.makecode.com/u/Kiwiphoenix364)\
**Post date:** [January 4, 2022, 10:49pm UTC](https://forum.makecode.com/t/increasing-player-speed-with-movement/11602/3 "2022-01-04T22:49:42Z")

</div>

Hi! I just worked on a [project](https://forum.makecode.com/t/how-can-i-make-sonic-go-upside-down-without-falling/11456) that involved velocity similar to what you are describing. I just made a project with only the basics (by deleting all of the other physics that I had coded into the sonic demo). It’s right here

> **[Acceleration Physics Engine!](https://arcade.makecode.com/32540-74009-51739-43093)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

You can edit the code or put it into your own game

---

<div class="post-metadata">

**Author:** ![Nicky](https://avatars.discourse-cdn.com/v4/letter/n/f0a364/32.png) [@Nicky](https://forum.makecode.com/u/Nicky)\
**Post date:** [January 6, 2022, 5:30pm UTC](https://forum.makecode.com/t/increasing-player-speed-with-movement/11602/4 "2022-01-06T17:30:36Z")

</div>

Wow thank you so much! This is exactly what I was looking for.
