The QBasic / QB64 Discussion Forum      Other Subforums, Links and Downloads
 
 


  << Previous Topic | Next Topic >>Return to Index  

Finished! well at least as much as we are going to do

May 13 2008 at 4:33 AM
New Guy's Helper  (no login)

 

Here is our pretty much finished game!

DECLARE SUB welcome (Print$)
DECLARE SUB background (line$)
DECLARE SUB bloodinvaders (Print$)
'*** Space invaders! ****
'**** Justin Singleton, Grogan
DEFINT A-Z
SCREEN 7
CLS

'**BLOOD**
DATA 00,00,00,00,00,00,00,00,00
DATA 00,00,00,00,04,00,00,00,00
DATA 00,00,00,04,04,00,00,00,00
DATA 00,00,00,04,04,04,00,00,00
DATA 00,00,00,04,04,04,04,00,00
DATA 00,00,04,04,04,04,04,00,00
DATA 00,00,04,04,04,04,04,00,00
DATA 00,00,04,04,04,04,04,00,00
DATA 00,00,00,04,04,04,00,00,00
DATA 00,00,00,00,00,00,00,00,00

FOR y = 0 TO 9
FOR x = 0 TO 8
READ blood
PSET (x, y), blood
NEXT x
NEXT y

DIM blood%(90)
GET (0, 0)-(9, 10), blood%






'**NEEDLE**
DATA 00,00,00,00,00,00,00,00,15
DATA 00,00,00,00,15,00,15,15,00
DATA 00,00,00,00,00,15,04,15,00
DATA 00,00,00,00,15,04,15,00,00
DATA 00,15,00,15,04,15,00,15,00
DATA 00,00,15,04,15,00,00,00,00
DATA 00,00,04,15,00,00,00,00,00
DATA 00,04,00,00,15,00,00,00,00
DATA 04,00,00,00,00,00,00,00,00
DATA 00,00,00,00,00,00,00,00,00

FOR y = 0 TO 9
FOR x = 0 TO 8
READ needle
PSET (x, y), needle
NEXT x
NEXT y

DIM needle%(90)
GET (0, 0)-(9, 10), needle%


'**CROSS**
DATA 00,00,00,00,00,00,00,00,00
DATA 00,00,00,04,04,04,00,00,00
DATA 00,00,00,04,15,04,00,00,00
DATA 00,04,04,04,15,04,04,04,00
DATA 00,04,15,15,04,15,15,04,00
DATA 00,04,04,04,15,04,04,04,00
DATA 00,00,00,04,15,04,00,00,00
DATA 00,00,00,04,15,04,00,00,00
DATA 00,00,00,04,04,04,00,00,00
DATA 00,00,00,00,00,00,00,00,00

FOR y = 0 TO 9
FOR x = 0 TO 8
READ cross
PSET (x, y), cross
NEXT x
NEXT y

DIM cross%(90)
GET (0, 0)-(9, 10), cross%


CLS
PUT (166, 102), needle
PUT (95, 86), cross
PUT (192, 86), cross
PUT (82, 110), cross
PUT (221, 110), cross
PUT (132, 94), blood
'***Making the blood fall***

DO
FOR row = 94 TO 155
PUT (132, row), blood, PSET
WAIT &H3DA, 8: WAIT &H3DA, 8, 8

NEXT row

CALL bloodinvaders(Print$)
CALL background(line$)
CALL welcome(Print$)

choice$ = INKEY$
IF choice$ = "1" THEN EXIT DO
IF choice$ = "2" THEN SYSTEM

LOOP



SCREEN 7, , 1, 0

CONST MAXBULLETS = 16
AMBX = 199
DIM bullets(MAXBULLETS - 1, 1) AS INTEGER
DIM a(30, 30)'pixel array -- make it bigger for a bigger sprite

RESTORE shooterdata
FOR j = 0 TO 30
FOR i = 0 TO 30
READ a(i, j)
NEXT
NEXT

RESTORE blooddata
FOR y = 0 TO 9
FOR x = 0 TO 8
READ blood
PSET (x, y), blood
NEXT x
NEXT y


GET (0, 0)-(9, 10), blood

FOR y = 0 TO 9
FOR x = 0 TO 8
READ needle
PSET (x, y), needle
NEXT x
NEXT y


GET (0, 0)-(9, 10), needle


FOR y = 0 TO 9
FOR x = 0 TO 8
READ cross
PSET (x, y), cross
NEXT x
NEXT y


GET (0, 0)-(9, 10), cross


FOR y = 0 TO 9
FOR x = 0 TO 17
READ barrier
PSET (x, y), barrier
NEXT x
NEXT y

DIM barrier(153)
GET (0, 0)-(17, 10), barrier
ex = -24: REM start 24 spaces to the left
inc = 2

'Make each slot empty (set both coordinates to -1)
FOR bul = 0 TO UBOUND(bullets, 1)
bullets(bul, 0) = -1
bullets(bul, 1) = -1
NEXT bul

'Main loop
DO

GOSUB drawenemies
GOSUB drawbullet
GOSUB redrawbase

REM flip page
PCOPY 1, 0
REM clear original page
CLS

LOOP

drawbullet:
IF OLDAMBX <> AMBX THEN
LINE (OLDAMBX, 150)-(OLDAMBX + 35, 170 + 35), 0, BF
END IF
OLDAMBX = AMBX
'Update objects
'For each bullet
FOR bul = 0 TO UBOUND(bullets, 1)

REM Carry out routine if bullet hits a colour
IF POINT(bullets(bul, 0), bullets(bul, 1)) > 0 THEN

REM Allow for increment in drawenemies
incr = -inc
IF inc = 48 OR inc = -24 THEN incr = inc
x = ex + incr

REM Find area of screen that bullet is striking


