' This program reads data in the form of a level, ' and stores it in an array. worldwidth = 16 worlddepth = 10 blocksize = 20 dim world(worldwidth, worlddepth) sw = worldwidth * blocksize sd = worlddepth * blocksize x1 = (screen width / 2) - (sw / 2) y1 = (screen height / 2) - (sd / 2) x2 = (screen width / 2) + (sw / 2) y2 = (screen height / 2) + (sd / 2) resize console x1, y1, x2, y2 cls forecolor 65535, 0, 0 for y = 1 to worlddepth for x = 1 to worldwidth read world(x, y) next x next y ' Now I'll draw it... for y = 1 to worlddepth for x = 1 to worldwidth if world(x, y) then select case world(x, y) case 1 forecolor 65535, 0, 0 case 2 forecolor 0, 65535, 0 case 3 forecolor 0, 0, 65535 ' You can add more colours if you need to. end select rect (x - 1) * blocksize, (y - 1) * blocksize, ((x - 1) * blocksize) + blocksize, ((y - 1) * blocksize) + blocksize end if next x next y wait button disable done : end Data 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 Data 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 Data 1,0,2,0,0,0,0,0,0,0,0,0,0,0,0,1 Data 1,0,0,2,0,0,0,0,0,0,0,0,0,0,0,1 Data 1,0,0,0,2,0,0,0,0,0,0,0,0,0,0,1 Data 1,0,0,0,0,2,0,0,0,0,0,3,3,3,0,1 Data 1,0,0,0,0,0,2,0,0,0,0,0,0,0,0,1 Data 1,0,0,0,0,0,0,2,0,0,0,0,0,0,0,1 Data 1,0,1,1,0,0,0,0,2,0,0,0,0,0,0,1 Data 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1