"I do believe that he takes too much pride in the brevity of his work" - Mr. Talbot, my geography teacher at age 14
![]() |
For those who don't know, Rheolism is a one-line BBC BASIC V Tetris game. It was written by David Moore and Martin Hollis, after Martin bet David he couldn't do it.
Extra Rheolism is my enhanced version, which fixes two bugs in the original, and implements the following additional features:
The game features multiple key-sets. Either shift is the drop key, and for example '4', '5', and '6' work as left, rotate and right.
This version has been play-tested on an ARM3 A440, with the cache on and off, and the speed chosen accordingly. If you want to change the speed, alter the 6 in the INKEY on line 4, but remember it can only be a single digit. It should be compatible with RISC OS 2 and RISC OS 3. It will run on a Risc PC without modification, provided your monitor can display MODE 9.
The one line is a byte short of maximum length when tokenised, and so very hard to type in. Hence, it is distributed in the form of a file which should be *Exec-ed. If your WWW viewer allows, cut out the listing and save it, set the filetype to 'Command' and double-click on it. This produces the one line BASIC program, so save it and start playing! Alternatively, download it as a !Spark archive (unpack using !Spark or !SparkPlug).
If you want to edit it, I suggest you keep the Command file, as neither the Basic Editor nor !Zap are very happy about the BASIC version.
I'd be very interested if anyone can save 2 more bytes (not including removing 'OFF:' or ':Z') as I have a mechanism for making the game get gradually faster that is quite playable and needs 7 more bytes.
Anyway, here is V2.0 (which is a byte shorter than the V1.0):
| Extra Rheolism - a one line Tetris game *BASIC 0MODE9:OFF:GCOL-9:CLG:REPEATs=s+VPOS:PRINTCHR$30s: 1REPEATSYS6,135TOi,p,d:PRINTTAB(p=0)CHR$9;: 2IF POS=22 VDU3100;VPOS,21;6667;:UNTIL0 ELSE UNTILVPOS=25: 3v=ABSRND MOD7:VDU31:COLOUR3: 4REPEATm=9-INKEY(INKEYTRUE OR 6)MOD3: 5FORr=TRUE TO1:t=r ANDSGNt: 6IFt=r COLOURv-15:VDUr EORm:i+=m=7AND9-6*r:IF0ELSE 7FORn=0TO11:d=n DIV3OR2EORd:VDUd: 8IF1<<(n+i)MOD12AND&C2590EC DIV8^v AND975 t+=POINT(p*POS,31-VPOS<<5): 9IFr VDUp,8:IF0ELSE 10NEXT,:VDU20:UNTILt*LOGm:UNTILVPOS=3:Z b=PAGE+4:FORa=b TOTOP:?b=?a:b=b-(?b<>32):a=a-4*(a?1=13):N. ?(PAGE+3)=b:!b=&FF0D
And here's what it looks like as one line, wrapped at 80 columns:
0MODE9:OFF:GCOL-9:CLG:REPEATs=s+VPOS:PRINTCHR$30s:REPEATSYS6,135TOi,p,d:PRINTTAB (p=0)CHR$9;:IFPOS=22VDU3100;VPOS,21;6667;:UNTIL0ELSEUNTILVPOS=25:v=ABSRNDMOD7:VD U31:COLOUR3:REPEATm=9-INKEY(INKEYTRUEOR6)MOD3:FORr=TRUETO1:t=rANDSGNt:IFt=rCOLOU Rv-15:VDUrEORm:i+=m=7AND9-6*r:IF0ELSEFORn=0TO11:d=nDIV3OR2EORd:VDUd:IF1<<(n+i)MO D12AND&C2590ECDIV8^vAND975t+=POINT(p*POS,31-VPOS<<5):IFrVDUp,8:IF0ELSENEXT,:VDU2 0:UNTILt*LOGm:UNTILVPOS=3:Z
David Moore has written an excellent explanation of how Extra Rheolism works.
Last updated 2012-01-04
<olly@survex.com>