Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Related Rants
The time I implemented a variable timer in my game on NodeJS. I noticed it would not always run at 60 fps depending on the machine. I implemented a check to see if the fps is above or below 60. If the fps was above I added more time between each run, if it was lower I shortened the time(to a limit). Sure it is a bit hacky but it worked well. As an added bonus the check runs every loop so even if another program is started and slows down the machine, the game can speed back up to 60 fps.
rant
wk79