hi all, I'm not exactly a newcomer to DB but I am rather stuck with this. I am playing about with a Volfied style game and cannot think how to get the screen to update when you draw your shapes. So far I have a short bit of code to draw a line where you travel and it records the co-ordinates whenever you change from moving along the x axis or y axis.
set display mode 1024,768,32,1
sync on
dim boxdraw(200,2)
path=1
boxdraw(1,0)=0
boxdraw(1,1)=0
x=0
y=0
do
dot x,y
if leftkey()=1 and x>0
if upkey()=0 and downkey()=0
left=1
if up=1 or down=1
change=1
up=0
down=0
endif
gosub changecheck
dec x
endif
endif
if rightkey()=1 and x< screen width()
if upkey()=0 and downkey()=0
right=1
if up=1 or down=1
change=1
up=0
down=0
endif
gosub changecheck
inc x
endif
endif
if upkey()=1 and y>0
if leftkey()=0 and rightkey()=0
up=1
if left=1 or right=1
change=1
left=0
right=0
endif
gosub changecheck
dec y
endif
endif
if downkey()=1 and y<screen height()
if leftkey()=0 and rightkey()=0
down=1
if left=1 or right=1
change=1
left=0
right=0
endif
gosub changecheck
inc y
endif
endif
for n=1 to path
text 0,n*8,str$(boxdraw(n,0))+" "+str$(boxdraw(n,1))
next n
sync
loop
changecheck:
if change=1
inc path
boxdraw(path,0)=x
boxdraw(path,1)=y
leftright=0
change=0
endif
return
I have no clue how to use the info to formulate the area to cut out. I assume I have to check whether a line has over lapped and include that in the data too for one thing, at the moment it just checks for direction. Has anyone done anything like this or know the correct way to go about it?
http://s6.bitefight.org/c.php?uid=103081