Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : mmfour game
Author | Message | ||||
rambo55 Newbie Joined: 11/12/2012 Location: AustraliaPosts: 15 |
I have try to run game mmfour in MM colour computer but this display is on the screen [1] Error: Invalid Character |
||||
CircuitGizmos Guru Joined: 08/09/2011 Location: United StatesPosts: 1425 |
Works fine for me. Open the MMFOUR.BAS file in a TEXT EDITOR and take a look at the first line. Perhaps there is a character that should not be there. 10: REM This programme was originally found on a demo 20: REM tape for the MicroBee computer. It was ported 30: REM to GWbasic and then Qbasic for use on a BBS 40: REM in 1995. 50: REM In 2011 yet another port, this time to 60: REM MMBasic to run on the Maximite computer. 70: REM Glenn Littleford. www.thebackshed.com 80: CLS 90: PRINT TAB(10); "F O U R - R O W": PRINT : PRINT TAB(15); "Ver 1.3" 100: PRINT : PRINT (Note: What is with the colons?) Micromites and Maximites! - Beginning Maximite |
||||
rambo55 Newbie Joined: 11/12/2012 Location: AustraliaPosts: 15 |
All line are the same 10: REM This programme was originally found on a demo 20: REM tape for the MicroBee computer. It was ported 30: REM to GWbasic and then Qbasic for use on a BBS 40: REM in 1995. 50: REM In 2011 yet another port, this time to 60: REM MMBasic to run on the Maximite computer. 70: REM Glenn Littleford. www.thebackshed.com 80: CLS 90: PRINT TAB(10); "F O U R - R O W": PRINT : PRINT TAB(15); "Ver 1.3" 100: PRINT : PRINT |
||||
Gizmo Admin Group Joined: 05/06/2004 Location: AustraliaPosts: 5078 |
That MMFour game is my little contribution to the Maximate library, along with MMPrey. I cant remember why the colons are there, I have a suspicion early versions of MMBasic required it, anyone remember? I hope to find out who the original author of the Microbee version was, I would like to give them credit. Glenn The best time to plant a tree was twenty years ago, the second best time is right now. JAQ |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 6098 |
I did do a bit of work on one like this in my Microbee days. I don't know the original source but it might have come from their magazine. Here it is with the line numbers removed. The only catch is that you use the < and > keys (, and .) and not the arrow keys! Once I worked that out, all was working although I think it needs a larger font. REM This programme was originally found on a demo REM tape for the MicroBee computer. It was ported REM to GWbasic and then Qbasic for use on a BBS REM in 1995. REM In 2011 yet another port, this time to REM MMBasic to run on the Maximite computer. REM Glenn Littleford. www.thebackshed.com CLS PRINT TAB(10); "F O U R - R O W": PRINT : PRINT TAB(15); "Ver 1.3" PRINT : PRINT PRINT "Try to beat the computer in a simple yet addictive" PRINT "game similar to CONNECT FOUR": PRINT PRINT "Using the < and > keys position the arrow above" PRINT "the column you want, then use the space key to" PRINT "drop your marker. Press Q to quit." PRINT : PRINT "Hit any key to continue" RANDOMIZE TIMER DIM t(11), s(44), n(7) _Lbl190: IF INKEY$ = "" THEN GOTO _Lbl190 CLS e = 0: f = 0: g = 0 FOR a = 1 TO 44: s(a) = 0: NEXT a IF s2 = 4 AND s1 = 0 THEN LOCATE 0, 165: PRINT "You really havn't got the hang of this, have you?" IF s1 - s2 = 3 THEN LOCATE 0,165: PRINT "You think your good, dont ya!" IF s2 - s1 = 5 THEN LOCATE 0,165: PRINT "Your loosing, ha ha." FOR x = 1 TO 141 STEP 20 LINE (x, 20)-(x, 140) FOR y = 20 TO 120 STEP 20 LINE (x - 1, y)-(x + 1, y) NEXT NEXT LINE (1, 140)-(141, 140) LOCATE 150,25 : PRINT "Four in a Row" LOCATE 150,45 : PRINT "Scores...." LOCATE 150,60 : PRINT " You:"; s1 LOCATE 150,70 : PRINT " Me:"; s2 LOCATE 150,80 : PRINT "Drawn:"; s3 LOCATE 150,100 : PRINT "Keys...." LOCATE 150,115 : PRINT "< > to move" LOCATE 150,125 : PRINT "[SPACE] to drop" LOCATE 150,135 : PRINT "Q to quit" CIRCLE (153,62),3 LINE (150,70)-(156,76),1,"BF" w = 36 FOR c = 1 TO 7 n(c) = w w = w + 1 NEXT c c = 4 s4 = s1 + s2 + s3 IF s4 / 2 <> INT(s4 / 2) THEN GOTO _Lbl1170 _Lbl520: m1$ = " My Move" : GOSUB _Lbl2000 IF g <> 0 THEN g = 0 : GOTO _Lbl190 v = 0: x = 0: y = 0: z = 0 _Lbl550: j=j+1 IF j>7 THEN j=0 GOTO _Lbl670 ELSE c=c+1 IF c>7 THEN c=1 ENDIF p = c IF n(c) > 0 THEN GOSUB _Lbl1520 IF f <> 0 THEN j = 0 : GOTO _Lbl1030 GOTO _Lbl550 _Lbl670: IF x <> 0 THEN c = x : GOTO _Lbl1030 IF y <> 0 THEN c = y: GOTO _Lbl740 IF z <> 0 THEN c = z: GOTO _Lbl740 _Lbl700: c=INT(RND()*7)+1 IF n(c)<1 THEN GOTO _Lbl700 v = v + 1 IF c <> 4 AND v < 5 THEN GOTO _Lbl700 _Lbl740: IF n(c) < 8 THEN f = 0: GOTO _Lbl1030 IF v < 10 THEN GOTO _Lbl870 IF v / 3 = INT(v / 3) THEN m = 1 m1$ = "Now what do I do ???": GOSUB _Lbl2130 IF v < 21 THEN GOTO _Lbl870 FOR t1=1 TO 200 LOCATE RND()*300, RND()*300 PRINT "?" SOUND RND()*1000+20,20 : PAUSE 20 NEXT t1 PAUSE 1000 e = 1 GOTO _Lbl1420 _Lbl870: n(c) = n(c) - 7 z = 0 GOSUB _Lbl1520 n(c) = n(c) + 7 IF f <> 0 THEN f = 0 IF v < 9 THEN GOTO _Lbl700 ENDIF IF z <> 0 THEN z = 0 IF v < 6 THEN GOTO _Lbl700 ENDIF IF x <> 0 THEN x = 0 GOTO _Lbl700 ENDIF _Lbl1030: ne=((n(c)-c)/7)*20+30 m=c*20-9 LINE (m - 5, ne - 5)-(m + 5, ne + 5), 1, BF s(n(c)) = 5 n(c) = n(c) - 7 IF f<>0 THEN m1$="I Win! haha! Press any key." GOSUB _Lbl2130 FOR noise1 = 1 TO 3 : FOR noise2=1000 TO 4000 STEP 500 SOUND noise2,100 : PAUSE 100 NEXT noise2 : NEXT noise1 s2=s2+1 GOTO _Lbl190 ENDIF _Lbl1170: m1$ = "Your Move": GOSUB _Lbl2000 IF g <> 0 THEN g = 0 GOTO _Lbl190 ENDIF _Lbl1220: p = c LINE (0, 0)-(200, 19), 0, BF CIRCLE (p*20-9,10),6 _Lbl1250: K1$ = INKEY$ IF K1$ = "," OR K1$ = "." OR K1$ = "q" THEN GOTO _Lbl1290 IF K1$ = " " THEN GOTO _Lbl1340 GOTO _Lbl1250 _Lbl1290: IF K1$ = "." AND c < 7 THEN c = c + 1 IF K1$ = "," AND c > 1 THEN c = c - 1 IF K1$ = "q" OR K1$ = "Q" THEN GOTO _Lbl2200 REM GOTO _Lbl1220 _Lbl1340: w1 = 0 ne=((n(c)-c)/7)*20+30 m=p*20-9 IF (n(c)-c)/7 < 0 THEN GOTO _Lbl1220 CIRCLE (m, ne), 6 s(n(c)) = 1 e = 0 GOSUB _Lbl1520 _Lbl1420: IF e<>0 THEN m1$="you win. Press any key." GOSUB _Lbl2000 SOUND 50,500 : PAUSE 500 : SOUND 30,700 s1=s1+1 PAUSE 2000 GOTO _Lbl190 ENDIF n(c) = n(c) - 7 GOTO _Lbl520 _Lbl1520: p=c*20-9 PAUSE 200 LINE (0, 0)-(300, 19), 0, BF LINE (p - 5, 5)-(p + 5, 15), 1, BF FOR a = 0 TO 11 t(a) = 0 NEXT a i = 0 o = n(c) FOR u = o TO o + 21 STEP 7 IF u > 42 THEN GOTO _Lbl1640 t(i) = t(i) + s(u) _Lbl1640: NEXT u i = i + 1 k = c - 3 IF k < 1 THEN k = 1 FOR a = k TO c + 3 IF a > 4 OR a > c THEN GOTO _Lbl1810 FOR B = a TO a + 3 t(i) = t(i) + s(o - c + B) NEXT B i = i + 1 w = o - (c - a) * 8 IF w < 1 OR w > 18 THEN GOTO _Lbl1810 FOR d = 0 TO 3 t(i) = t(i) + s(w) w = w + 8 NEXT d i = i + 1 _Lbl1810: IF a > 7 THEN GOTO _Lbl1900 IF a < 4 OR a < c THEN GOTO _Lbl1900 w = o + (c - a) * 6 IF w < 4 OR w > 21 THEN GOTO _Lbl1900 FOR d = 0 TO 3 t(i) = t(i) + s(w) w = w + 6 NEXT d i = i + 1 _Lbl1900: NEXT a FOR h = 0 TO i d = t(h) IF d = 4 THEN e = 1 IF d = 15 THEN f = c IF d = 10 THEN z = c IF d = 3 THEN x = c IF h <> 0 AND d = 2 THEN y = c NEXT h RETURN _Lbl2000: a = 0 _Lbl2010: a = a + 1 IF a > 7 THEN GOTO _Lbl2110 ELSE IF s(a) = 0 THEN a = 0 GOTO _Lbl2130 ENDIF ENDIF GOTO _Lbl2010 _Lbl2110: m1$ = "Its a draw" g = 1 _Lbl2130: LOCATE 10,150 PRINT m1$; " "; IF m = 0 THEN GOTO _Lbl2180 m = 0 GOTO _Lbl2130 _Lbl2180: IF g <> 0 THEN s3 = s3 + 1 RETURN _Lbl2200: CLS PRINT : PRINT PRINT TAB(20); "Thanks for playing." PRINT TAB(20); "www.thebackshed.com" END Jim VK7JH MMedit MMBasic Help |
||||
James_From_Canb Senior Member Joined: 19/06/2011 Location: AustraliaPosts: 265 |
Glenn, There's an entry on the Microbee Software Preservation Project site that includes a comment about Connect Four. You need a login for the site. It's at link. It looks like one version was written for the Microvision handheld by Robert Hoffberg, according to this link. James My mind is aglow with whirling, transient nodes of thought careening through a cosmic vapor of invention. Hedley Lamarr, Blazing Saddles (1974) |
||||
Print this page |