Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I call it: Maze
#1
Maze. Simple. Cool. Nobody can beat the time limit. What more can you ask for?

Code:
CLS
ver = 3.999999
SCREEN 13
TYPE move
r AS INTEGER
c AS INTEGER
oldr AS INTEGER
oldc AS INTEGER
END TYPE
DIM hmn AS move
DIM maze$(15)

'#########
'# INTRO #
'#########

CLS
LOCATE 5, 18: COLOR 3: PRINT "M"; : COLOR 5: PRINT "A"; : COLOR 7: PRINT "Z"; : COLOR 9: PRINT "E";
LOCATE 25, 2: COLOR 15: PRINT "Version"; ver
SLEEP 3
CLS
COLOR 15
LOCATE 5, 5: PRINT "Brought to you by Whitetiger0990..."
SLEEP 2
CLS
LOCATE 5, 5: PRINT "I hope you enjoy this awesome game!"
SLEEP 2
CLS

CLS
redo:
CLS
LOCATE 5, 5: INPUT "Whats your name - ", name$
IF name$ = "" THEN GOTO redo
n$ = UCASE$(LEFT$(name$, 1))
CLS

srt:
redom:
CLS
LOCATE 5, 5: INPUT "Map 1 - 4 ", m$
IF m$ = "s" THEN GOSUB ms
m = VAL(m$)
IF m >= 1 AND m <= 4 THEN ON m GOSUB m1, m2, m3, m4 ELSE GOTO redom
'SELECT CASE m$
' CASE "1"
'  GOSUB m1
' CASE "2"
'  GOSUB m2
' CASE "3"
'  GOSUB m3
' CASE "4"
'  GOSUB m4
' CASE "s"
'  GOSUB ms
' CASE ELSE
'  GOTO redom
'END SELECT

CLS
LOCATE 5, 5: PRINT "Loading... Maze..."
SLEEP 2

redot:
CLS
LOCATE 5, 5: PRINT "Beat time or record"
LOCATE 6, 5: INPUT "", timecho$
SELECT CASE LCASE$(LEFT$(LTRIM$(timecho$), 1))
CASE "t"
  timercho$ = "t"
CASE "r"
  timercho$ = "r"
CASE ELSE
  GOTO redot
END SELECT

'##################
'# RESTARTS LEVEL # 'Blah
'##################

r1 = hmn.r
c1 = hmn.c
restart:
hmn.c = c1
hmn.r = r1

CLS                          'Sets
c1$ = "="                    'The
start! = TIMER               'Variables
win = 0                      '
c2$ = ""                     '
nocheat = 1                  '
cheat = 0
lose = 0
                            
DO

LOCATE 1, 1
FOR count = 1 TO 15
PRINT maze$(count)
NEXT count

'# Print your guy #

LOCATE hmn.r, hmn.c: COLOR 14: PRINT n$: COLOR 15

'##############
'# IF YOU WIN #
'##############

IF win = 1 THEN
finish! = TIMER
  LOCATE 20, 2: PRINT name$; "! You Win      "
  LOCATE 21, 2: PRINT "It took you "; INT(finish! - start!); " secs to win!     "
  GOSUB again
END
END IF



DO
press$ = INKEY$
IF timecho$ = "t" THEN
  timeleft = ttb - INT(TIMER - start!)
  LOCATE 21, 2: PRINT "You have"; timeleft; "seconds left!"

  IF timeleft = 0 THEN lose = 1
ELSE
  LOCATE 21, 2: PRINT "You've been playing for "; INT(TIMER - start!); " secs"
END IF
IF INT(TIMER - blah) >= 2 THEN LOCATE 20, 2: PRINT "            "

  '###############
  '# IF YOU LOSE #
  '###############

IF lose = 1 THEN
   LOCATE 20, 2: PRINT name$; "! You LOSE!!!!!!!!!!!!"
   LOCATE 21, 2: PRINT "You didn't beat it in the time limit!"
   GOSUB again
