private void run()
	{
		isRunning = true;

		int frames = 0;
		long frameCounter = 0;

		game.init();

		double lastTime = TimeHelper.getTime();
		double unprocessedTime = 0;

		while ( isRunning )
		{
			if ( Display.wasResized() )
			{
				reshape( Display.getWidth(), Display.getHeight() );
			}
			boolean render = false;

			double startTime = TimeHelper.getTime();
			double passedTime = startTime - lastTime;
			lastTime = startTime;

			unprocessedTime += passedTime;
			frameCounter += passedTime;

			while ( unprocessedTime > frameTime )
			{
				render = true;

				unprocessedTime -= frameTime;

				if ( Window.isCloseRequested() )
					stop();

				game.input( (float) frameTime );
				Input.update();
				debug();

				game.update( (float) frameTime );

				game.physic( physicsEngine, (float) frameTime );

				if ( frameCounter >= 1.0 )
				{
					System.out.println( frames );
					frames = 0;
					frameCounter = 0;
				}
			}
			if ( render )
			{
				game.render( renderEngine );
				Window.render();
				frames++;
			}
			else
			{
				try
				{
					Thread.sleep( 1 );
				}
				catch ( InterruptedException e )
				{
					e.printStackTrace();
				}
			}
		}

		cleanUp();
	}