IF bullets(bul, 0) - x < 96 THEN dead = dead + 1
IF bullets(bul, 0) - x > 95 AND bullets(bul, 0) - x < 111 THEN dead1 = dead1 + 1
IF bullets(bul, 0) - x > 110 AND bullets(bul, 0) - x < 126 THEN dead2 = dead2 + 1
IF bullets(bul, 0) - x > 125 AND bullets(bul, 0) - x < 141 THEN dead3 = dead3 + 1
IF bullets(bul, 0) - x > 140 AND bullets(bul, 0) - x < 156 THEN dead4 = dead4 + 1
IF bullets(bul, 0) - x > 155 AND bullets(bul, 0) - x < 171 THEN dead5 = dead5 + 1
IF bullets(bul, 0) - x > 170 AND bullets(bul, 0) - x < 186 THEN dead6 = dead6 + 1
IF bullets(bul, 0) - x > 185 AND bullets(bul, 0) - x < 201 THEN dead7 = dead7 + 1
IF bullets(bul, 0) - x > 200 AND bullets(bul, 0) - x < 216 THEN dead8 = dead8 + 1
IF bullets(bul, 0) - x > 215 THEN dead9 = dead9 + 1

REM This kills the bullet after it strikes
bullets(bul, 0) = -1: bullets(bul, 1) = -1
' now you can make a routine in drawenemies that stops some of the PUTS
END IF

'If it's not an empty slot
IF NOT (bullets(bul, 0) = -1 AND bullets(bul, 1) = -1) THEN

'Erase the bullet from it's old position
PSET (bullets(bul, 0), bullets(bul, 1)), 2

'Move the bullet up one pixel
bullets(bul, 1) = bullets(bul, 1) - 1

'If it's off the screen, make it an empty slot again
IF bullets(bul, 1) < 0 THEN
bullets(bul, 0) = -1
bullets(bul, 1) = -1
'Otherwise, draw it in it's new spot
ELSE
'Draw the bullet
PSET (bullets(bul, 0), bullets(bul, 1)), 15
END IF
END IF
NEXT bul

FOR j = 0 TO 30
FOR i = 0 TO 30
PSET (i + AMBX, 170 + j), a(i, j)
NEXT
NEXT

'Get user input
'------------------------------------------------------.5 sec delay between shots.
IF bulletaway! <> 0 THEN
IF ABS(TIMER - bulletaway!) > .5 THEN bulletaway! = 0
END IF
a$ = INKEY$
SELECT CASE a$
'Fire a bullet
CASE CHR$(32)
'------------------------------------------------------
IF bulletaway! = 0 THEN
bulletaway! = TIMER
FOR bul = 0 TO UBOUND(bullets, 1)

REM Avoid firing through barriers
IF AMBX > 66 AND AMBX < 83 THEN EXIT FOR
IF AMBX > 116 AND AMBX < 133 THEN EXIT FOR
IF AMBX > 166 AND AMBX < 183 THEN EXIT FOR
IF AMBX > 216 AND AMBX < 233 THEN EXIT FOR

'Create a new bullet if it's an empty slot
IF (bullets(bul, 0) = -1 AND bullets(bul, 1) = -1) THEN
bullets(bul, 0) = INT(AMBX + 9)
bullets(bul, 1) = 170
EXIT FOR
END IF
NEXT bul
END IF: '------------------------------------------------------
CASE CHR$(27)
SYSTEM
CASE CHR$(0) + CHR$(75)
IF AMBX > 0 THEN AMBX = AMBX - 5
CASE CHR$(0) + CHR$(77)
IF AMBX < 320 THEN AMBX = AMBX + 5
END SELECT
RETURN

'End program
SYSTEM

redrawbase:
'***PUT***
PUT (75, 150), barrier
PUT (125, 150), barrier
PUT (175, 150), barrier
PUT (225, 150), barrier
RETURN


drawenemies:
IF ex = 48 OR ex = -24 AND inc < 0 THEN ey = ey + 2: inc = -inc
ex = ex + inc

IF ey = 116 THEN
PRINT TAB(5); "You have been destroyed"
PRINT
PRINT "Press Esc to Exit or 1 to run again"
PCOPY 1, 0
DO
a$ = INKEY$
IF a$ = "1" THEN RUN
IF a$ = CHR$(27) THEN SYSTEM
LOOP
END IF

IF dead < 6 THEN PUT (ex + 85, ey + 0), needle
IF dead1 < 6 THEN PUT (ex + 100, ey + 0), needle
IF dead2 < 6 THEN PUT (ex + 115, ey + 0), needle
IF dead3 < 6 THEN PUT (ex + 130, ey + 0), needle
IF dead4 < 6 THEN PUT (ex + 145, ey + 0), needle
IF dead5 < 6 THEN PUT (ex + 160, ey + 0), needle
IF dead6 < 6 THEN PUT (ex + 175, ey + 0), needle
IF dead7 < 6 THEN PUT (ex + 190, ey + 0), needle
IF dead8 < 6 THEN PUT (ex + 205, ey + 0), needle
IF dead9 < 6 THEN PUT (ex + 220, ey + 0), needle

ex = ex + 10
IF dead < 5 THEN PUT (ex + 75, ey + 15), cross
IF dead1 < 5 THEN PUT (ex + 90, ey + 15), cross
IF dead2 < 5 THEN PUT (ex + 105, ey + 15), cross
IF dead3 < 5 THEN PUT (ex + 120, ey + 15), cross
IF dead4 < 5 THEN PUT (ex + 135, ey + 15), cross
IF dead5 < 5 THEN PUT (ex + 150, ey + 15), cross
IF dead6 < 5 THEN PUT (ex + 165, ey + 15), cross
IF dead7 < 5 THEN PUT (ex + 180, ey + 15), cross
IF dead8 < 5 THEN PUT (ex + 195, ey + 15), cross
IF dead9 < 5 THEN PUT (ex + 210, ey + 15), cross

ex = ex - 10
IF dead < 4 THEN PUT (ex + 85, ey + 30), blood
IF dead1 < 4 THEN PUT (ex + 100, ey + 30), blood
IF dead2 < 4 THEN PUT (ex + 115, ey + 30), blood
IF dead3 < 4 THEN PUT (ex + 130, ey + 30), blood
IF dead4 < 4 THEN PUT (ex + 145, ey + 30), blood
IF dead5 < 4 THEN PUT (ex + 160, ey + 30), blood
IF dead6 < 4 THEN PUT (ex + 175, ey + 30), blood
IF dead7 < 4 THEN PUT (ex + 190, ey + 30), blood
IF dead8 < 4 THEN PUT (ex + 205, ey + 30), blood
IF dead9 < 4 THEN PUT (ex + 220, ey + 30), blood

