Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!van-bc!rsoft!mindlink!a634 From: a634@mindlink.UUCP (Rob Prior) Newsgroups: comp.sys.handhelds Subject: Faster TETRIS Update Message-ID: <3848@mindlink.UUCP> Date: 18 Nov 90 00:53:46 GMT Organization: MIND LINK! - British Columbia, Canada Lines: 92 No, this isn't about the ML version... :) I have improved the faster version posted yesterday... Now the program starts at a more reasonable speed and builds up as you play, eventually getting as fast as the original post. Anyways, enough talk, here is the update: Replace: TETRIS, RK2 with the new ones below Delete: RKEY (presumably a test version of RK2, doesn't do anything) Add: delay, a (a will be created by the new TETRIS, if you like) Everything else stays the same. Enjoy the revision! The programs: ==================================CUT HERE====================================== TETRIS \<< .101 'a' STO 1 @ Initializes the delay timer CF MKSCR 0 'PNTS' STO 0 ADDP DO delay FLST @ Decreases the delay before RAND 7 * IP 1 + DUP @ each piece is displayed 'OB1' STO GET 1 DUP 'OB2' STO GET # 11d 1 CF DO IF 1 FC? THEN RK2 RK2 RK2 RK2 END DUP2 # 0d XFIG # 256d + DUP2 # 0d + TFIG IF # 0d == THEN DUP2 # 63903d XFIG ELSE # 256d - # 63903d XFIG # 0d END UNTIL DUP # 0d == END 20 ADDP DROP PACK MEM DROP UNTIL FULL END 2 WAIT WHILE KEY REPEAT DROP END \>> RK2 \<< IF KEY THEN IF { 72 74 73 63 } SWAP POS DUP THEN { \<< # 1d NEG MSIDE \>> \<< # 1d MSIDE \>> \<< 1 SF \>> ROTF } SWAP GET EVAL ELSE DROP END END a WAIT @ Waits the specified time \>> delay @ The program that changes the \<< a .001 - DUP @ wait time IF 0 \<= THEN 0 'a' STO DROP ELSE 'a' STO END \>> a .101 @ the delay ==================================CUT HERE====================================== -- _______________________________________________________________ |Rob Prior - President, Still Animation Logo Design, Burnaby, BC| |---------------------------------------------------------------| | Mail to: a634@mindlink.uucp | | ___ _ or: !uunet!van-bc!rsoft!mindlink!a634 | | /__ /_\ "You must find us.... a shrubbery!!!!!!" | |____/ / \____________________________________________________|