Most of the way through making the tilemap rendering algorithem.