ex = ex + 10
IF dead < 3 THEN PUT (ex + 75, ey + 45), needle
IF dead1 < 3 THEN PUT (ex + 90, ey + 45), needle
IF dead2 < 3 THEN PUT (ex + 105, ey + 45), needle
IF dead3 < 3 THEN PUT (ex + 120, ey + 45), needle
IF dead4 < 3 THEN PUT (ex + 135, ey + 45), needle
IF dead5 < 3 THEN PUT (ex + 150, ey + 45), needle
IF dead6 < 3 THEN PUT (ex + 165, ey + 45), needle
IF dead7 < 3 THEN PUT (ex + 180, ey + 45), needle
IF dead8 < 3 THEN PUT (ex + 195, ey + 45), needle
IF dead9 < 3 THEN PUT (ex + 210, ey + 45), needle

ex = ex - 10
IF dead < 2 THEN PUT (ex + 85, ey + 60), cross
IF dead1 < 2 THEN PUT (ex + 100, ey + 60), cross
IF dead2 < 2 THEN PUT (ex + 115, ey + 60), cross
IF dead3 < 2 THEN PUT (ex + 130, ey + 60), cross
IF dead4 < 2 THEN PUT (ex + 145, ey + 60), cross
IF dead5 < 2 THEN PUT (ex + 160, ey + 60), cross
IF dead6 < 2 THEN PUT (ex + 175, ey + 60), cross
IF dead7 < 2 THEN PUT (ex + 190, ey + 60), cross
IF dead8 < 2 THEN PUT (ex + 205, ey + 60), cross
IF dead9 < 2 THEN PUT (ex + 220, ey + 60), cross

ex = ex + 10
IF dead < 1 THEN PUT (ex + 75, ey + 75), blood
IF dead1 < 1 THEN PUT (ex + 90, ey + 75), blood
IF dead2 < 1 THEN PUT (ex + 105, ey + 75), blood
IF dead3 < 1 THEN PUT (ex + 120, ey + 75), blood
IF dead4 < 1 THEN PUT (ex + 135, ey + 75), blood
IF dead5 < 1 THEN PUT (ex + 150, ey + 75), blood
IF dead6 < 1 THEN PUT (ex + 165, ey + 75), blood
IF dead7 < 1 THEN PUT (ex + 180, ey + 75), blood
IF dead8 < 1 THEN PUT (ex + 195, ey + 75), blood
IF dead9 < 1 THEN PUT (ex + 210, ey + 75), blood
ex = ex - 10


IF dead > 5 AND dead1 > 5 AND dead2 > 5 AND dead3 > 5 AND dead4 > 5 THEN
IF dead5 > 5 AND dead6 > 5 AND dead7 > 5 AND dead8 > 5 AND dead9 > 5 THEN
PRINT TAB(5); "You have saved the ambulance"
PRINT
PRINT TAB(5); "Press Enter to exit"
PCOPY 1, 0
INPUT k
SYSTEM
END IF
END IF


RETURN


'**BLOOD**
blooddata:
DATA 17,17,17,17,04,17,17,17,17
DATA 17,17,17,04,04,04,17,17,17
DATA 17,17,04,04,04,04,04,17,17
DATA 17,04,04,04,04,04,04,04,17
DATA 04,04,04,04,04,04,04,04,04
DATA 04,04,04,04,04,04,04,04,04
DATA 04,04,04,04,04,04,04,04,04
DATA 04,04,04,04,04,04,04,04,04
DATA 17,04,04,04,04,04,04,04,17
DATA 17,17,17,04,04,04,17,17,17

'**NEEDLE**
needledata:
DATA 00,00,00,00,00,00,00,00,15
DATA 00,00,00,00,15,00,15,15,00
DATA 00,00,00,00,00,15,04,15,00
DATA 00,00,00,00,15,04,15,00,00
DATA 00,15,00,15,04,15,00,15,00
DATA 00,00,15,04,15,00,00,00,00
DATA 00,00,04,15,00,00,00,00,00
DATA 00,04,00,00,15,00,00,00,00
DATA 04,00,00,00,00,00,00,00,00
DATA 00,00,00,00,00,00,00,00,00

'**CROSS**
crossdata:
DATA 15,15,15,15,15,15,15,15,15
DATA 15,15,15,04,04,04,15,15,15
DATA 15,15,15,04,04,04,15,15,15
DATA 15,04,04,04,04,04,04,04,15
DATA 15,04,04,04,04,04,04,04,15
DATA 15,04,04,04,04,04,04,04,15
DATA 15,15,15,04,04,04,15,15,15
DATA 15,15,15,04,04,04,15,15,15
DATA 15,15,15,04,04,04,15,15,15
DATA 15,15,15,15,15,15,15,15,15

'*** Barrier
barrierdata:
DATA 00,00,08,08,08,08,08,08,08,08,08,08,08,08,08,08,00,00
DATA 00,08,02,67,02,67,02,67,08,67,02,67,08,67,02,67,08,00
DATA 08,02,67,02,67,08,67,02,67,02,67,02,67,02,67,08,67,08
DATA 08,67,08,67,02,67,08,67,02,67,08,67,02,67,02,67,02,08
DATA 08,02,67,08,67,02,67,08,08,08,08,02,67,08,67,02,67,08
DATA 08,67,02,67,02,67,08,00,00,00,00,08,02,67,02,67,02,08
DATA 08,02,67,02,67,08,00,00,00,00,00,00,08,02,67,08,67,08
DATA 08,67,08,67,08,00,00,00,00,00,00,00,00,08,02,67,02,08
DATA 08,02,67,02,08,00,00,00,15,15,00,00,00,08,67,02,67,08
DATA 08,08,08,08,00,00,00,15,15,15,15,00,00,00,08,08,08,08

