Skip to content

Instantly share code, notes, and snippets.

@brettz9
Created August 10, 2014 20:49
Show Gist options
  • Save brettz9/b74717852fa9e98a7cbc to your computer and use it in GitHub Desktop.
Save brettz9/b74717852fa9e98a7cbc to your computer and use it in GitHub Desktop.
My eighth-grade Apple IIe dot-to-dot video game project (though I had another version with borders through which a dot could come out on the other side, Pac-man style). There is an Apple IIe emulator at http://www.scullinsteel.com/apple2e/ though the Apple II emulator works and can allow direct paste-in via the REPT key. (Though maybe there is a…
2 LET Z = 0
3 FOR YU = 1 TO 3
4 GR
5 B = 24:A = 10:X = 20:Y = 20
6 COLOR= 1: PLOT X,Y
7 COLOR= 2: PLOT A,B: HOME
8 COLOR= 1: IF SCRN( A,B) = 1 THEN 20000
9 HOME : PRINT "SCORE ";: PRINT Z:P = PEEK ( - 16384): POKE - 16368,0
10 IF P = 65 THEN 509
20 IF P = 21 THEN 1000
30 IF P = 90 THEN 2000
40 IF P = 8 THEN 1500
45 IF P = 32 THEN 30000
46 IF P = 27 THEN 60000
50 GOTO 3020
509 LET Y = Y - 1
510 IF Y < 0 THEN LET Y = 0
511 PLOT X,Y
520 COLOR= 0
530 PLOT X,Y + 1
540 GOTO 8
1000 LET X = X + 1
1005 IF X > 38 THEN LET X = 38
1010 PLOT X,Y
1020 COLOR= 0
1030 PLOT X - 1,Y
1040 GOTO 8
1500 LET X = X - 1
1505 IF X < 0 THEN LET X = 0
1510 PLOT X,Y
1520 COLOR= 0
1530 PLOT X + 1,Y
1540 GOTO 8
2000 LET Y = Y + 1
2005 IF Y > 39 THEN LET Y = 39
2010 PLOT X,Y
2020 COLOR= 0
2030 PLOT X,Y - 1
2040 GOTO 8
3020 COLOR= 2
3040 LET TT = INT (7 * RND (1) )+1
3050 IF TT = 1 THEN 5000
3060 IF TT = 2 THEN 6000
3070 IF TT = 3 THEN 7000
3080 IF TT = 4 THEN 10000
3090 IF TT = 5 THEN 50000
3100 IF TT = 6 THEN 50000
3110 IF TT = 7 THEN 50000
5000 LET B = B - 1
5005 IF B < 0 THEN LET B = 0
5010 PLOT A,B
5020 COLOR= 0
5030 PLOT A,B + 1
5035 COLOR= 1
5040 GOTO 8
6000 LET B = B + 1
6005 IF B > 39 THEN LET B = 39
6010 PLOT A,B
6020 COLOR= 0
6030 PLOT A,B - 1
6035 COLOR= 1
6040 GOTO 8
7000 LET A = A + 1
7005 IF A > 39 THEN LET A = 39
7010 PLOT A,B
7020 COLOR= 0
7030 PLOT A - 1,B
7035 COLOR= 1
7040 GOTO 8
10000 LET A = A - 1
10005 IF A < 0 THEN LET A = 0
10010 PLOT A,B
10020 COLOR= 0
10030 PLOT A + 1,B
10035 COLOR= 1
10040 GOTO 8
20000 COLOR= 1
20003 HOME
20004 PRINT : PRINT "YOU KAMIKAZEE"
20005 PRINT "KABOOM!!!!!"
20006 FOR I = 0 TO 39
20007 HLIN 0,39 AT I
20008 NEXT I
20009 PRINT "SCORE ";: PRINT Z
20030 NEXT YU
20031 PRINT : INPUT "TRY AGAIN (Y)ES ";DAD$
20032 IF DAD$ = "Y" THEN 2
20033 END
30000 COLOR= 1
30001 FOR YY = X TO 1
30010 HLIN YY,1 AT Y
30020 NEXT YY
30030 IF SCRN( A,B) = 1 THEN 40040
30040 COLOR= 0
30050 HLIN YY,1 AT Y
30060 GOTO 8
40040 LET Z = Z + 10
40050 GOTO 4
50000 COLOR= 2
50010 FOR UU = A TO 38
50020 HLIN UU,38 AT B
50030 NEXT UU
50040 IF SCRN( X,Y) = 2 THEN 51000
50050 COLOR= 0
50060 HLIN A,38 AT B
50061 COLOR= 2
50065 PLOT A,B
50070 GOTO 8
51000 PRINT : PRINT
51001 COLOR= 1
51010 GOTO 20005
60000 P = PEEK ( - 16384): POKE - 16368,0
60001 IF P < > 0 THEN 9
60002 GOTO 60000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment