How to increase movement while maintaining jump distance.

Hi,

I have a question about increasing the players movement speed (ie max wlak speed) over time, while maintaining consistent jumping distance.

Strange question, here is an exmaple. In a game like temple run, the character runs faster over time, however, when the character jumps, the distance covered during the jump is the same, he is just in the air for a shorter amount of time. By doing this, holes in the level that you need to jump over stay a consistent size.

If you were to just increase the players run speed, they would jump farther as their speed increases, so if there were adjuacent two holes in the ground to jump over with a platform in the middle, at some point the player would jump over the platform and into the second hole.

One method I could imagine keeping a consistent set up is to scale the tick rate so everything just happens faster… However, I dont know how to do that (or if it is possible).

EDIT: I should add that in addition to jump distance, I would also like to have the maximum jump height remain consistent. That is, the character would still be able to jump over obstacles independent of how fast or slow he is running.

Does anyone have any ideas of a solution or how it is accomplished in games like temple run or subway surfers?

Thanks!

Have you thought about changing the gravity scale of the player itself. It may take some tinkering but the idea might be worth exploring. The higher the gravity the less time the player is in the air and can not travel as far.

Hmm thats an interesting idea. I think it would work in the example I gave, but it occurred to me that I would have another problem.

In addition to jumping distance, the character still needs to jump over other objects, so the jump height would have to remain the same. If I increase the gravity, the characters jump height would be reduced.

Im sorry I left that concern out of my original post.

Thats a good point. I didn’t consider the initial jump height. Maybe you could scale that too.

I know it might just be taking the easy way out. But for an endless runner I made I decided to use the time dilation instead of increasing speed. This made the character act like it was moving faster while maintaining the same type of movement as at a slower speed. I will say it has some faults to it but for what I was doing it was the most simple. I couldn’t get the proper jump height, gravity, and speed throughout a constant speed increase.

I also understand I’m about 3 years late. But in case someone else is seeking an answer.

1 Like