shooterdata:
DATA 00,00,00,00,00,00,00,00,00,04,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
DATA 00,00,00,00,00,00,00,00,00,04,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
DATA 00,00,00,00,15,00,00,04,00,04,00,04,00,00,15,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
DATA 00,00,00,00,15,15,00,04,15,04,15,04,00,15,15,00,00,00,14,04,14,00,00,00,00,00,00,00,00,00,00
DATA 00,00,00,00,15,15,15,04,04,04,04,04,15,15,15,00,00,00,04,14,04,00,00,00,00,00,00,00,00,00,00
DATA 00,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,00,00,00,00,00,00,00,00,00,00
DATA 00,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,03,17,03,15,00,00,00,00,00,00,00,00,00
DATA 00,15,15,15,15,15,15,04,04,04,04,04,15,15,15,15,15,15,03,17,03,15,00,00,00,00,00,00,00,00,00
DATA 00,15,15,15,15,15,15,04,04,04,04,04,15,15,15,15,15,15,03,17,17,15,00,00,00,00,00,00,00,00,00
DATA 00,15,15,15,15,15,15,04,04,04,04,04,15,15,15,15,15,15,03,17,03,15,00,00,00,00,00,00,00,00,00
DATA 00,15,15,15,15,15,15,04,04,04,04,04,15,15,15,15,15,15,15,15,15,15,15,15,15,15,04,14,00,00,00
DATA 00,15,15,04,04,04,04,04,04,04,04,04,04,04,04,04,15,15,15,15,15,15,15,15,15,15,14,04,14,00,00
DATA 00,15,15,04,04,04,04,04,04,04,04,04,04,04,04,04,15,15,15,15,15,15,15,15,15,15,04,14,04,00,00
DATA 00,15,15,04,04,04,04,04,04,04,04,04,04,04,04,04,15,15,15,15,15,15,15,15,15,15,14,04,14,00,00
DATA 00,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,08,08,08,00,00
DATA 00,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,08,08,00,00
DATA 00,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,08,08,08,00,00
DATA 00,15,15,15,15,15,15,04,04,04,04,04,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,08,08,00,00
DATA 00,15,15,15,15,15,15,04,04,04,04,04,15,15,15,15,15,15,15,15,15,15,15,15,15,15,08,08,08,00,00
DATA 00,15,15,15,17,17,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,17,17,15,15,15,00,00
DATA 08,06,06,17,08,08,17,06,06,06,06,06,06,06,06,06,06,06,06,06,06,04,06,17,08,08,17,06,00,00,00
DATA 08,15,17,08,08,08,08,17,15,15,15,15,15,15,15,15,15,15,15,15,15,15,17,08,08,08,08,17,00,00,00
DATA 00,00,00,08,08,08,08,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,08,08,08,08,00,00,00,00
DATA 00,00,00,00,08,08,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,08,08,00,00,00,00,00
DATA 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
DATA 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
DATA 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
DATA 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
DATA 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
DATA 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
DATA 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00

SUB background (line$)
'*** LINE ***=============================
COLOR 5, 0
LINE (1, 1)-(1, 190)
COLOR 5, 0
LINE (1, 190)-(310, 190)
COLOR 5, 0
LINE (310, 190)-(310, 1)
COLOR 5, 0
LINE (1, 1)-(310, 1)

'***Other graphics***=====================
COLOR 9, 0
LINE (4, 3)-(4, 187)
COLOR 9, 0
LINE (4, 3)-(307, 3)
COLOR 9, 0
LINE (307, 3)-(307, 187)
COLOR 9, 0
LINE (307, 187)-(4, 187)



END SUB

DEFSNG A-Z
SUB bloodinvaders (Print$)

SCREEN 7
COLOR 4, 0
LOCATE 12, 15
PRINT "B"
COLOR 15, 0
LOCATE 12, 17
PRINT "L"
COLOR 4, 0
LOCATE 12, 19
PRINT "O"
LOCATE 12, 21
COLOR 4, 0
PRINT "O"
COLOR 4, 0
LOCATE 12, 23
PRINT "D "
LOCATE 15, 13
COLOR 4, 0
PRINT "I"
LOCATE 15, 15
COLOR 4, 0
PRINT "N"
LOCATE 15, 17
COLOR 4, 0
PRINT "V"
LOCATE 15, 19
COLOR 4, 0
PRINT "A"
LOCATE 15, 21
COLOR 15, 0
PRINT "D"
LOCATE 15, 23
COLOR 4, 0
PRINT "E"
LOCATE 15, 25
COLOR 4, 0
PRINT "R"
LOCATE 15, 27
COLOR 4, 0
PRINT "S"









END SUB

SUB welcome (Print$)
LOCATE 3, 3
COLOR 5, 0
PRINT "1."; " Let's Play"
LOCATE 23, 26
PRINT "2."; " Let's Not"

END SUB

 
 Respond to this message   
AuthorReply
New Guy
(no login)

With Rem statments, And credits at the wn and defeat screen!

May 13 2008, 5:59 AM 

DECLARE SUB welcome (Print$)
DECLARE SUB background (line$)
DECLARE SUB bloodinvaders (Print$)
'*** Space invaders! ****
'**** Justin Singleton, Grogan
'****Robert Smith
DEFINT A-Z
SCREEN 7
CLS

'**BLOOD graphics**
DATA 00,00,00,00,00,00,00,00,00
DATA 00,00,00,00,04,00,00,00,00
DATA 00,00,00,04,04,00,00,00,00
DATA 00,00,00,04,04,04,00,00,00
DATA 00,00,00,04,04,04,04,00,00
DATA 00,00,04,04,04,04,04,00,00
DATA 00,00,04,04,04,04,04,00,00
DATA 00,00,04,04,04,04,04,00,00
DATA 00,00,00,04,04,04,00,00,00
DATA 00,00,00,00,00,00,00,00,00

FOR y = 0 TO 9
FOR x = 0 TO 8
READ blood
PSET (x, y), blood
NEXT x
NEXT y

'***Saves and gets the graphics from its postion, so it can later be PUT***
DIM blood%(90)
GET (0, 0)-(9, 10), blood%






'**NEEDLE graphics**
DATA 00,00,00,00,00,00,00,00,15
DATA 00,00,00,00,15,00,15,15,00
DATA 00,00,00,00,00,15,04,15,00
DATA 00,00,00,00,15,04,15,00,00
DATA 00,15,00,15,04,15,00,15,00
DATA 00,00,15,04,15,00,00,00,00
DATA 00,00,04,15,00,00,00,00,00
DATA 00,04,00,00,15,00,00,00,00
DATA 04,00,00,00,00,00,00,00,00
DATA 00,00,00,00,00,00,00,00,00

