public static void saveGame() {
		try {
			File save = new File(CFG.DIR, "saves/" + new SimpleDateFormat("'Spielstand' dd.MM.yyyy HH-mm-ss").format(new Date()) + ".save");
			save.createNewFile();
			
			JSONObject o = new JSONObject();
			
			o.put("version", CFG.VERSION);
			o.put("created", Game.currentGame.worldCreated);
			o.put("width", Game.world.width);
			o.put("height", Game.world.height);
			o.put("tile", new BASE64Encoder().encode(Compressor.compressRow(Game.world.getData())));
			o.put("resources", Game.currentGame.resources.getData());
			o.put("researches", Game.currentGame.researches);
			o.put("wave", WaveManager.wave);
			o.put("time", WaveManager.nextWave);
			
			JSONArray entities = new JSONArray();
			for (Entity e : Game.world.entities) {
				if ((e instanceof Forester) || (e instanceof Woodsman)) continue; // don't save them, because they get spawned by the house upgrades
				
				entities.put(e.getData());
			}
			o.put("entities", entities);
			
			Compressor.compressFile(save, o.toString());
			//			Helper.setFileContent(new File(save.getPath() + ".debug"), o.toString());
			Game.currentGame.state = 3;
			JOptionPane.showMessageDialog(Game.w, "Spielstand erfolgreich gespeichert.", "Speichern erfolgreich", JOptionPane.INFORMATION_MESSAGE);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}