Here is a slight alteration that will make a coloured cube depending on the map value
set window on:set window size 640,480
Sync On: Sync Rate 0
backdrop off
autocam off
open to read 1,"mapB1.txt"
dim mapB1(12,16)
for x = 1 to 12
read string 1,s$
for y = 1 to 16
value = VAL(Mid$(s$,y))
mapB1(x,y) = value
next y
next x
close file 1
position camera 10,-5,-20
point camera 10,-5,0
on=1 : ` object number
for x=1 to 12
for y=1 to 16
If mapB1(x,y) = 0
blue(on)
Else
green(on)
Endif
position object on, y+3,-x+3,0
inc on,1
next y
Sync
next x
do
loop
function green(on)
make object cube on,1
color object on, rgb (0,255,0)
endfunction
function blue(on)
make object cube on,1
color object on, rgb (103,220,228)
endfunction
Nothing to see here, move along please.