I'm somewhat new to Unity, so I'd like to hear some more experienced thoughts on this. I'm using C# if that helps.
I'm currently working on an arcade game somewhat similar to "Doodle Jump" except, instead of controlling the character, you place platforms to prevent an AI character from falling.
I want to increase the speed of the game over time to make it progressively more difficult for the player. I initially tried just making the camera gradually accelerate upwards, but this made it so the character eventually doesn't fall quickly enough to keep up. Hence, I would like to increase the speed of everything in the level.
My current solution is as follows:
private void AccelerateLevel()
{
Time.timeScale += timeIncrement;
}
I call this in Update()
in the character's movement script.
However, as I understand it, this might not be consistent for different framerates - is that right? Is there a better way of doing this, or is this the best/most consistent way?