private void gameLoop()
	{
		long lastTime=System.currentTimeMillis(), delta=0;
		while(isRunning)
		{
			
			//System.out.println(delta);
			update(delta/1000f);
			Graphics2D g2d=(Graphics2D)(window.getBufferStrategy().getDrawGraphics());
			g2d.fillRect(0, 0, window.getWidth(), window.getHeight());
			paint(g2d);
			g2d.dispose();
			window.getBufferStrategy().show();
			delta=System.currentTimeMillis()-lastTime;
			lastTime=System.currentTimeMillis();
			try {
				if(delta<fixedTime)
				Thread.sleep(fixedTime-delta);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}
	}