I am getting many "delta: 0.0" in my console and some lines give me "something like delta" 9.999275207519531 E-4 ", what is happening?
timer timer = new timer (); float previous time = 0.0f; timer.resume (); while (! Display.isCloseRequested () } {Timer.tick (); System.out.println ("Delta:" + (Timer, Gate Time) - Last Time); Last Time = Timer.Get Time (); Display.update ();} Display Destroy ();
at any time in your game's end Do not use Java's timer class; It is not accurate enough to use it efficiently. Instead, look for links to see some of the trusted game loops written in Java.
No comments:
Post a Comment