just a silly pacman in ascII characters. not complete but is able to play. needs more work but i got bored
if someone messes with this i would like to see it completed
there are still bugs. just read through the code for keys
dont care if no mention of me when compiled. this was just me being bored getting back into programing.
DOWNLOAD BASIC FILE OR THE LINUX.BIN FILE
----------------------------------------------------------------------------------------------------------------------------------------------
DIM DSP$
(32), GHOST%
(4, 2) HIGHSCORE = 0
NEWGAME:
SCORE
= 0: GMO
= 0:
GOSUB FPS: LIVES
= 3: TMR%
= 0: DR%
= 3: G1%
= 1: G2%
= 4: G3%
= 4: G4%
= 4: G5%
= 32: G6%
= 32: G7%
= 32: G8%
= 32: GH1%
= 0
TMR1%
= TMR1%
+ 1:
IF TMR1%
= 150 THEN PALETTE 4, 4: SPECIAL%
= 0: TMR1%
= 0
MOVEOUT:
IF GH1%
= 1 THEN GHOST%
(1, 1) = 12: GHOST%
(1, 2) = 12: GH1%
= 0:
GOTO GH
ELSE IF GH2%
= 1 THEN GHOST%
(2, 1) = 12: GHOST%
(2, 2) = 13: GH2%
= 0:
GOTO GH
ELSE IF GH3%
= 1 THEN GHOST%
(3, 1) = 12: GHOST%
(3, 2) = 14: GH3%
= 0:
GOTO GH
ELSE IF GH4%
= 1 THEN GHOST%
(4, 1) = 12: GHOST%
(4, 2) = 15: GH4%
= 0:
GOTO GH
GH:
allghostmove:
LOCATE GHOST%
(1, 1), GHOST%
(1, 2):
PRINT " ";:
LOCATE GHOST%
(2, 1), GHOST%
(2, 2):
PRINT " ";:
LOCATE GHOST%
(3, 1), GHOST%
(3, 2):
PRINT " ";:
LOCATE GHOST%
(4, 1), GHOST%
(4, 2):
PRINT " ";:
FOR I%
= 1 TO 4: GHOST%
(I%
, 1) = 12:
NEXT I%:
COLOR 10:
LOCATE GHOST%
(1, 1), GHOST%
(1, 2):
PRINT "";:
COLOR 12:
LOCATE GHOST%
(2, 1), GHOST%
(2, 2):
PRINT "";:
COLOR 13:
LOCATE GHOST%
(3, 1), GHOST%
(3, 2):
PRINT "";:
COLOR 9:
LOCATE GHOST%
(4, 1), GHOST%
(4, 2):
PRINT "";:
LOCATE PACY%
, PACX%:
COLOR 15:
PRINT "";:
_DISPLAY: GMO
= 1:
RETURN IF T%
= 249 THEN GX%
= GX%
- 1: G5%
= T%:
GOTO SKP
IF T%
= 233 THEN GX%
= GX%
- 1: G5%
= T%:
GOTO SKP
IF T%
= 249 THEN GX%
= GX%
+ 1: G5%
= T%:
GOTO SKP
IF T%
= 233 THEN GX%
= GX%
+ 1: G5%
= T%:
GOTO SKP
IF T%
= 249 THEN GY%
= GY%
- 1: G5%
= T%:
GOTO SKP
IF T%
= 249 THEN GY%
= GY%
+ 1: G5%
= T%:
GOTO SKP
SKP:
GHOST%
(1, 1) = GX%: GHOST%
(1, 2) = GY%:
COLOR 10:
LOCATE GHOST%
(1, 1), GHOST%
(1, 2):
PRINT "";
GX% = GHOST%(2, 1): GY% = GHOST%(2, 2)
IF T%
= 32 THEN GX%
= GX%
- 1: G6%
= T%:
GOTO SKP1
IF T%
= 249 THEN GX%
= GX%
- 1: G6%
= T%:
GOTO SKP1
IF T%
= 233 THEN GX%
= GX%
- 1: G6%
= T%:
GOTO SKP1
IF T%
= 32 THEN GX%
= GX%
+ 1: G6%
= T%:
GOTO SKP1
IF T%
= 249 THEN GX%
= GX%
+ 1: G6%
= T%:
GOTO SKP1
IF T%
= 233 THEN GX%
= GX%
+ 1: G6%
= T%:
GOTO SKP1
IF T%
= 32 THEN GY%
= GY%
- 1: G6%
= T%:
GOTO SKP1
IF T%
= 249 THEN GY%
= GY%
- 1: G6%
= T%:
GOTO SKP1
IF T%
= 32 THEN GY%
= GY%
+ 1: G6%
= T%:
GOTO SKP1
IF T%
= 249 THEN GY%
= GY%
+ 1: G6%
= T%:
GOTO SKP1
SKP1:
GHOST%
(2, 1) = GX%: GHOST%
(2, 2) = GY%:
COLOR 11:
LOCATE GHOST%
(2, 1), GHOST%
(2, 2):
PRINT "";
GX% = GHOST%(3, 1): GY% = GHOST%(3, 2)
IF T%
= 32 THEN GX%
= GX%
- 1: G7%
= T%:
GOTO SKP2
IF T%
= 249 THEN GX%
= GX%
- 1: G7%
= T%:
GOTO SKP2
IF T%
= 233 THEN GX%
= GX%
- 1: G7%
= T%:
GOTO SKP2
IF T%
= 32 THEN GX%
= GX%
+ 1: G7%
= T%:
GOTO SKP2
IF T%
= 249 THEN GX%
= GX%
+ 1: G7%
= T%:
GOTO SKP2
IF T%
= 233 THEN GX%
= GX%
+ 1: G7%
= T%:
GOTO SKP2
IF T%
= 32 THEN GY%
= GY%
- 1: G7%
= T%:
GOTO SKP2
IF T%
= 249 THEN GY%
= GY%
- 1: G7%
= T%:
GOTO SKP2
IF T%
= 32 THEN GY%
= GY%
+ 1: G7%
= T%:
GOTO SKP2
IF T%
= 249 THEN GY%
= GY%
+ 1: G7%
= T%:
GOTO SKP2
SKP2:
GHOST%
(3, 1) = GX%: GHOST%
(3, 2) = GY%:
COLOR 12:
LOCATE GHOST%
(3, 1), GHOST%
(3, 2):
PRINT "";
GX% = GHOST%(4, 1): GY% = GHOST%(4, 2)
IF T%
= 32 THEN GX%
= GX%
- 1: G8%
= T%:
GOTO SKP3
IF T%
= 249 THEN GX%
= GX%
- 1: G8%
= T%:
GOTO SKP3
IF T%
= 233 THEN GX%
= GX%
- 1: G8%
= T%:
GOTO SKP3
IF T%
= 32 THEN GX%
= GX%
+ 1: G8%
= T%:
GOTO SKP3
IF T%
= 249 THEN GX%
= GX%
+ 1: G8%
= T%:
GOTO SKP3
IF T%
= 233 THEN GX%
= GX%
+ 1: G8%
= T%:
GOTO SKP3
IF T%
= 32 THEN GY%
= GY%
- 1: G8%
= T%:
GOTO SKP3
IF T%
= 249 THEN GY%
= GY%
- 1: G8%
= T%:
GOTO SKP3
IF T%
= 32 THEN GY%
= GY%
+ 1: G8%
= T%:
GOTO SKP3
IF T%
= 249 THEN GY%
= GY%
+ 1: G8%
= T%:
GOTO SKP3
SKP3:
GHOST%
(4, 1) = GX%: GHOST%
(4, 2) = GY%:
COLOR 9:
LOCATE GHOST%
(4, 1), GHOST%
(4, 2):
PRINT "";
EATGHOST:
IF PACY%
= GHOST%
(1, 1) AND PACX%
= GHOST%
(1, 2) THEN SCORE
= SCORE
+ 300:
LOCATE GHOST%
(1, 1), GHOST%
(1, 2):
COLOR 14:
PRINT CHR$(G5%
);: GHOST%
(1, 1) = 15: GHOST%
(1, 2) = 13: GH1%
= 1:
IF G5%
<> 32 THEN DOT
= DOT
- 1: G5%
= 32 IF PACY%
= GHOST%
(2, 1) AND PACX%
= GHOST%
(2, 2) THEN SCORE
= SCORE
+ 300:
LOCATE GHOST%
(2, 1), GHOST%
(2, 2):
COLOR 14:
PRINT CHR$(G6%
);: GHOST%
(2, 1) = 15: GHOST%
(2, 2) = 13: GH2%
= 1:
IF G6%
<> 32 THEN DOT
= DOT
- 1: G6%
= 32 IF PACY%
= GHOST%
(3, 1) AND PACX%
= GHOST%
(3, 2) THEN SCORE
= SCORE
+ 300:
LOCATE GHOST%
(3, 1), GHOST%
(3, 2):
COLOR 14:
PRINT CHR$(G7%
);: GHOST%
(3, 1) = 15: GHOST%
(3, 2) = 13: GH3%
= 1:
IF G7%
<> 32 THEN DOT
= DOT
- 1: G7%
= 32 IF PACY%
= GHOST%
(4, 1) AND PACX%
= GHOST%
(4, 2) THEN SCORE
= SCORE
+ 300:
LOCATE GHOST%
(4, 1), GHOST%
(4, 2):
COLOR 14:
PRINT CHR$(G8%
);: GHOST%
(4, 1) = 15: GHOST%
(4, 2) = 13: GH4%
= 1:
IF G8%
<> 32 THEN DOT
= DOT
- 1: G8%
= 32 CHECK1:
IF T%
= 249 THEN DOT
= DOT
- 1: PACY%
= PACY%
- 1: SCORE
= SCORE
+ 1:
PLAY "MBT128L64O3G":
RETURN IF T%
= 233 THEN PACY%
= PACY%
- 1: SCORE
= SCORE
+ 75: SPECIAL%
= 1: TMR1%
= 0:
RETURN CHECK2:
IF T%
= 249 THEN DOT
= DOT
- 1: PACY%
= PACY%
+ 1: SCORE
= SCORE
+ 1:
PLAY "MBT128L64O3G" IF T%
= 233 THEN PACY%
= PACY%
+ 1: SCORE
= SCORE
+ 75: SPECIAL%
= 1: TMR1%
= 0 CHECK3:
IF T%
= 255 THEN PACX%
= PACX%
- 1 IF T%
= 32 THEN PACX%
= PACX%
- 1 IF T%
= 249 THEN DOT
= DOT
- 1: PACX%
= PACX%
- 1: SCORE
= SCORE
+ 1::
PLAY "MBT128L64O3G" IF T%
= 233 THEN PACX%
= PACX%
- 1: SCORE
= SCORE
+ 75: SPECIAL%
= 1: TMR1%
= 0 CHECK4:
IF T%
= 255 THEN PACX%
= PACX%
+ 1 IF T%
= 249 THEN DOT
= DOT
- 1: PACX%
= PACX%
+ 1: SCORE
= SCORE
+ 1:
PLAY "MBT128L64O3G":
RETURN IF T%
= 233 THEN PACX%
= PACX%
+ 1: SCORE
= SCORE
+ 75: SPECIAL%
= 1: TMR1%
= 0:
RETURN IF b$
= "d" THEN COLOR 11: b$
= "=": DOORX%
= j%
- 1: DOORY%
= I%
IF b$
= "1" THEN COLOR 10: b$
= "": GHOST%
(1, 1) = I%: GHOST%
(1, 2) = j%
IF b$
= "2" THEN COLOR 12: b$
= "": GHOST%
(2, 1) = I%: GHOST%
(2, 2) = j%
IF b$
= "3" THEN COLOR 13: b$
= "": GHOST%
(3, 1) = I%: GHOST%
(3, 2) = j%
IF b$
= "4" THEN COLOR 9: b$
= "": GHOST%
(4, 1) = I%: GHOST%
(4, 2) = j%
IF b$
= "5" THEN COLOR 15: b$
= "": PACX%
= j%: PACY%
= I%
IF b$
= "6" THEN ITEMX%
= j%: ITEMY%
= I%: b$
= " " REM *** DATA FOR DISPLAY
/ READ ONCE
ONLY INTO DSP$
() **************************************************************************************************************************************** DATA "ÉÍÍÍÍÍÍÍÍÍÍÍÍ»ÉÍÍÍÍÍÍÍÍÍÍÍÍ»","º............ºº............º","º.ÚÄÄ¿.ÚÄÄÄ¿.ºº.ÚÄÄÄ¿.ÚÄÄ¿.º","ºO³ ³.³ ³.ºº.³ ³.³ ³Oº","º.ÀÄÄÙ.ÀÄÄÄÙ.ÈŒ.ÀÄÄÄÙ.ÀÄÄÙ.º","º..........................º" DATA "º.ÚÄÄ¿.Ú¿.ÚÄÄÄÄÄÄ¿.Ú¿.ÚÄÄ¿.º","º.ÀÄÄÙ.³³.ÀÄÄ¿ÚÄÄÙ.³³.ÀÄÄÙ.º","º......³³....³³....³³......º","ÈÍÍÍÍ».³ÀÄÄ¿ ³³ ÚÄÄÙ³.ÉÍÍÍÍŒ"," º.³ÚÄÄÙ ÀÙ ÀÄÄ¿³.º "," º.³³ 5 ³³.º " DATA " º.³³ ÉÍÍddÍÍ» ³³.º ","ÍÍÍÍÍŒ.ÀÙ º º ÀÙ.ÈÍÍÍÍÍ","888888. º 1234 º .888888","ÍÍÍÍÍ».Ú¿ º º Ú¿.ÉÍÍÍÍÍ"," º.³³ ÈÍÍÍÍÍÍŒ ³³.º "," º.³³ 6 ³³.º " DATA " º.³³ ÚÄÄÄÄÄÄ¿ ³³.º ","ÉÍÍÍÍŒ.ÀÙ ÀÄÄ¿ÚÄÄÙ ÀÙ.ÈÍÍÍÍ»","º............³³............º","º.ÚÄÄ¿.ÚÄÄÄ¿.³³.ÚÄÄÄ¿.ÚÄÄ¿.º","º.ÀÄ¿³.ÀÄÄÄÙ.ÀÙ.ÀÄÄÄÙ.³ÚÄÙ.º","ºO..³³....... .......³³..Oº" DATA "ÈÍ».³³.Ú¿.ÚÄÄÄÄÄÄ¿.Ú¿.³³.ÉÍŒ","ÉÍŒ.ÀÙ.³³.ÀÄÄ¿ÚÄÄÙ.³³.ÀÙ.ÈÍ»","º......³³....³³....³³......º","º.ÚÄÄÄÄÙÀÄÄ¿.³³.ÚÄÄÙÀÄÄÄÄ¿.º","º.ÀÄÄÄÄÄÄÄÄÙ.ÀÙ.ÀÄÄÄÄÄÄÄÄÙ.º","º..........................º" DATA "ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍŒ" REM ****************************************************************************************************************************************************************************************** NEXT I:
COLOR 5:
LOCATE 5, 3:
PRINT " Û ÜÜÜÜ Ûßßßß ÜÜÜ ßÛß":
LOCATE 24, 5:
PRINT "ÛÝ ÛÝ Û ÞÛ ÞÝ":
COLOR 6:
LOCATE 6, 3:
PRINT " Û Û Û ß Û Û Û":
LOCATE 25, 5:
PRINT "ÛÞÝÛ Û Û Û ÞÝÛ ÞÝ":
COLOR 7:
LOCATE 7, 3:
PRINT "ÛÜÜÜÛ ÛÜÜÜ Û Û Û":
LOCATE 26, 5:
PRINT "Û ÞÝ Û ÛÜÜÜÛ ÞÝ Û ÞÝ":
COLOR 8:
LOCATE 8, 3:
PRINT "Û Û Û ÛÜÜÜÜ Û ÜÛÜ":
LOCATE 27, 5:
PRINT "Û Û Û Û ÞÝ ÛÞÝ":
COLOR 9:
LOCATE 9, 3:
PRINT "ß Û ÛÜÜÛ ÜÛÜ":
LOCATE 28, 5:
PRINT "Û ÞÝ ß Û ÞÛ ÛÝ"