I’m trying to keep movement in my application steady even if the FPS doesn’t remain steady, and it turns out that I managed to create steady jerking instead… how does everyone here deal with timing issues caused by System.currentTimeMillis() having return values in increments of 50 or so (on windows). I’m hoping there is a standard way to handle this without requiring native code and with some level of reliability.
If no one has a good alternative I’ll probably try and use a seperate thread to control all the data changes that happen between frames using Thread.sleep to take short naps and update values, as I understand it Thread.sleep is accurate as low as 1 ms, and the only risk I run is the machine gets too busy and the thread doesn’t get to run (basically nothing would move and the same scene would display constantly). I would prefer to pass in the amount of time into any function that handles changes to my scene though.