Author Topic: Driving Game  (Read 3238 times)

0 Members and 1 Guest are viewing this topic.

Offline _vince

  • Seasoned Forum Regular
  • Posts: 422
    • View Profile
Driving Game
« on: December 13, 2021, 12:21:44 pm »
Use "," key to go left and "." key to go right

Code: [Select]
CLS
s = 0
cr = 0
c = 7
l = 1
w = 15
1 r = l + w
IF l = 1 THEN n = 1
IF l = 25 THEN n = 0
IF n = 1 THEN l = l + 1
IF n = 0 THEN l = l - 1
'FOR k = 0 TO 4000
'NEXT k
_DELAY 0.5
a$ = INKEY$
IF a$ = "." THEN c = c + 1
IF a$ = "," THEN c = c - 1
PRINT TAB(l); "!"; TAB(c); "*"; TAB(r); "!"
IF c = l OR c = r THEN 2
IF a$ = "." OR a$ = "," THEN s = s + 1
GOTO 1
2 PRINT "***crash***"
cr = cr + 1
IF cr < 5 THEN 1
PRINT "score:"; s
PRINT "game over"
END

Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
Re: Driving Game
« Reply #1 on: December 13, 2021, 02:35:36 pm »
Oh, it has been a 'long' time sine I have seen this type of game. I think it was an old TRS80 program (Roadrace) except the 'car' was at the bottom of the screen. Cool...

Are you planning on developing the game any further?

J
Logic is the beginning of wisdom.