Increasing player speed with movement?

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

1 Like

Use change (velocity x) by (num)

Hi! I just worked on a project 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

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

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

1 Like