END IF

LOOP UNTIL press$ <> ""

                            
hmn.oldr = hmn.r
hmn.oldc = hmn.c

'# MOVEMENT #
SELECT CASE press$
CASE CHR$(0) + CHR$(72)
  hmn.r = hmn.r - 1
CASE CHR$(0) + CHR$(80)
  hmn.r = hmn.r + 1
CASE CHR$(0) + CHR$(75)
  hmn.c = hmn.c - 1
CASE CHR$(0) + CHR$(77)
  hmn.c = hmn.c + 1
CASE "c"
  SWAP cheat, nocheat
CASE "w"
  IF cheat = 1 THEN SWAP c1$, c2$
CASE "t"
  IF cheat = 1 THEN ttb = ttb + 1
CASE "r"
  GOTO restart
CASE "q"
  GOTO again
END SELECT


'# WHAT YOU CAN AND CAN'T GO THROUGH #
SELECT CASE MID$(maze$(hmn.r), hmn.c, 1)
CASE c1$, "[", "]"
  hmn.r = hmn.oldr
  hmn.c = hmn.oldc
CASE "E"
  win = 1
CASE "+"
  MID$(maze$(hmn.r), hmn.c, 1) = " "
  LOCATE 20, 2: PRINT "Bonus Point!"
  ttb = ttb + 2
  blah = TIMER
CASE "L"
  hmn.r = hmn.oldr
  hmn.c = hmn.oldc
  lose = 1
END SELECT

LOOP
'# INCASE FOR SOMEREASON YOU SUDDENLY JUMP OUT OF THE LOOP #
END



again:
LOCATE 23, 2: PRINT "Press enter to cont"
DO
press$ = INKEY$
IF press$ = "r" GOTO restart
IF press$ = CHR$(13) THEN EXIT DO
LOOP
LOCATE 24, 2: INPUT "<-- AGAIN? ", a$
IF LCASE$(LEFT$(a$, 1)) = "y" THEN GOTO srt ELSE END
END

'############
'# MAP DATA #
'############
m1:
ttb = 7
hmn.r = 6
hmn.c = 3
maze$(1) = "[=============]"
maze$(2) = "[= = ==     =E]"
maze$(3) = "[=   == ===   ]"
maze$(4) = "[== === = = ==]"
maze$(5) = "[==  == =   = ]"
maze$(6) = "[= =  = == == ]"
maze$(7) = "[= == = ==    ]"
maze$(8) = "[=    = ===== ]"
maze$(9) = "[= ====+=     ]"
maze$(10) = "[=     == === ]"
maze$(11) = "[==== = =    =]"
maze$(12) = "[     = ==== =]"
maze$(13) = "[== === = =  =]"
maze$(14) = "[             ]"
maze$(15) = "[=============]"
RETURN

m2:
ttb = 8
hmn.r = 2
hmn.c = 2
maze$(1) = "[=============]"
maze$(2) = "[ = = = =   =+]"
maze$(3) = "[ = = = = = = ]"
maze$(4) = "[   = =   =   ]"
maze$(5) = "[==     ======]"
maze$(6) = "[ == ====   = ]"
maze$(7) = "[=        =   ]"
maze$(8) = "[============ ]"
maze$(9) = "[=         == ]"
maze$(10) = "[= == ====  = ]"
maze$(11) = "[= == ===== = ]"
maze$(12) = "[= =      = = ]"
maze$(13) = "[= ====== = = ]"
maze$(14) = "[=     +=E=   ]"
maze$(15) = "[=============]"
RETURN


m3:
ttb = 5
hmn.r = 2
hmn.c = 2
maze$(1) = "[=============]"
maze$(2) = "[          =  ]"
maze$(3) = "[ === = ==   =]"
maze$(4) = "[   = =   ==  ]"
maze$(5) = "[== =  =======]"
maze$(6) = "[ =  == =   = ]"
maze$(7) = "[         =   ]"
maze$(8) = "[ =========== ]"
maze$(9) = "[  ==         ]"
maze$(10) = "[= == == == = ]"
maze$(11) = "[= == =   = = ]"
maze$(12) = "[= == = = = = ]"
maze$(13) = "[= == === === ]"
maze$(14) = "[=      =E=+  ]"
maze$(15) = "[=============]"
RETURN