FOR y = 0 TO 9
FOR x = 0 TO 8
READ needle
PSET (x, y), needle
NEXT x
NEXT y

'***Saves and gets the graphics from its postion, so it can later be PUT***
DIM needle%(90)
GET (0, 0)-(9, 10), needle%


'**CROSS graphics**
DATA 00,00,00,00,00,00,00,00,00
DATA 00,00,00,04,04,04,00,00,00
DATA 00,00,00,04,15,04,00,00,00
DATA 00,04,04,04,15,04,04,04,00
DATA 00,04,15,15,04,15,15,04,00
DATA 00,04,04,04,15,04,04,04,00
DATA 00,00,00,04,15,04,00,00,00
DATA 00,00,00,04,15,04,00,00,00
DATA 00,00,00,04,04,04,00,00,00
DATA 00,00,00,00,00,00,00,00,00

FOR y = 0 TO 9
FOR x = 0 TO 8
READ cross
PSET (x, y), cross
NEXT x
NEXT y

'***Saves and gets the graphics from its postion, so it can later be PUT***
DIM cross%(90)
GET (0, 0)-(9, 10), cross%

'***Clears the screen and then places the graphics***
CLS
PUT (166, 102), needle
PUT (95, 86), cross
PUT (192, 86), cross
PUT (82, 110), cross
PUT (221, 110), cross
PUT (132, 94), blood
'***Making the blood fall***
'***Making sure the blood can fall and the screen still works***
'***DO and Loop
DO
FOR row = 94 TO 155
PUT (132, row), blood, PSET
WAIT &H3DA, 8: WAIT &H3DA, 8, 8

NEXT row
'***Calling the graphics required for the Main menu!***
CALL bloodinvaders(Print$)
CALL background(line$)
CALL welcome(Print$)

'***Allows the options to execute!***
'***First option begins game
'***Second option ends program
choice$ = INKEY$
IF choice$ = "1" THEN EXIT DO
IF choice$ = "2" THEN SYSTEM

LOOP

'***Page flipping
SCREEN 7, , 1, 0
'***Creates a constant for the bullets
'***Allows only 16 bullets at once on the screen
CONST MAXBULLETS = 16
AMBX = 199
'***All dimming allows the images to be saved, in this instance it is being resaved!
DIM bullets(MAXBULLETS - 1, 1) AS INTEGER
DIM a(30, 30)'pixel array -- make it bigger for a bigger sprite
'***RESTORING all graphics
RESTORE shooterdata
FOR j = 0 TO 30
FOR i = 0 TO 30
READ a(i, j)
NEXT
NEXT

RESTORE blooddata
FOR y = 0 TO 9
FOR x = 0 TO 8
READ blood
PSET (x, y), blood
NEXT x
NEXT y


GET (0, 0)-(9, 10), blood

FOR y = 0 TO 9
FOR x = 0 TO 8
READ needle
PSET (x, y), needle
NEXT x
NEXT y


GET (0, 0)-(9, 10), needle


FOR y = 0 TO 9
FOR x = 0 TO 8
READ cross
PSET (x, y), cross
NEXT x
NEXT y


GET (0, 0)-(9, 10), cross


FOR y = 0 TO 9
FOR x = 0 TO 17
READ barrier
PSET (x, y), barrier
NEXT x
NEXT y
'SAVING Barriers
DIM barrier(153)
GET (0, 0)-(17, 10), barrier
'*** start 24 spaces to the left
ex = -24:
inc = 2

'***Makes each slot empty (sets both coordinates to -1)
FOR bul = 0 TO UBOUND(bullets, 1)
bullets(bul, 0) = -1
bullets(bul, 1) = -1
NEXT bul

'***Main loop
DO
'***Brings the main sprites to the screen, other graphics, and the Bullet program!***
GOSUB drawenemies
GOSUB drawbullet
GOSUB redrawbase

'*** PAGE flipping
PCOPY 1, 0
'*** clears original page
CLS

LOOP
'***This is the GOSUB that draws the bullet and places it at the point of the ambulance turret
drawbullet:
IF OLDAMBX <> AMBX THEN
LINE (OLDAMBX, 150)-(OLDAMBX + 35, 170 + 35), 0, BF
END IF
OLDAMBX = AMBX
'Updates objects
'For each bullet
FOR bul = 0 TO UBOUND(bullets, 1)

'*** Carrys out routine if bullet hits a colour
IF POINT(bullets(bul, 0), bullets(bul, 1)) > 0 THEN

'*** Allows for increment in drawenemies
incr = -inc
IF inc = 48 OR inc = -24 THEN incr = inc
x = ex + incr

'*** Finds the area of screen that bullet is striking


IF bullets(bul, 0) - x < 96 THEN dead = dead + 1
IF bullets(bul, 0) - x > 95 AND bullets(bul, 0) - x < 111 THEN dead1 = dead1 + 1
IF bullets(bul, 0) - x > 110 AND bullets(bul, 0) - x < 126 THEN dead2 = dead2 + 1
IF bullets(bul, 0) - x > 125 AND bullets(bul, 0) - x < 141 THEN dead3 = dead3 + 1
IF bullets(bul, 0) - x > 140 AND bullets(bul, 0) - x < 156 THEN dead4 = dead4 + 1
IF bullets(bul, 0) - x > 155 AND bullets(bul, 0) - x < 171 THEN dead5 = dead5 + 1
IF bullets(bul, 0) - x > 170 AND bullets(bul, 0) - x < 186 THEN dead6 = dead6 + 1
IF bullets(bul, 0) - x > 185 AND bullets(bul, 0) - x < 201 THEN dead7 = dead7 + 1
IF bullets(bul, 0) - x > 200 AND bullets(bul, 0) - x < 216 THEN dead8 = dead8 + 1
IF bullets(bul, 0) - x > 215 THEN dead9 = dead9 + 1

'*** This kills the bullet after it strikes
bullets(bul, 0) = -1: bullets(bul, 1) = -1
END IF

