12-22-2022, 07:15 PM
Played it...
Modified it...
SCREEN ZERO HERO VERSION: E-Racer! (Just press the "E" key and go for the finish line!
Seriously, that's a loooooong course.
Pete
Modified it...
SCREEN ZERO HERO VERSION: E-Racer! (Just press the "E" key and go for the finish line!
Code: (Select All)
'X-racer is an old school racing game using text graphics only
'press spacebar to get that engine going and < or > to steer b to brake!
_TITLE "X-RACER"
track$ = "####OOO................OOO####"
n = 13
trend = 0
obstacle = 10
RANDOMIZE TIMER
DIM b$(2010)
DIM nn(2010)
start:
ask$ = "."
spd = 1
DO
CLS
FOR x = 1 TO 2010
A$ = STRING$(n, 32)
b$(x) = A$ + track$
IF x > 100 AND x MOD obstacle THEN
IF RND * 100 < obstacle THEN MID$(b$(x), n + INT(3 + RND * 18), 1) = "O"
END IF
n = n + INT(RND * 2) - INT(RND * 2) + trend
IF n < 2 THEN n = 2
IF n > 35 THEN n = 35
nn(x) = n
IF RND * 100 < 3 THEN
SELECT CASE INT(RND * 3)
CASE 0
trend = 0
CASE 1
trend = -1
CASE 2
trend = 1
END SELECT
END IF
NEXT x
b$(1995) = A$ + "####O============O####"
b$(1991) = A$ + "####O============O####"
b$(1992) = A$ + "####O O####"
b$(1993) = A$ + "####O FINISH O####"
b$(1994) = A$ + "####O O####"
b$(1995) = A$ + "####O============O####"
FOR x = 1996 TO 2010
b$(x) = A$ + "####O O####"
NEXT x
dp = nn(1) + 11
op = dp
FOR x = 1 TO 2010
_LIMIT 20
IF x > 10 THEN COLOR 12: _PRINTSTRING (dp, 10), "E": COLOR 15
_PRINTSTRING (op, 9), "."
PRINT b$(x);
IF x > 12 THEN
IF MID$(b$(x - 13), dp, 1) = "O" THEN GOTO crash
END IF
op = dp
IF x MOD 20 = 0 THEN
PRINT " - "; x * 5
ELSE
PRINT
END IF
IF x > 10 THEN
gg = 0
DO
_LIMIT 60
gg = gg + 1
kk$ = INKEY$
LOOP UNTIL kk$ <> "" OR gg = 30 - spd
END IF
IF kk$ = "E" OR kk$ = "e" THEN
IF pete = 0 THEN
pete = 1
track$ = " "
FOR xx = 1 TO 1990
A$ = STRING$(n, 32)
b$(xx) = A$ + track$
NEXT xx
END IF
END IF
IF x = 12 THEN t1 = TIMER
SELECT CASE kk$
CASE ".", ">"
op = dp
dp = dp + 1
CASE ",", "<"
op = dp
dp = dp - 1.
CASE " "
spd = spd + 1
IF spd > 28 THEN spd = 28
CASE "b"
spd = spd - 2
IF spd < 1 THEN spd = 1
END SELECT
mph$ = "MPH : " + STR$(spd * 10)
_PRINTSTRING (1, 2), mph$
NEXT x
t2 = TIMER
PRINT
PRINT "Finished Course !"
PRINT
PRINT "Finish Time "; t2 - t1
INPUT "Play again (Y or N) ", ask$
ask$ = UCASE$(ask$)
IF ask$ = "N" THEN GOTO alldone
LOOP
END
crash:
FOR c = 1 TO 6
_LIMIT 8
COLOR 12
FOR cx = dp - c TO dp + c
FOR cy = 10 - c TO c + 10
IF RND * 6 < 3 THEN _PRINTSTRING (cx, cy), "@"
NEXT cy
NEXT cx
NEXT c
COLOR 15
PRINT "YOU CRASHED"
INPUT "Play again (Y or N) ", ask$
ask$ = UCASE$(ask$)
IF ask$ = "N" THEN GOTO alldone
GOTO start
alldone:
END
Seriously, that's a loooooong course.
Pete
Fake News + Phony Politicians = Real Problems