optimizations on tilemap