game "lags" instead of slows down
Posted: Wed Sep 28, 2011 9:59 pm
Can anybody tell me some sort of scripting that will allow something to.. say, the game is 60FPS, and theres a lot going on the game will slow down making everything slow, instead, I want the velocity (yvelocity, x+=x, etc) to not be based off a single number, but like.. well I want everything to be the same speed always, regardless of the framerate, I just don't know the mathmatics behind that. An example of what I'm trying to do would be:
I know /60 will NOT work and makes no sense but you get the point right? D:
- Code: Select all
//Original with slowdown
x+=5;
//now this would make it where
//the player would move at 5, but if 60FPS slows down to 30
//it will appear as if he's going 2.5, you know?
//what I want:
x+=5(/60);
I know /60 will NOT work and makes no sense but you get the point right? D: