'=========================================================================== ' Subject: FAST FIRE 2 (TORCH-LIKE FLAMES) Date: 08-28-97 (13:59) ' Author: Danny Beardsley Code: QB, QBasic, PDS ' Origin: beards@dnai.com Packet: GRAPHICS.ABC '=========================================================================== 'FAST FIRE BY DANNY BEARDSLEY ' COMPILE ME! 10 TIMES FASTER ' COMPILE ME! 10 TIMES FASTER ' COMPILE ME! 10 TIMES FASTER '_______/----------------\______________ 'This is the fastest fire routine that i have ever seen. 'If you COMPILE it will be !!!10 times faster!!!! 'This is not true fire it only spreads to the left 'If you want more code for other amazing feats then '---------------------------- 'Email: dsb@cyberdude.com 'Homepage: www.dnai.com/~beards ' FFFRRREEEEEEWWWAAARRREEE (just put my name in somewhere if you use it) DIM xo(23) AS INTEGER RANDOMIZE TIMER SCREEN 13 CLS FOR t% = 0 TO 63 ' ' Fade from black to red ' OUT &H3C7, t% ' Slots 0-15 OUT &H3C9, t% OUT &H3C9, 0 OUT &H3C9, 0 ' ' Fade from red to yellow ' OUT &H3C7, t% + 63' Slots 16-31 OUT &H3C9, 63 OUT &H3C9, t% OUT &H3C9, 0 ' ' Fade from yellow to white ' OUT &H3C7, t% + 126' Slots 32-47 OUT &H3C9, 63 OUT &H3C9, 63 OUT &H3C9, t% ' NEXT tim = TIMER FOR cnt% = 1 TO 14000 xx% = RND * 315 yy% = 99 clr = RND * 180 POKE (yy% * 320 + xx%), clr POKE (yy% * 320 + xx% + 1), clr POKE (yy% * 320 + xx% + 2), clr POKE (yy% * 320 + xx% + 3), clr 'LINE (0, 199)-(319, 199), 180 IF cnt% MOD 2 = 2 THEN DEF SEG = (&HA000): ty% = 100 ELSE DEF SEG = (&HA000 + &H7D0): ty% = 99 END IF FOR i% = 0 TO 23 xo(i%) = INT(RND * 3 - 1) NEXT i% FOR y% = 0 TO ty% FOR x% = 0 TO 319 v% = 320 * y% + x% c% = PEEK(v%) + PEEK(v% + 320) + PEEK(v% - xo(co% + 1))' + PEEK(v% - 320) IF c% >= 4 THEN c% = c% \ 3 - 1 POKE (v% - 320), c% co% = (co% + 4) MOD 23 END IF NEXT x% co% = (co% + RND * 6) MOD 23 NEXT y% IF INKEY$ <> "" THEN EXIT FOR NEXT cnt% s = TIMER - tim COLOR 180 PRINT cnt% / s '* 64000 SLEEP SCREEN 12 PRINT "FAST FIRE 2 BY DANNY BEARDSLEY (made in QB4.5)" PRINT "COMPILE ME! 10 TIMES FASTER" PRINT "COMPILE ME! 10 TIMES FASTER" PRINT "COMPILE ME! 10 TIMES FASTER" PRINT "_______________________________________________________" PRINT "This is another one of the fastest fire routines that I " PRINT " have ever seen." PRINT " If you COMPILE it will be !!!10 times faster!!!!" PRINT " This is true fire it only spreads by random amounts" PRINT " If you want more code for other amazing feats then" PRINT "-------------------------------------------------------" PRINT "Email: dsb@cyberdude.com" PRINT "Homepage: www.dnai.com/~beards" PRINT "FREEWARE (just put my name in somewhere if you use it {:-)" SLEEP END 'c% = PEEK(v%) + PEEK(v% - 320) + PEEK(v% + 320) + PEEK(v% - 1) + PEEK(v% + 1) '+ PEEK(v% + 1) ''''''''Torch idea 'TYPE trch ' x AS INTEGER ' clr AS INTEGER ' tim AS INTEGER 'END TYPE 'FOR r% = 0 TO 20 ' IF torch(r%).tim = 0 THEN ' torch(r%).x = RND * 315 ' torch(r%).clr = 180 ' torch(r%).tim = RND * 65 + 10 ' END IF ' POKE (31680 + torch(r%).x), torch(r%).clr ' POKE (31680 + torch(r%).x + 1), torch(r%).clr ' POKE (31680 + torch(r%).x + 2), torch(r%).clr ' POKE (31680 + torch(r%).x + 3), torch(r%).clr 'torch(r%).tim = torch(r%).tim - 1 'NEXT r% 'DIM torch(70) AS trch