60 times a sec

0 Abdirasaq Ali · September 7, 2014
Can anyone make a code in another class for loop that checks the game or system 60 times a sec

Post a Reply

Replies

Oldest  Newest  Rating
0 Brandon Elliott · September 14, 2014
check out this page

http://stackoverflow.com/questions/771206/how-do-i-cap-my-framerate-at-60-fps-in-java
0 Roody Monster · September 15, 2014
long start = System.nanoTime();
double delta = 0;
double nanoSeconds = 1000000000.0 / 60.0;
while (gameLoop) {
      long finish = System.nanoTime();
      delta = (now - lastTime) / ns;
      if (delta >= 1) {
            update();
            delta--;
      }
}





if you want to limit rendering as well, call the render method inside of the if statement
0 Abdirasaq Ali · September 16, 2014
Soon I would understand this someone shove this knowledge into me lol
0 Abdirasaq Ali · September 16, 2014
I can read it nano sec you divide it by 60 and something then you while it while the game is running then delta I don't know 
  • 1

Java / Android Development

126,690 followers
About

Very popular language used to create desktop applications, website applets, and Android apps.

Links
Moderators
Bucky Roberts Administrator