hi i have partly don my game but i cant get the score to appear, iam thinking that maybe it is workin just the text aint displayin, can someone have a look cos its doin my head in, cheers john
SYNC ON
SYNC RATE 0
CLS 50
lastbulletfired = timer()
ROF = 2
ROF = 1000 / ROF
maxbullets = 80
rem length = 5
dim Bullets(maxbullets, 3)
gunposition = Screen Width() / 30
gunlength = Screen Height() / 10
gunspeed = 10
bulletspeed = 20
currentbullet = 1
score = 0
gameover = 0
xpos = RND(600)+20
ypos = 0
RANDOMIZE TIMER()
playerimage = 10
level = 0
yposmax = 480
yposmin = 0
xposmax = 640
xposmin = 0
gravity = 5
life = 100
rem gosub start
rem gosub play
rem gosub guncontroll
rem gosub playercontroll
rem gosub firingcontroll
rem gosub bulletcontroll
rem gosub gfx
rem gosub offscreen
rem gosub makeenemy
rem gosub collision
rem gosub background
REM ****************************************************
start:
if level = 0 then gosub introduction
return
introduction:
TEXT 20,450, "START : space twice"
suspend for key
IF spacekey() = 1 then gosub play
IF spacekey() = 1 then level = level + 1
return
play:
do
gosub guncontroll
gosub playercontroll
gosub firingcontroll
gosub bulletcontroll
gosub gfx
gosub offscreen
gosub makeenemy
gosub collision
gosub background
loop
return
guncontroll:
if leftkey() = 1 then gunposition = gunposition - gunspeed
if rightkey() = 1 then gunposition = gunposition + gunspeed
return
playercontroll:
LOAD IMAGE "C:\WINDOWS\Desktop\darkbasic\player1.bmp",1
sprite 1, (gunposition) - 20, 455,1
IF leftkey() = 1 then gunposition = gunposition - gunspeed
IF rightkey() = 1 then gunposition = gunposition + gunspeed
return
firingcontroll:
if spacekey() = 1
if bullets(currentbullet, 3) 1
if lastbulletfired maxbullets
currentbullet = 1
endif
endif
endif
endif
return
bulletcontroll:
for a = 1 to maxbullets
if bullets(a, 3) = 1
bullets(a, 2) = bullets(a, 2) - (bulletspeed + 20)
endif
next a
return
gfx:
LOAD IMAGE "C:\WINDOWS\Desktop\darkbasic\player1.bmp",3
line gunposition, screen height() - gunlength, gunposition, screen height()
sprite 3, bullets(a, 1), bullets(a, 2)- bulletspeed,3
for a = 1 to maxbullets
if bullets(a, 3) = 1
sprite 3, bullets(a, 1)-20, bullets(a, 2)- bulletspeed,3
endif
next a
return
offscreen:
for a = 1 to maxbullets
if bullets(a, 2)