public void run() {
		long oldTime = System.currentTimeMillis();
		while(running) {
			
			while(paused) {
				try {
					Thread.sleep(100);
				} catch (InterruptedException e) {
					e.printStackTrace();
				}
			}
			
			for(Entity ent : engine.getEntities()) {
				if(!ent.getProperties().contains(ENTITY.NO_ACT)) {
					ent.act();
				}
			}
			engine.getStage().repaint();
			
			engine.maintain();
			
			if(System.currentTimeMillis() < oldTime + 1000/FPS) {
				try {
					Thread.sleep(oldTime + 1000/FPS - System.currentTimeMillis());
				} catch (InterruptedException e) {
					e.printStackTrace();
				}
			}
			oldTime = System.currentTimeMillis();
		}
	}