'***If it's not an empty slot
IF NOT (bullets(bul, 0) = -1 AND bullets(bul, 1) = -1) THEN

'***Erases the bullet from it's old position
PSET (bullets(bul, 0), bullets(bul, 1)), 2

'***Moves the bullet up one pixel
bullets(bul, 1) = bullets(bul, 1) - 1

'***If it's off the screen, makes it an empty slot again
IF bullets(bul, 1) < 0 THEN
bullets(bul, 0) = -1
bullets(bul, 1) = -1
'***Otherwise, it is drawn in it's new spot
ELSE
'***Draw the bullet
PSET (bullets(bul, 0), bullets(bul, 1)), 15
END IF
END IF
NEXT bul

FOR j = 0 TO 30
FOR i = 0 TO 30
PSET (i + AMBX, 170 + j), a(i, j)
NEXT
NEXT

'***Get user input
'***.5 sec delay between shots.
IF bulletaway! <> 0 THEN
IF ABS(TIMER - bulletaway!) > .5 THEN bulletaway! = 0
END IF
a$ = INKEY$
SELECT CASE a$
'***Fire a bullet
CASE CHR$(32)
'***------------------------------------------------------
IF bulletaway! = 0 THEN
bulletaway! = TIMER
FOR bul = 0 TO UBOUND(bullets, 1)

'*** keeps from firing through barriers
IF AMBX > 66 AND AMBX < 83 THEN EXIT FOR
IF AMBX > 116 AND AMBX < 133 THEN EXIT FOR
IF AMBX > 166 AND AMBX < 183 THEN EXIT FOR
IF AMBX > 216 AND AMBX < 233 THEN EXIT FOR

'***Create a new bullet if it's an empty slot
IF (bullets(bul, 0) = -1 AND bullets(bul, 1) = -1) THEN
bullets(bul, 0) = INT(AMBX + 9)
bullets(bul, 1) = 170
EXIT FOR
END IF
NEXT bul
END IF:
'***------------------------------------------------------
'***Gives user control of the almbulance
'*** Variable 5 can be changed to allow for faster movement
CASE CHR$(27)
SYSTEM
CASE CHR$(0) + CHR$(75)
IF AMBX > 0 THEN AMBX = AMBX - 5
CASE CHR$(0) + CHR$(77)
IF AMBX < 320 THEN AMBX = AMBX + 5
END SELECT
RETURN

'*** System allows for End program
SYSTEM
'***this is the GOSUB redrawbase
redrawbase:
'***PUT***
PUT (75, 150), barrier
PUT (125, 150), barrier
PUT (175, 150), barrier
PUT (225, 150), barrier
RETURN

'***This is the GOSUB drawenemies
drawenemies:
IF ex = 48 OR ex = -24 AND inc < 0 THEN ey = ey + 2: inc = -inc
ex = ex + inc

'***PRINTS THE YOU HAVE BEEN DESTROYED
'***AND also prints the credits
IF ey = 116 THEN
COLOR 4, 0
PRINT TAB(5); "You have been destroyed"
PRINT
PRINT "Press Esc to Exit or 1 to run again"
PRINT
PRINT
PRINT
PRINT
PRINT
PRINT
COLOR 5, 0
PRINT "Animation By: Justin Grogan"
COLOR 15, 0
PRINT "Game Design By: Justin Singleton"
COLOR 9, 0
PRINT "Graphics Design By: Robert Smith"
PRINT
PRINT TAB(10); "Also thanks for the help"
PRINT TAB(5); "from all Qbasic sites and forums!"
PCOPY 1, 0
DO
a$ = INKEY$
IF a$ = "1" THEN RUN
IF a$ = CHR$(27) THEN SYSTEM
LOOP
END IF
'***THE INDIVIDUAL DESTRUCTION OF ALL SPRITES
IF dead < 6 THEN PUT (ex + 85, ey + 0), needle
IF dead1 < 6 THEN PUT (ex + 100, ey + 0), needle
IF dead2 < 6 THEN PUT (ex + 115, ey + 0), needle
IF dead3 < 6 THEN PUT (ex + 130, ey + 0), needle
IF dead4 < 6 THEN PUT (ex + 145, ey + 0), needle
IF dead5 < 6 THEN PUT (ex + 160, ey + 0), needle
IF dead6 < 6 THEN PUT (ex + 175, ey + 0), needle
IF dead7 < 6 THEN PUT (ex + 190, ey + 0), needle
IF dead8 < 6 THEN PUT (ex + 205, ey + 0), needle
IF dead9 < 6 THEN PUT (ex + 220, ey + 0), needle

ex = ex + 10
IF dead < 5 THEN PUT (ex + 75, ey + 15), cross
IF dead1 < 5 THEN PUT (ex + 90, ey + 15), cross
IF dead2 < 5 THEN PUT (ex + 105, ey + 15), cross
IF dead3 < 5 THEN PUT (ex + 120, ey + 15), cross
IF dead4 < 5 THEN PUT (ex + 135, ey + 15), cross
IF dead5 < 5 THEN PUT (ex + 150, ey + 15), cross
IF dead6 < 5 THEN PUT (ex + 165, ey + 15), cross
IF dead7 < 5 THEN PUT (ex + 180, ey + 15), cross
IF dead8 < 5 THEN PUT (ex + 195, ey + 15), cross
IF dead9 < 5 THEN PUT (ex + 210, ey + 15), cross

ex = ex - 10
IF dead < 4 THEN PUT (ex + 85, ey + 30), blood
IF dead1 < 4 THEN PUT (ex + 100, ey + 30), blood
IF dead2 < 4 THEN PUT (ex + 115, ey + 30), blood
IF dead3 < 4 THEN PUT (ex + 130, ey + 30), blood
IF dead4 < 4 THEN PUT (ex + 145, ey + 30), blood
IF dead5 < 4 THEN PUT (ex + 160, ey + 30), blood
IF dead6 < 4 THEN PUT (ex + 175, ey + 30), blood
IF dead7 < 4 THEN PUT (ex + 190, ey + 30), blood
IF dead8 < 4 THEN PUT (ex + 205, ey + 30), blood
IF dead9 < 4 THEN PUT (ex + 220, ey + 30), blood

