protected static void runLoop() {
    if (loop) return ;
    LoadService.loadPackage("src") ;
    rendering() ;
    
    if (scenario != null) {
      scenario.updateGameState() ;
    }
    
    lastUpdate = lastFrame = timeMS() ;
    loop = true ;
    long simTime = 0, renderTime = 0, loopNum = 0 ;
    while (loop) {
      final long time = timeMS() ;
      loopCycle() ;
      //
      //  Go to sleep until the next round of updates are called for:
      try {
        final int
          frameInterval = (1000 / frameRate),
          taken = (int) (timeMS() - time),
          sleeps = Math.max(frameInterval + (SLEEP_MARGIN - taken), 0) ;
        if (sleeps > 0) Thread.sleep(sleeps) ;
        simTime += sT ;
        renderTime += rT ;
        //
        //  Print out a report on rendering/update times- if desired.
        if (++loopNum >= 100) {
          final long totalTime = simTime + renderTime ;
          if (verbose) I.say(
            "Time spent on graphics/sim/total: " +
             (renderTime / loopNum) + " / " +
             (simTime    / loopNum) + " / " +
            (totalTime / loopNum)
          ) ;
          simTime = renderTime = loopNum = 0 ;
        }
      }
      catch (InterruptedException e) {}
    }

    Display.destroy() ;
    java.lang.System.exit(0) ;
  }