>>6
I'm writing in BASIC. Here's the script I wrote:
printr "Hi."
sleep (3000)
printr "Welcome to Bootlegged Space Invaders."
sleep (3000)
printr "Are you ready?"
sleep (3000)
printr "Here we go!"
sleep (3000)
cls
dim i
for i = 0 to 9
printr 10 - i
Sleep (1000)
next
print "Blastoff!"
sleep (2000)
cls
sleep (1000)
dim x
for x = 0 to 25
cls
locate x, 12
print "*<==>"
Sleep (200)
next
cls
printr "BLAMMO!"
printr " "
sleep (3000)
printr "Captain: WTF!"
printr " "
sleep (3000)
printr "Aliens: OLOL WE HAS STOELD UR INTARNETZ"
printr " "
sleep (3000)
printr "Captain: O SHI--!"
printr " "
sleep (3000)
printr "Aliens: NO TIEMZ 2 SURVIV SO DIE PLZKTHX"
printr " "
sleep (3000)
printr "Lieutenant: Come on Captain, let's beat the shit outta these guys!"
printr " "
sleep (3000)
printr "Captain: Right! Prepare battle stations!"
printr " "
sleep (3000)
printr "Lieutenant: Move zig!"
printr " "
sleep (2000)
printr "Captain: For great justice!"
sleep (3000)
cls
sleep (2000)
print "STAGE 1: THE FINAL COUNTDOWN"
sleep (5000)
cls
dim score, lives, turretx, alienx, alieny
dim bulletx, bullety, bulletOnScreen, i
lives = 3
turretx = 19
alienx = 0
alieny = 12
bulletOnScreen = false
TextMode (TEXT_BUFFERED)
while true
if ScanKeyDown (VK_DOWN) and turretx > 0 then
turretx = turretx - 1
endif
if ScanKeyDown (VK_RIGHT) and turretx > 37 then
turretx = turretx + 1
endif
alienx = alienx + 1
if alienx > 37 then
alienx = 0
alieny = rnd () % 22 + 1
endif
if bulletOnScreen then
bullety = bullety - 1
if bullety < 1 then
bulletOnScreen = false
endif
else
if ScanKeyDown (VK_SPACE) then
bulletOnScreen = true
bullety = 22
bulletx = turretx + 1
endif
endif
cls
color (255, 255, 255)
locate 0, 0: print "Score=" + score
locate 30, 0: print "Lives=" + lives
color (255, 50, 50)
locate alienx, alieny: print "<-@->"
color (150, 150, 150)
locate turretx, 23: print "||"
if bulletOnScreen then
color (255, 255, 50)
locate bulletx, bullety: print "*"
endif
if bulletOnScreen and bullety = alieny and bulletx >= alienx and bulletx <= alienx + 4 then
color (255, 255, 100)
for i = 1 to 10
locate alienx, alieny: print "*BIF*"
DrawText ()
Sleep (50)
locate alienx, alieny: print "***"
Sleep (50)
next
bulletOnScreen = false
alienx = 0
alieny = rnd () % 22 + 1
score = score + 100
sleep (1000)
endif
DrawText ()
sleep (75)
wend
As you can see, there's the intro to the level "THE FINAL COUNTDOWN", and then I start writing about variables and the actual game code. I have a suspicion that it doesn't agree with the variables not being addressed at the beginning of the code, but I tried putting them there and it didn't make a difference. So...I'm not sure what to do.