Hello,
Possibly an incredibly silly question, but I'm going to make it and risk the flames anyhoo
I'm waiting on the two handson volumes being delivered from amazon, so I've been learning through some tutorials online..
I've been putting this in to a crappy space invaders clone to try things out.
One thing I've noticed, is that whenever a bullet is fired, the background flashes, as though its resyncing the background. I'm gathering this is because I have 'paste image 2,0,0 actually inside the main game loop, but when I move this to just before the do, it well, refuses to show it
Any help would possibly save both my head and my desk.
Cheers,
cls rgb (0,0,0)
xaxis = 320
sync off
load image "background.bmp",2
load image "player.bmp",1
load image "bullet.bmp",3
do
paste image 2,0,0
sprite 1,xaxis,400,1
if leftkey() = 1 then xaxis = xaxis - 1
if rightkey() = 1 then xaxis = xaxis + 1
if xaxis<0 then xaxis=0
if xaxis>580 then xaxis=580
If Spacekey()=1 Then Gosub MoveBullet
loop
MoveBullet:
BulletPosX = xaxis + 20
BulletPosY = 400-16
For N=BulletPosY To 0 Step -1
paste image 2,0,0
sprite 3,BulletPosX,N,3
sync
Next N
Return