public void startGameLoop() {
		gameLoopRunning = true;
		new Thread(new Runnable() {

			@Override
			public void run() {
				double lastTime = System.currentTimeMillis();
				while (gameLoopRunning) {
					double current = System.currentTimeMillis();
					double elapsed = current - lastTime;
				
					game.processInput(inputEvents);
					game.update(elapsed);
					repaint();
					
					if (FPS_MAX_ON) {
						try {
							Thread.sleep(1);
						} catch (InterruptedException e) {
							e.printStackTrace();
						}
					}
					
					lastTime = current;
				}
			}
			
		}).start();
	}