'=========================================================================== ' Subject: FAST STARS (SPRAYING EFFECT) Date: 08-28-97 (13:59) ' Author: Danny Beardsley Code: QB, QBasic, PDS ' Origin: beards@dnai.com Packet: GRAPHICS.ABC '=========================================================================== SCREEN 13 DEF SEG = (&HA000 + &H7D0) 'DEFINT A-Z DIM num AS INTEGER DIM i AS INTEGER num = 5000 TYPE pnt x AS INTEGER y AS INTEGER xs AS INTEGER ys AS INTEGER END TYPE DIM p(5000) AS pnt FOR i = 1 TO 50 OUT &H3C7, i ' Slots 0-15 OUT &H3C9, 0 OUT &H3C9, 0 OUT &H3C9, i OUT &H3C7, i + 50' Slots 0-15 OUT &H3C9, i OUT &H3C9, i OUT &H3C9, 50 NEXT FOR i = 1 TO num p(i).x = 16000 p(i).y = 9000 p(i).xs = RND * 120 - 60 p(i).ys = RND * -90 - 40 NEXT i tim = TIMER DO RANDOMIZE TIMER FOR i = 1 TO num POKE ((p(i).y \ 100) * 320 + (p(i).x \ 100)), 0 IF p(i).y > 9200 THEN p(i).x = 16000 p(i).y = 9000 p(i).xs = RND * 120 - 60 p(i).ys = RND * -90 - 40 END IF p(i).y = p(i).y + p(i).ys p(i).x = p(i).x + p(i).xs p(i).ys = p(i).ys + 1 POKE ((p(i).y \ 100) * 320 + (p(i).x \ 100)), p(i).ys \ 2 + 35 NEXT i w% = w% + 1 LOOP UNTIL INKEY$ = CHR$(27) PRINT w% / (TIMER - tim) SLEEP DO LOOP UNTIL INKEY$ = "" SLEEP PRINT "FAST STARS 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 the fastest STAR routine that I have ever seen." PRINT " If you COMPILE it will be !!!10 times faster!!!!" PRINT " This true movement (800) stars (not just incremented)" 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