pub fn tile_index_to_2d(flat: usize, tiles_x: usize) -> (usize, usize)
Convert a flat tile index back to (tile_x, tile_y) for a grid with tiles_x columns.
(tile_x, tile_y)
tiles_x