code: public void start () {
      if (config.activationKey != null) {
        input().keyboardEvents.connect(new Slot<Keyboard.Event>() {
          public void onEmit (Keyboard.Event event) {
            if (event instanceof Keyboard.KeyEvent) {
              Keyboard.KeyEvent kevent = (Keyboard.KeyEvent)event;
              if (kevent.key == config.activationKey && kevent.down) {
                toggleActivation();
              }
            }
          }
        });
      }
  
      // make a note of the main thread
      synchronized (this) {
        mainThread = Thread.currentThread();
      }
  
      // run the game loop
      loop();
  
      // let the game run any of its exit hooks
      dispatchEvent(lifecycle, Lifecycle.EXIT);
  
      // shutdown our thread pool
      try {
        pool.shutdown();
        pool.awaitTermination(1, TimeUnit.SECONDS);
      } catch (InterruptedException ie) {
        // nothing to do here except go ahead and exit
      }
  
      // and finally stick a fork in the JVM
      System.exit(0);
    }
docs: Starts the game loop. This method will not return until the game exits.