public void render() {
		BufferStrategy bs = getBufferStrategy();
		if (bs == null) {
			createBufferStrategy(3);
			requestFocus();
			return;
		}
		
		int xScroll = player.x - WIDTH/ 2;
		int yScroll = player.y - (HEIGHT - 8) / 2;
		level.renderBackground();
		if(menu==null)player.render(lightScreen);
		level.renderSprites();

		//if (currentLevel < 3) {
		//	lightScreen.clear(0);
		//	level.renderLight(lightScreen, xScroll, yScroll);
		//	screen.overlay(lightScreen, xScroll, yScroll);
		//}

		renderGui();
		if (!hasFocus()) renderFocusNagger();

		//for (int y = 0; y < screen.h; y++) {
		//	for (int x = 0; x < screen.w; x++) {
		//		int cc = screen.pixels[x + y * screen.w];
		//		if (cc < 255) pixels[x + y * WIDTH] = colors[cc];
		//	}
		//}

		
		Graphics g = bs.getDrawGraphics();
		g.setColor(new Color(0,0,0));
		g.fillRect(0, 0, getWidth(), getHeight());
		
		renderList(pendingTileList,g);
		renderList(pendingEntityList,g);
		renderList(pendingGuiList,g);
			
		g.dispose();
		bs.show();
		
	}