private void createCachedMap() {
		Graphics2D cachedTileImageGraphics = (Graphics2D) cachedTileImage.createGraphics();
		// Start x, y from 0, and draw the total amount of visible tiles.
		// But add the current viewport's x,y tiles to it and draw that tile
		// instead.
		for (int x = 0, y = 0, xPos = -cameraOffsetFromTileX; x < totalVisibleTilesWidth; x++, xPos += tileSizeWidth, y = 0) {
			for (int yPos = -cameraOffsetFromTileY; y < totalVisibleTilesHeight; y++, yPos += tileSizeHeight) {
				cachedTileImageGraphics.drawImage(tiles[x + currentVisibleTileX][y + currentVisibleTileY].image,
						xPos,
						yPos,
						null);
			}
		}
		cachedTileImageGraphics.dispose();
	}