Ok, I have the setup for this game and basicaly it reads data statements, puts them into an array for easy acces and then makes cubes on the scree. then, in the loop it updates the player object and then, after the sync, puts a square of what ever color the square is on under the player object. But all it gives me is a blank screen! Well, here it is and I hope it's easy to read.
sync on
sync rate 30
set display mode 400,300,16
setup()
dim ppos(16,12)
x = 2
y = 2
cc = 0
do
bset()
sync
eset()
loop
`****************************************************************
function setup()
for y = 1 to 12
for x = 1 to 16
read a
ppos(x,y) = a * 25
next x
next y
for y = 1 to 12
for x = 1 to 16
if a = 1 then ink rgb(0,255,0),0 ; box ppos(x,y)-25,ppos(x,y)-25,ppos(x,y),ppos(x,y)
if a = 2 then ink rgb(255,255,255),0 ; box ppos(x,y)-25,ppos(x,y)-25,ppos(x,y),ppos(x,y)
if a = 3 then ink rgb(255,255,0),0 ; box ppos(x,y)-25,ppos(x,y)-25,ppos(x,y),ppos(x,y)
next x
next y
endfunction
`****************************************************************
function bset()
ink rgb(0,0,255),0
box ppos(x,y)-25,ppos(x,y)-25,ppos(x,y),ppos(x,y)
endfunction
`****************************************************************
function eset()
ink cc,0
box ppos(x,y)-25,ppos(x,y)-25,ppos(x,y),ppos(x,y)
endfunction
data 1,1,1,1,1,1,1,3,1,1,1,1,1,1,1,0
data 1,0,0,0,2,1,1,0,1,0,0,0,2,1,1,0
data 1,0,0,2,2,1,1,0,1,0,0,2,2,1,1,0
data 1,0,0,2,2,3,1,0,1,0,0,2,2,3,1,0
data 1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,0
data 3,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0
data 1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,0
data 1,0,0,0,2,1,1,0,1,0,0,0,2,1,1,0
data 1,0,0,2,2,1,1,0,1,0,0,2,2,1,1,0
data 1,0,0,2,2,3,1,0,1,0,0,2,2,3,1,0
data 1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0
data 0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0
VARIABLES
x = The x position of the player
y = The y position of the player
cc = The current color the player is on
Any help would be appreciated.
Thanks.
"Computers in the future may weigh no more then
1.5 tons. - Popular Mechanics, 1949