m4:
ttb = 12
hmn.r = 8
hmn.c = 8
maze$(1) = "[=============]"
maze$(2) = "[             ]"
maze$(3) = "[ =========== ]"
maze$(4) = "[ =         = ]"
maze$(5) = "[ = ======= = ]"
maze$(6) = "[ =   =     = ]"
maze$(7) = "[ == == ===== ]"
maze$(8) = "[ =   = =E    ]"
maze$(9) = "[ = ==========]"
maze$(10) = "[ =   =   =   ]"
maze$(11) = "[ = = = = = = ]"
maze$(12) = "[ = =   =   = ]"
maze$(13) = "[ =========== ]"
maze$(14) = "[             ]"
maze$(15) = "[=============]"
RETURN


ms:
ttb = 14
hmn.r = 14
hmn.c = 12
maze$(1) = "[=============]"
maze$(2) = "[L            ]"
maze$(3) = "[LLLL LLLLLLL ]"
maze$(4) = "[   L       L ]"
maze$(5) = "[ L LLLLLLL L ]"
maze$(6) = "[ L       L L ]"
maze$(7) = "[ LLLLLLL L L ]"
maze$(8) = "[       L L L ]"
maze$(9) = "[LLLLLL L   L ]"
maze$(10) = "[     L LLL L ]"
maze$(11) = "[ LLL L L+LLL ]"
maze$(12) = "[ L L   L  EL ]"
maze$(13) = "[ L LLLLL LLL ]"
maze$(14) = "[         L   ]"
maze$(15) = "[=============]"
RETURN
[Image: sig.php]
Back by popular demand!
I will byte and nibble you bit by bit until nothing remains but crumbs.
Reply
#2
I beat the time limit in all 3 mazes.
The first one took me three tries (the second try I thought the exit was in the center for some reason): 7 sec.
The second one took me one try: 8 sec.
The third one took me one try: 7 sec.

Fun.

:bounce:

Update:
1: 6sec
2: 6sec
3: 4sec (tried getting 3, but no-go)
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
Reply
#3
you must have a faster computer. :o Or you cheated. :-?
[Image: sig.php]
Back by popular demand!
I will byte and nibble you bit by bit until nothing remains but crumbs.
Reply
#4
the trick is to tap when there are short hops.
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
Reply
#5
go idea i'll try it later. I am in the middle of sumthing
[Image: sig.php]
Back by popular demand!
I will byte and nibble you bit by bit until nothing remains but crumbs.
Reply
#6
Ok it try. Got
1. 7
2. 8
3. 5
[Image: sig.php]
Back by popular demand!
I will byte and nibble you bit by bit until nothing remains but crumbs.
Reply
#7
Version 3.999999 (or just plain old "4") has just been release!!
:bounce: :bounce: :bounce: :bounce: :bounce:
Yea!!!!!!!!!! Whoohooo!!!!!!!!! Yippee!!!!!!!!

Updates:
- When you input the map number it now uses a different system.
- 1 more map
- If you an read the code... theres a little secret. Actually that has been there. :oops:
[Image: sig.php]
Back by popular demand!
I will byte and nibble you bit by bit until nothing remains but crumbs.
Reply
#8
Yes, the cheat system. Very ummm... nice?
earn.
Reply
#9
If theres a code in a game i use it. But this ones kind of pointless. But who cares.
[Image: sig.php]
Back by popular demand!
I will byte and nibble you bit by bit until nothing remains but crumbs.
Reply
#10
Someone should make a Twisted Metal 2 game. I tried it once with PSET when I was younger. Didn't turn out quite right.
earn.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)