public void render(int xOffset, int yOffset){

		for(int y = 0; y < height; y++){
			int yy = y + yOffset;
			if(y >= height || y < 0) break;

			for(int x = 0; x < width; x++){
				//Color c = new Color((int)(Math.random() * 255), (int)(Math.random() * 255), (int)(Math.random() * 255));
				//pixels[time + time * width] = c.getRGB();
				int xx = x + xOffset;
				if(x >= width || x < 0) break;
				
				//we use a tile index to establish tile size and when to change tile color
				int tileIndex = ((xx / TILE_SIZE) & TILE_SIZE_MASK) + ((yy / TILE_SIZE) & TILE_SIZE_MASK) * TILE_MAP_SIZE;
				pixels[x + y * width] = tiles[tileIndex];
			}
		}
	}