generates tileBGs in code