I have coded a very simple left right scroller, however, the bugger is flickering horrendously. This is on DBPro Patch3 Demo.
Can anyone see anyway of making it run nice and smooth. One thing I have noticed is when I got an error at one point, the executable pointed me to the line of the source code, can I assume the Demo does not compile the code, but instead just interprets?
Eddie.
set display mode 640,480,32
load bitmap "ballgrid.bmp",2
get image 1,0,0,32,32
get image 2,32,0,64,32
get image 3,64,0,96,32
get image 4,96,0,128,32
delete bitmap 2
create bitmap 1,1920,480
rem create bitmap 0,800,600
set current bitmap 1
for XPos=0 to 14
for YPos = 0 to 59
paste image rnd(3)+1,ypos*32,Xpos*32
next ypos
next xpos
set current bitmap 0
XLoc = 500
playerspeed = 2
sync on
sync rate 30
mainloop:
rem check for player move
if leftkey() then gosub moveleft
if rightkey() then gosub moveright
sync
goto mainloop
moveleft:
xloc=xloc-playerspeed
copy bitmap 1, xloc, 0, xloc+639, 479,0,0,0,639,479
return
moveright:
xloc=xloc+playerspeed
copy bitmap 1, xloc, 0, xloc+639, 479,0,0,0,639,479
return