ex = ex + 10
IF dead < 3 THEN PUT (ex + 75, ey + 45), needle
IF dead1 < 3 THEN PUT (ex + 90, ey + 45), needle
IF dead2 < 3 THEN PUT (ex + 105, ey + 45), needle
IF dead3 < 3 THEN PUT (ex + 120, ey + 45), needle
IF dead4 < 3 THEN PUT (ex + 135, ey + 45), needle
IF dead5 < 3 THEN PUT (ex + 150, ey + 45), needle
IF dead6 < 3 THEN PUT (ex + 165, ey + 45), needle
IF dead7 < 3 THEN PUT (ex + 180, ey + 45), needle
IF dead8 < 3 THEN PUT (ex + 195, ey + 45), needle
IF dead9 < 3 THEN PUT (ex + 210, ey + 45), needle

ex = ex - 10
IF dead < 2 THEN PUT (ex + 85, ey + 60), cross
IF dead1 < 2 THEN PUT (ex + 100, ey + 60), cross
IF dead2 < 2 THEN PUT (ex + 115, ey + 60), cross
IF dead3 < 2 THEN PUT (ex + 130, ey + 60), cross
IF dead4 < 2 THEN PUT (ex + 145, ey + 60), cross
IF dead5 < 2 THEN PUT (ex + 160, ey + 60), cross
IF dead6 < 2 THEN PUT (ex + 175, ey + 60), cross
IF dead7 < 2 THEN PUT (ex + 190, ey + 60), cross
IF dead8 < 2 THEN PUT (ex + 205, ey + 60), cross
IF dead9 < 2 THEN PUT (ex + 220, ey + 60), cross

ex = ex + 10
IF dead < 1 THEN PUT (ex + 75, ey + 75), blood
IF dead1 < 1 THEN PUT (ex + 90, ey + 75), blood
IF dead2 < 1 THEN PUT (ex + 105, ey + 75), blood
IF dead3 < 1 THEN PUT (ex + 120, ey + 75), blood
IF dead4 < 1 THEN PUT (ex + 135, ey + 75), blood
IF dead5 < 1 THEN PUT (ex + 150, ey + 75), blood
IF dead6 < 1 THEN PUT (ex + 165, ey + 75), blood
IF dead7 < 1 THEN PUT (ex + 180, ey + 75), blood
IF dead8 < 1 THEN PUT (ex + 195, ey + 75), blood
IF dead9 < 1 THEN PUT (ex + 210, ey + 75), blood
ex = ex - 10

'***If you save the ambulance prints the winning sreen
'***Prints the credits
IF dead > 5 AND dead1 > 5 AND dead2 > 5 AND dead3 > 5 AND dead4 > 5 THEN
IF dead5 > 5 AND dead6 > 5 AND dead7 > 5 AND dead8 > 5 AND dead9 > 5 THEN
PRINT
COLOR 4, 0
PRINT TAB(5); "You have saved the ambulance"
PRINT
COLOR 9, 0
PRINT TAB(5); "Y O U A R E T H E W I N N E R "
COLOR 6, 0
PRINT TAB(10); "Congratulations!!!"
PRINT
COLOR 2, 0
PRINT TAB(5); "Press Enter to exit"
PRINT
PRINT
PRINT
PRINT
PRINT
PRINT
COLOR 5, 0
PRINT "Animation By: Justin Grogan"
COLOR 15, 0
PRINT "Game Design By: Justin Singleton"
COLOR 9, 0
PRINT "Graphics Design By: Robert Smith"
PRINT
PRINT TAB(10); "Also thanks for the help"
PRINT TAB(5); "from all Qbasic sites and forums!"

PCOPY 1, 0
INPUT k
SYSTEM
END IF
END IF


RETURN


'**BLOOD GRAPHICS**
blooddata:
DATA 00,00,00,00,00,00,00,00,00
DATA 00,00,00,00,04,00,00,00,00
DATA 00,00,00,04,04,00,00,00,00
DATA 00,00,00,04,04,04,00,00,00
DATA 00,00,00,04,04,04,04,00,00
DATA 00,00,04,04,04,04,04,00,00
DATA 00,00,04,04,04,04,04,00,00
DATA 00,00,04,04,04,04,04,00,00
DATA 00,00,00,04,04,04,00,00,00
DATA 00,00,00,00,00,00,00,00,00

'**NEEDLE GRAPHICS**
needledata:
DATA 00,00,00,00,00,00,00,00,15
DATA 00,00,00,00,15,00,15,15,00
DATA 00,00,00,00,00,15,04,15,00
DATA 00,00,00,00,15,04,15,00,00
DATA 00,15,00,15,04,15,00,15,00
DATA 00,00,15,04,15,00,00,00,00
DATA 00,00,04,15,00,00,00,00,00
DATA 00,04,00,00,15,00,00,00,00
DATA 04,00,00,00,00,00,00,00,00
DATA 00,00,00,00,00,00,00,00,00

'**CROSS GRAPHICS**
crossdata:
DATA 15,15,15,15,15,15,15,15,15
DATA 15,15,15,04,04,04,15,15,15
DATA 15,15,15,04,04,04,15,15,15
DATA 15,04,04,04,04,04,04,04,15
DATA 15,04,04,04,04,04,04,04,15
DATA 15,04,04,04,04,04,04,04,15
DATA 15,15,15,04,04,04,15,15,15
DATA 15,15,15,04,04,04,15,15,15
DATA 15,15,15,04,04,04,15,15,15
DATA 15,15,15,15,15,15,15,15,15

'*** Barrier GRAPHICS***
barrierdata:
DATA 00,00,08,08,08,08,08,08,08,08,08,08,08,08,08,08,00,00
DATA 00,08,02,67,02,67,02,67,08,67,02,67,08,67,02,67,08,00
DATA 08,02,67,02,67,08,67,02,67,02,67,02,67,02,67,08,67,08
DATA 08,67,08,67,02,67,08,67,02,67,08,67,02,67,02,67,02,08
DATA 08,02,67,08,67,02,67,08,08,08,08,02,67,08,67,02,67,08
DATA 08,67,02,67,02,67,08,00,00,00,00,08,02,67,02,67,02,08
DATA 08,02,67,02,67,08,00,00,00,00,00,00,08,02,67,08,67,08
DATA 08,67,08,67,08,00,00,00,00,00,00,00,00,08,02,67,02,08
DATA 08,02,67,02,08,00,00,00,15,15,00,00,00,08,67,02,67,08
DATA 08,08,08,08,00,00,00,15,15,15,15,00,00,00,08,08,08,08

