+nanochess Posted June 23, 2021 Share Posted June 23, 2021 (edited) Hi all. I got pointed to the 10Liner BASIC Game Jam https://itch.io/jam/ascii-basic-10liner And I wondered if a Tetris-like game would be possible, it happens it is!!! But it was amazingly difficult to fit it into 10 lines and 72 characters each line!!! https://nanochess.itch.io/tentris Use your original IBM PC, or DosBox with GW-BASIC. Press A to go left, D to go right, W to rotate. Enjoy it! P.S: The source code 0 P$="BJ@@QJI@JB@@IJQ@IIII@D@@JJ@@JJ@@QQJ@AC@@JII@CQ@@IIJ@CA@@JQQ@QC@@" 1 CLS:B$=CHR$(219):FOR Y=1 TO 19:PRINT,B$,B$:NEXT:PRINT,STRING$(15,B$) 2 X=19:C=X:R=C:WHILE R:D=13:FOR E=16 TO 28:D=D+(SCREEN(R,E)=219):NEXT 3 IF D THEN FOR E=16 TO 28:LOCATE C,E:PRINT CHR$(SCREEN(R,E)):NEXT:C=C-1 4 R=R-1:WEND:Y=0:Z=INT(RND*6)*8:Z=Z-(Z>39)*8:I=8-(Z>31)*8:WHILE 1:C$="" 5 H=0:GOSUB 8:C$=B$:IF H THEN R=Q:X=U:IF A$=""THEN Y=Y-1:GOSUB 8:GOTO 2 6 GOSUB 8:Q=R:U=X:A$=INKEY$:IF""=A$THEN IF TIMER<S THEN 6ELSE S=TIMER+.5 7 C$=" ":GOSUB 8:X=X+(A$="A")-(A$="D"):Y=Y-(A$=""):R=R-(A$="W")*4:WEND 8 FOR C=1 TO 4:D=ASC(MID$(P$,Z+R MOD I+C))-64:W=D\8:WHILE D:D=D-1 AND 7 9 H=H+(SCREEN(Y+C,X+W+D)>32):LOCATE Y+C,X+W+D:PRINT C$:WEND:NEXT:RETURN tentris.zip Edited June 23, 2021 by nanochess 8 1 Quote Link to comment Share on other sites More sharing options...
+eebuckeye Posted June 23, 2021 Share Posted June 23, 2021 Incredible! 1 Quote Link to comment Share on other sites More sharing options...
carlsson Posted June 24, 2021 Share Posted June 24, 2021 Is the limitation at 72 keystrokes per line (because abbreviations are accepted and keywords would get expanded beyond line length) to distinguish from the other BASIC10Liners compo that starts at 80 keystrokes per line? I like the idea but get confused at multiple, very similar formats. This one also doesn't allow UDG but clearly systems with hires drawing capacities may use those instead. 1 Quote Link to comment Share on other sites More sharing options...
Mr SQL Posted June 24, 2021 Share Posted June 24, 2021 13 hours ago, nanochess said: Hi all. I got pointed to the 10Liner BASIC Game Jam https://itch.io/jam/ascii-basic-10liner And I wondered if a Tetris-like game would be possible, it happens it is!!! But it was amazingly difficult to fit it into 10 lines and 72 characters each line!!! https://nanochess.itch.io/tentris Use your original IBM PC, or DosBox with GW-BASIC. Press A to go left, D to go right, W to rotate. Enjoy it! P.S: The source code 0 P$="BJ@@QJI@JB@@IJQ@IIII@D@@JJ@@JJ@@QQJ@AC@@JII@CQ@@IIJ@CA@@JQQ@QC@@" 1 CLS:B$=CHR$(219):FOR Y=1 TO 19:PRINT,B$,B$:NEXT:PRINT,STRING$(15,B$) 2 X=19:C=X:R=C:WHILE R:D=13:FOR E=16 TO 28:D=D+(SCREEN(R,E)=219):NEXT 3 IF D THEN FOR E=16 TO 28:LOCATE C,E:PRINT CHR$(SCREEN(R,E)):NEXT:C=C-1 4 R=R-1:WEND:Y=0:Z=INT(RND*6)*8:Z=Z-(Z>39)*8:I=8-(Z>31)*8:WHILE 1:C$="" 5 H=0:GOSUB 8:C$=B$:IF H THEN R=Q:X=U:IF A$=""THEN Y=Y-1:GOSUB 8:GOTO 2 6 GOSUB 8:Q=R:U=X:A$=INKEY$:IF""=A$THEN IF TIMER<S THEN 6ELSE S=TIMER+.5 7 C$=" ":GOSUB 8:X=X+(A$="A")-(A$="D"):Y=Y-(A$=""):R=R-(A$="W")*4:WEND 8 FOR C=1 TO 4:D=ASC(MID$(P$,Z+R MOD I+C))-64:W=D\8:WHILE D:D=D-1 AND 7 9 H=H+(SCREEN(Y+C,X+W+D)>32):LOCATE Y+C,X+W+D:PRINT C$:WEND:NEXT:RETURN tentris.zip 3.17 kB · 2 downloads Cool BASIC 10 liner! Microsoft GW BASIC looks very similar to Microsoft Extended Color BASIC, might run on both platforms. 1 Quote Link to comment Share on other sites More sharing options...
+OLD CS1 Posted June 24, 2021 Share Posted June 24, 2021 Neat! I am feeling compelled to convert this to TI Extended BASIC. I have all of the statements done, including conversion of the missing WHILE/WEND, and just need to work out the ASCII and screen size differences. (oh, and the missing TIMER equivalent.) 2 Quote Link to comment Share on other sites More sharing options...
+nanochess Posted June 24, 2021 Author Share Posted June 24, 2021 7 hours ago, carlsson said: Is the limitation at 72 keystrokes per line (because abbreviations are accepted and keywords would get expanded beyond line length) to distinguish from the other BASIC10Liners compo that starts at 80 keystrokes per line? I like the idea but get confused at multiple, very similar formats. This one also doesn't allow UDG but clearly systems with hires drawing capacities may use those instead. Apparently no High-res graphics per my interpretation of the rules: Bloxels are allowed as long as they come from the rom character set, but someone drawed an animated checkered floor in a game. 4 hours ago, Mr SQL said: Cool BASIC 10 liner! Microsoft GW BASIC looks very similar to Microsoft Extended Color BASIC, might run on both platforms. It would be cool. Tried MSX-BASIC and misses the SCREEN() operator for reading screen. 3 minutes ago, OLD CS1 said: Neat! I am feeling compelled to convert this to TI Extended BASIC. I have all of the statements done, including conversion of the missing WHILE/WEND, and just need to work out the ASCII and screen size differences. (oh, and the missing TIMER equivalent.) It would be interesting to see. Quote Link to comment Share on other sites More sharing options...
+OLD CS1 Posted June 24, 2021 Share Posted June 24, 2021 57 minutes ago, nanochess said: It would be interesting to see. I will have it figured up in a couple of days (You know, adulting sucks.) 1 Quote Link to comment Share on other sites More sharing options...
DavidD Posted June 25, 2021 Share Posted June 25, 2021 (edited) I wonder if this would run in Blassic (https://blassic.net/)... ... not instantly -- I don't think Blassic likes the SCREEN command, and appears to be reading it as an array. Edited June 25, 2021 by DavidD 1 Quote Link to comment Share on other sites More sharing options...
ed1475 Posted June 25, 2021 Share Posted June 25, 2021 Works great on my Tandy 1000 SL! 3 1 Quote Link to comment Share on other sites More sharing options...
+OLD CS1 Posted June 26, 2021 Share Posted June 26, 2021 On 6/24/2021 at 12:04 PM, nanochess said: It would be interesting to see. It has required shifting a few things around due to XB limitations, the most annoying of which is that FOR cannot exist in an IF-THEN statement. You developed a really neat way to draw the shapes. I am not confident I could meet a line length limit, but XB does impose its own length limitation based upon tokenization. In any case, the SO has dragged me out today to meet up with her parents so I will not be doing anything until tomorrow night. 3 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.