OK heres my new code.....
with title screen and all..
Code:
CLS 'clear screen
SCREEN 13 'set screen resolution
DIM maze(1 TO 11) AS STRING 'Declares that there is 6 maze variables
DIM maze2(1 TO 18) AS STRING
DIM ghostrow(1 TO 3) AS INTEGER
DIM ghostcol(1 TO 3) AS INTEGER
DIM oldrow
DIM oldcol
maze$(1) = "ÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃû" 'the following is the maze in
maze$(2) = "º.......º.......º" 'the variables
maze$(3) = "º.º.ÃÃÃÃÃÃÃÃÃ.º.º"
maze$(4) = "º.º...........º.º"
maze$(5) = "º.ÃÃû.ÃÃÃ.ÃÃü.º"
maze$(6) = "º.......º.......º"
maze$(7) = "º....º.. ..º....º"
maze$(8) = "º...ÃÃÃÃÃÃÃÃÃ...º"
maze$(9) = "º...º...º...º...º"
maze$(10) = "º....... .......º"
maze$(11) = "ÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃü"
maze2$(1) = "ÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃ"
maze2$(2) = "Ã........ÃÃ..........ÃÃ........Ã"
maze2$(3) = "Ã.ÃÃÃÃÃÃ.ÃÃ.ÃÃÃÃÃÃÃÃ.ÃÃ.ÃÃÃÃÃÃ.Ã"
maze2$(4) = "Ã..............................Ã"
maze2$(5) = "ÃÃÃÃ.ÃÃÃ.ÃÃÃÃÃ.ÃÃ.ÃÃÃÃÃ.ÃÃÃ.ÃÃÃÃ"
maze2$(6) = " Ã.ÃÃÃ.ÃÃÃÃÃ.ÃÃ.ÃÃÃÃÃ.ÃÃÃ.Ã"
maze2$(7) = "ÃÃÃÃ.ÃÃÃ.......ÃÃ.......ÃÃÃ.ÃÃÃÃ"
maze2$(8) = " .ÃÃÃÃÃÃ ÃÃÃÃÃÃÃÃ ÃÃÃÃÃÃ. "
maze2$(9) = "ÃÃÃÃ. .ÃÃÃÃ"
maze2$(10) = " Ã.ÃÃÃÃÃà ÃÃÃÃÃÃÿ ÃÃÃÃÃÃ.Ã"
maze2$(11) = " Ã.ÃÃà ³ ³ ÃÃÃ.Ã"
maze2$(12) = "ÃÃÃÃ.ÃÃÃ ÃÃ ÃÃÃÃÃÃÃÃ ÃÃ ÃÃÃ.ÃÃÃÃ"
maze2$(13) = " . ÃÃ ÃÃ . "
maze2$(14) = "ÃÃÃÃ.ÃÃÃÃÃÃÃÃÃ ÃÃ ÃÃÃÃÃÃÃÃÃ.ÃÃÃÃ"
maze2$(15) = " Ã........ ÃÃ .......Ã"
maze2$(16) = "ÃÃÃÃ.ÃÃÃÃÃÃ.ÃÃÃÃÃÃÃÃÃ.ÃÃÃÃÃ.ÃÃÃÃ"
maze2$(17) = "Ã.............. ..............Ã"
maze2$(18) = "Ã.ÃÃÃÃÃ.ÃÃÃÃÃÃ.ÃÃ.ÃÃÃÃÃÃ.ÃÃÃÃÃ.Ã"
row = 7 'says which row pacman is at
col = 9 'says which column pacman is at
ghostrow = 10 'says which row the ghost starts at
ghostcol = 9 'says which column the ghost starts at
dots = 93 'declares how many dots there are
DRAW "s8 bm4,3 c14 d50 r10 u23 r20 u27 l30 bm25,25 u2 r10 d10 l10 u8" 'P
DRAW "s8 bm38,102 u20 r20 d20 l7 u7 l6 d7 l7 bm48,78 u5 r7 d5 l7" 'A
DRAW "s8 bm88,102 u20 r15 g10 f10 l15" 'C
CIRCLE (118, 82), 5 'o
CIRCLE (138, 82), 5 'o
CIRCLE (158, 82), 5 'o
DRAW "s8 bm173,102 c14 u20 r5 f5 e5 r5 d20 l5 u10 g5 h5 d10 l5" 'M
DRAW "s8 bm223,102 u20 r20 d20 l7 u7 l6 d7 l7 bm233,78 u5 r7 d5 l7" 'A
DRAW "s8 bm273,102 u20 r5 f11 u11 r5 d20 l5 h11 d11 l5" 'N
CIRCLE (50, 150), 40, 14, .9, 5.4
DRAW "s8 bm50,150 e13 g13 f13"
DO
press$ = INKEY$
LOOP UNTIL press$ = CHR$(13)
SCREEN 0
LOCATE 10, 8
PRINT "Created By: Justin Malcolm"
FOR i# = 1 TO 10000000 STEP 2
NEXT i#
LOCATE 10, 6
PRINT "Originally Created By: Micro$oft"
FOR b# = 1 TO 10000000 STEP 2
NEXT b#
PRINT
PRINT
PRINT
COLOR 14, 0
PRINT TAB(25); "C is PaQman"
PRINT
COLOR 4, 0
PRINT TAB(25); " is a Ghost"
PRINT
COLOR 15, 0
PRINT TAB(25); "'.' are the food"
PRINT
COLOR 6, 0
PRINT
PRINT TAB(25); "Press any key to play..."
DO
press$ = INKEY$
LOOP UNTIL press$ <> ""
CLS
points% = 0
lives% = 3
DO 'Begins Game loop
LOCATE 1, 1 'positions the maze
FOR count = 1 TO 11
COLOR 1, 0 'Prints the maze out
PRINT maze$(count)
COLOR 15
NEXT count
LOCATE row, col
COLOR 14, 0 'Prints Pacman
PRINT "C"
LOCATE ghostrow, ghostcol
COLOR 4, 0 'makes ghost red
PRINT "" 'Prints ghost
COLOR 15
LOCATE 13, 2: PRINT "Lives: "; lives%; " Points: "; points%
IF dots = 0 THEN 'declares when the user can win
LOCATE 15, 1
PRINT "You Have Won" 'Prints You win, if you eat all
PRINT "Get Ready for..." 'dots
PRINT "LEVEL 2"
END
END IF
'The following condition is for
'when you get eaten by a ghost
IF ((row = ghostrow) AND (col = ghostcol)) THEN
LOCATE row, col
PRINT " "
row = 7
col = 9
LOCATE row, col
COLOR 14, 0
PRINT "C"
COLOR 15, 0
lives% = lives% - 1
ELSEIF lives% <= 0 THEN
CLS
LOCATE 12, 8
PRINT "You Lost All Of Your Lives"
FOR i# = 1 TO 10000000 STEP 5
NEXT i#
END
END IF
'DO 'Program freezes until user press'
press$ = INKEY$ 'any key
'LOOP UNTIL press$ <> ""
blah = TIMER + .01
DO
LOOP UNTIL TIMER > blah
oldrow = row 'every move is stored into the variable
oldcol = col
SELECT CASE press$ 'the following is the conditions for
CASE CHR$(0) + CHR$(72) 'the key press'
'DO WHILE press$ = CHR$(0) + CHR$(72)
row = row - 1
'LOOP
CASE CHR$(0) + CHR$(80)
'DO WHILE press$ = CHR$(0) + CHR$(80)
row = row + 1
'LOOP
CASE CHR$(0) + CHR$(75)
'DO WHILE press$ = CHR$(0) + CHR$(75)
col = col - 1
'LOOP
CASE CHR$(0) + CHR$(77)
'DO WHILE press$ = CHR$(0) + CHR$(77)
col = col + 1
'LOOP
END SELECT
SELECT CASE MID$(maze$(row), col, 1) 'wont let you get passed maze
CASE "¹", "º", "»", "¼", "Ã", "Ã", "Ã", "Ã", "Ã", "Ã", "Ã"
row = oldrow
col = oldcol
CASE "." 'when you eat a dot, it dissapears
MID$(maze$(row), col, 1) = " ": PLAY "l16<<<b-"
points% = points% + 10
dots = dots - 1
END SELECT
'*******************
'Ghost Movements
'*******************
IF RND < .1 THEN 'randomizes the ghosts movements
oldrow = ghostrow
SELECT CASE ghostrow
CASE IS < row 'moves ghost closer to you
ghostrow = ghostrow + 1
CASE IS > row
ghostrow = ghostrow - 1
END SELECT
'wont let ghost go through walls
SELECT CASE MID$(maze$(ghostrow), ghostcol, 1)
CASE "¹", "º", "»", "¼", "Ã", "Ã", "Ã", "Ã", "Ã", "Ã", "Ã"
ghostrow = oldrow
END SELECT
IF ghostrow = oldrow THEN 'moves ghost closer to you
oldcol = ghostcol
SELECT CASE ghostcol
CASE IS < col
ghostcol = ghostcol + 1
CASE IS > col
ghostcol = ghostcol - 1
END SELECT
END IF
'makes the ghost stay if he tries to
'get out of maze
SELECT CASE MID$(maze$(ghostrow), ghostcol, 1)
CASE "¹", "º", "»", "¼", "Ã", "Ã", "Ã", "Ã", "Ã", "Ã", "Ã"
ghostcol = oldcol
END SELECT
END IF
LOOP UNTIL press$ = CHR$(13)