shooterdata:
DATA 00,00,00,00,00,00,00,00,00,04,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
DATA 00,00,00,00,00,00,00,00,00,04,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
DATA 00,00,00,00,15,00,00,04,00,04,00,04,00,00,15,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
DATA 00,00,00,00,15,15,00,04,15,04,15,04,00,15,15,00,00,00,14,04,14,00,00,00,00,00,00,00,00,00,00
DATA 00,00,00,00,15,15,15,04,04,04,04,04,15,15,15,00,00,00,04,14,04,00,00,00,00,00,00,00,00,00,00
DATA 00,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,00,00,00,00,00,00,00,00,00,00
DATA 00,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,03,17,03,15,00,00,00,00,00,00,00,00,00
DATA 00,15,15,15,15,15,15,04,04,04,04,04,15,15,15,15,15,15,03,17,03,15,00,00,00,00,00,00,00,00,00
DATA 00,15,15,15,15,15,15,04,04,04,04,04,15,15,15,15,15,15,03,17,17,15,00,00,00,00,00,00,00,00,00
DATA 00,15,15,15,15,15,15,04,04,04,04,04,15,15,15,15,15,15,03,17,03,15,00,00,00,00,00,00,00,00,00
DATA 00,15,15,15,15,15,15,04,04,04,04,04,15,15,15,15,15,15,15,15,15,15,15,15,15,15,04,14,00,00,00
DATA 00,15,15,04,04,04,04,04,04,04,04,04,04,04,04,04,15,15,15,15,15,15,15,15,15,15,14,04,14,00,00
DATA 00,15,15,04,04,04,04,04,04,04,04,04,04,04,04,04,15,15,15,15,15,15,15,15,15,15,04,14,04,00,00
DATA 00,15,15,04,04,04,04,04,04,04,04,04,04,04,04,04,15,15,15,15,15,15,15,15,15,15,14,04,14,00,00
DATA 00,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,08,08,08,00,00
DATA 00,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,08,08,00,00
DATA 00,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,08,08,08,00,00
DATA 00,15,15,15,15,15,15,04,04,04,04,04,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,08,08,00,00
DATA 00,15,15,15,15,15,15,04,04,04,04,04,15,15,15,15,15,15,15,15,15,15,15,15,15,15,08,08,08,00,00
DATA 00,15,15,15,17,17,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,17,17,15,15,15,00,00
DATA 08,06,06,17,08,08,17,06,06,06,06,06,06,06,06,06,06,06,06,06,06,04,06,17,08,08,17,06,00,00,00
DATA 08,15,17,08,08,08,08,17,15,15,15,15,15,15,15,15,15,15,15,15,15,15,17,08,08,08,08,17,00,00,00
DATA 00,00,00,08,08,08,08,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,08,08,08,08,00,00,00,00
DATA 00,00,00,00,08,08,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,08,08,00,00,00,00,00
DATA 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
DATA 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
DATA 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
DATA 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
DATA 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
DATA 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
DATA 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00

SUB background (line$)
'*** LINE ***=============================
COLOR 5, 0
LINE (1, 1)-(1, 190)
COLOR 5, 0
LINE (1, 190)-(310, 190)
COLOR 5, 0
LINE (310, 190)-(310, 1)
COLOR 5, 0
LINE (1, 1)-(310, 1)

'***Other graphics***=====================
COLOR 9, 0
LINE (4, 3)-(4, 187)
COLOR 9, 0
LINE (4, 3)-(307, 3)
COLOR 9, 0
LINE (307, 3)-(307, 187)
COLOR 9, 0
LINE (307, 187)-(4, 187)



END SUB

DEFSNG A-Z
SUB bloodinvaders (Print$)
'***THE PRINTING OF BLOODINVADERS
'***LOCATES ALL LETTERS AND APPLIES INDIVIDUAL COLOR!
SCREEN 7
COLOR 4, 0
LOCATE 12, 15
PRINT "B"
COLOR 15, 0
LOCATE 12, 17
PRINT "L"
COLOR 4, 0
LOCATE 12, 19
PRINT "O"
LOCATE 12, 21
COLOR 4, 0
PRINT "O"
COLOR 4, 0
LOCATE 12, 23
PRINT "D "
LOCATE 15, 13
COLOR 4, 0
PRINT "I"
LOCATE 15, 15
COLOR 4, 0
PRINT "N"
LOCATE 15, 17
COLOR 4, 0
PRINT "V"
LOCATE 15, 19
COLOR 4, 0
PRINT "A"
LOCATE 15, 21
COLOR 15, 0
PRINT "D"
LOCATE 15, 23
COLOR 4, 0
PRINT "E"
LOCATE 15, 25
COLOR 4, 0
PRINT "R"
LOCATE 15, 27
COLOR 4, 0
PRINT "S"









END SUB

SUB welcome (Print$)
'***Prints the options to begin game and to exit program
LOCATE 3, 3
COLOR 5, 0
PRINT "1."; " Let's Play"
LOCATE 23, 26
PRINT "2."; " Let's Not"
END SUB

 
 Respond to this message   
roy
(no login)

*Looks good. Thank you for posting it.

May 13 2008, 10:42 AM 

*

 
 Respond to this message   
Pete
(Premier Login iorr5t)
Forum Owner

That was a great school project... especially for a group.

May 13 2008, 8:06 PM 

And roy, great job helping out on it. I hope to see more projects like these in the future. It even makes me think a little about working with graphics myself some day.

Pete


 
 Respond to this message   
 
  << Previous Topic | Next Topic >>Return to Index  
 Copyright © 1999-2014 Network54. All rights reserved.   Terms of Use   Privacy Statement  

Newbies usually go to www.qbasic.com and click on The QBasic Forum
Forum regulars have their own ways, which include The QBasic Community Forums