I want a VARIABLE platformer speed. That means, I want the speed to increase by 20 as the player goes further in the game. I want the game to speed up as the player progresses. Here is what I am doing and it works:
Platform on moved:
Player score<300: Set platform maximum speed to 375
Player score>300: Set platform maximum speed to 450
I have to add this or it won't work:
Platform on landed:
Player score<300: Set platform maximum speed to 375
Player score>300: Set platform maximum speed to 450
But, the problem is that when the player reaches 300 score, the speed DOES increase but the game starts lagging heavily (jerky movement of the platform) ONLY ON mobile not on desktop.
However, when I delete this code and run the game on mobile with CONSTANT speed (450) it doesn't lag.
Is there any other way to achieve this speed increase without the lag?