public void loop() {
		
		game.init();
		
		long timer = System.currentTimeMillis();
		
		long before = System.nanoTime();
		double elapsed = 0;
		double nanoSeconds = 1000000000.0 / 60.0;
		
		int ticks = 0;
		int frames = 0;
		
		while(running) {
			if (Display.isCloseRequested()) stop();
			Display.update();
			width = Display.getWidth() / scale;
			height = Display.getHeight() / scale;
			
			tick = false;
			render = false;
			
			long now = System.nanoTime();
			elapsed = now - before;
			
			if (elapsed > nanoSeconds) {
				before += nanoSeconds;
				tick = true;
				ticks++;
			}else {
				render = true;
				frames++;
			}
			
			if (tick) update();
			if (render) render();
			
			if (System.currentTimeMillis() - timer > 1000) {
				timer += 1000;
				Display.setTitle(title + " || ticks: " + ticks + " ,fps: " + frames);
				ticks = 0;
				frames = 0;
			}
		}
		exit();
	}