'=========================================================================== ' Subject: PIXEL EXPLOSIONS Date: 03-04-97 (19:28) ' Author: Nick Kochakian Code: QB, QBasic, PDS ' Origin: NickK@worldnet.att.net Packet: GRAPHICS.ABC '=========================================================================== '---------------------------------------------------------------------------- 'Pixel explosions ' '1997 By: - Nick Kochakian - ' 'Have fun! :) '---------------------------------------------------------------------------- RANDOMIZE TIMER SCREEN 13 DEFINT A-Z pixels = 100 'How many pixles to explode px = pixels py = pixels dir = pixels onc = pixels DIM x(px) DIM y(py) DIM d(dir) DIM o(onc) px = 1 py = 1 dir = 1 pixe2 = pixels FOR i = 1 TO pixe2 x(px) = 100 y(py) = 100 d(dir) = INT(RND * 13) + 1 o(onc) = 0 px = px + 1 py = py + 1 dir = dir + 1 NEXT i px = 1 py = 1 dir = 1 onc = 1 FOR i = 1 TO pixe2 d(dir) = INT(RND * 13) + 1 dir = dir + 1 NEXT i dir = 1 cnt = 0 DO PSET (x(px), y(py)), 0 IF x(px) = 100 THEN d(dir) = INT(RND * 13) + 1 END IF pix2 = pixels IF y(py) = 10 THEN d(dir) = INT(RND * 13) + 1 END IF IF d(dir) = 1 THEN x(px) = x(px) + 1 IF d(dir) = 2 THEN y(py) = y(py) + 1 IF d(dir) = 3 THEN x(px) = x(px) + 1: y(py) = y(py) + 1 IF d(dir) = 4 THEN x(px) = x(px) - 1: y(py) = y(py) + 1 IF d(dir) = 5 THEN x(px) = x(px) + 1: y(py) = y(py) - 1 IF d(dir) = 6 THEN x(px) = x(px) - 1: y(py) = y(py) - 1 IF d(dir) = 7 THEN x(px) = x(px) - 1 IF d(dir) = 8 THEN y(py) = y(py) - 1 IF d(dir) = 9 THEN x(px) = x(px) + 2 IF d(dir) = 10 THEN x(px) = x(px) - 1: y(py) = y(py) + 1 IF d(dir) = 11 THEN x(px) = x(px) - 2 IF d(dir) = 12 THEN x(px) = x(px) + 3 IF d(dir) = 13 THEN x(px) = x(px) - 2 PSET (x(px), y(py)), 15 IF x(px) < 0 THEN o(onc) = 1 IF y(py) > 300 THEN o(onc) = 1 IF x(px) > 200 THEN o(onc) = 1 IF y(py) < 1 THEN o(onc) = 1 'FOR i = 1 TO 9999 'NEXT i 'To make the program run faster comment the stuff below until you hit the 'dotted line cntrr = 1 oncbak = onc onc = 1 FOR i = 1 TO pixels IF o(onc) = 1 THEN cntrr = cntrr + 1 onc = onc + 1 NEXT i onc = oncbak IF cntrr >= pixels THEN cnt = 2 '- - - - - - - - - - - - ---- -- --- -- --------------------------------- px = px + 1 py = py + 1 dir = dir + 1 onc = onc + 1 IF px > pixels THEN px = 1 IF py > pixels THEN py = 1 IF dir > pixels THEN dir = 1 IF onc > pixels THEN onc = 1 LOOP UNTIL INKEY$ <> "" OR cnt = 2 END