'=========================================================================== ' Subject: PARALLAX SNOW FIELD Date: 05-24-97 (15:20) ' Author: Daniel Davies Code: QB, QBasic, PDS ' Origin: ia53@rapid.co.uk Packet: GRAPHICS.ABC '=========================================================================== 'PARRALAX SNOW FIELD 'by Daniel Davies 'You can use this for whatever you want, just give me some credit for it. 'you can send me and e-mail at :- ia53@rapid.co.uk TYPE snow X AS INTEGER y AS INTEGER END TYPE DIM layer1(100) AS snow DIM layer2(100) AS snow DIM layer3(100) AS snow FOR q% = 0 TO 100 layer1(q%).X = INT(RND * 319): layer1(q%).y = INT(RND * 199) layer2(q%).X = INT(RND * 319): layer2(q%).y = INT(RND * 199) layer3(q%).X = INT(RND * 319): layer3(q%).y = INT(RND * 199) NEXT q% SCREEN 7, , 0, 1 DO FOR snow% = 0 TO 100 layer1(snow%).y = layer1(snow%).y + 3 layer2(snow%).y = layer2(snow%).y + 2 layer3(snow%).y = layer3(snow%).y + 1 layer1(snow%).X = layer1(snow%).X + INT((RND * 3) - 1) layer2(snow%).X = layer2(snow%).X + INT((RND * 3) - 1) layer3(snow%).X = layer3(snow%).X + INT((RND * 3) - 1) PSET (layer3(snow%).X, layer3(snow%).y), 8 PSET (layer2(snow%).X, layer2(snow%).y), 7 PSET (layer1(snow%).X, layer1(snow%).y), 15 NEXT snow% FOR checksnow% = 0 TO 100 IF layer1(checksnow%).X >= 320 THEN layer1(checksnow%).X = 0 IF layer2(checksnow%).X >= 320 THEN layer2(checksnow%).X = 0 IF layer3(checksnow%).X >= 320 THEN layer3(checksnow%).X = 0 IF layer1(checksnow%).X < 0 THEN layer1(checksnow%).X = 319 IF layer2(checksnow%).X < 0 THEN layer2(checksnow%).X = 319 IF layer3(checksnow%).X < 0 THEN layer3(checksnow%).X = 319 IF layer1(checksnow%).y >= 200 THEN layer1(checksnow%).X = INT(RND * 319) layer1(checksnow%).y = 0 END IF IF layer2(checksnow%).y >= 200 THEN layer2(checksnow%).X = INT(RND * 319) layer2(checksnow%).y = 0 END IF IF layer3(checksnow%).y >= 200 THEN layer3(checksnow%).X = INT(RND * 319) layer3(checksnow%).y = 0 END IF NEXT checksnow% PCOPY 0, 1 CLS LOOP WHILE INKEY$ = ""