Sync updateMult with frame time

Co-authored-by: r3cp3ct <45179536+r3cp3ct@users.noreply.github.com>
Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
main
sigonasr2, Sig, Sigo 3 years ago committed by GitHub
parent 8a46cb56a6
commit b5e5e1c611
  1. BIN
      bin/RabiClone.jar
  2. 3
      src/sig/RabiClone.java

Binary file not shown.

@ -2,7 +2,6 @@ package sig;
import javax.swing.JFrame; import javax.swing.JFrame;
import net.java.games.input.Component;
import net.java.games.input.Controller; import net.java.games.input.Controller;
import net.java.games.input.ControllerEnvironment; import net.java.games.input.ControllerEnvironment;
@ -90,7 +89,7 @@ public class RabiClone{
while (true) { while (true) {
long timePassed = System.nanoTime()-lastGameTime; long timePassed = System.nanoTime()-lastGameTime;
lastGameTime=System.nanoTime(); lastGameTime=System.nanoTime();
double updateMult = 1/60d; double updateMult = 1/120d;
handleGameControllers(); handleGameControllers();

Loading…
Cancel
Save