Guys, I recently made UNSLOW for the Polymars x ScoreSpace Speed Jam, and I learned an important lesson about game programming.
Use Delta Timing.
Basically, this just means that you multiply movements by how much time each frame takes. So a guy running the game at 50 fps might move 0.2 meters in one frame, while a guy running the game at 100 fps might move 0.1 meters per frame. But they all move at a consistent speed of 10 meters per second.
Please, if you are a beginning game developer, make sure to do this. I am a beginner too, and I was working on a slow computer. I realized that leaving out delta timing made my game unplayable on fast computers.
Delta timing can get messy if you have physics such as falling. In this case you need a bit of maths and calculus to help you. For example, the vertical distance y fallen by an object in freefall during a given time t will be given by the formula y=0.5 * a * t^2 + v * t where a is the gravitational acceleration and v is the initial falling velocity. You can use formulas like these to make delta timing be cleaner and more consistent across devices.
I don't really know what I'm talking about.
Please learn from someone actually experienced, instead of my pointless yapping.
Have a great day!
Did you like this post? Tell us
Leave a comment
Log in with your itch.io account to leave a comment.