private void runGameLoop(BufferedImage image, Graphics2D graphics, int width, int height) {
		double lastTime = System.nanoTime();
		double currentTime = System.nanoTime();

		while (true) {
			currentTime = System.nanoTime();

			double dt = (currentTime - lastTime) / 500000000;

			if (!isPaused) {
				currentSystem.passTime(dt);

				spaceMouseAdapter.updateScreenMomentum();
			}

			currentSystem.drawOn(graphics, width, height, spaceMouseAdapter.getOffsetX(), spaceMouseAdapter.getOffsetY());

			// draw the menu on top of the current system
			if (isPaused) {
				spaceMenu.drawOn(graphics);
			}

			spacePanel.draw(image, width, height);

			lastTime = currentTime;
		}
	}