generating texture look up function based on the number of tiles created
removed old code
generate texture look up