A particle effect generator (duh).
You can make various different effects using it, smoke, fire, mist, water, sparks, etc.
It includes an editor, 3 premade particle effects and a load and save particle effect option.
Instuctions in the code.
Version 2
The save files from the two versions are not compatable. I will make a convertor if anyone wants one.
rem *****************************
rem * Particle Effect Generator *
rem *****************************
rem * Hamish McHaggis *
rem * 12/8/02 *
rem *****************************
rem * Version 2 *
rem *****************************
`INSTRUCTIONS
`Use the first option to choose from 3 premade effects, or choose to load a file or make a new effect from scratch.
`You can always load a premade effect and edit it to give yourself more of a guideline of the values that will work the best.
`Once you have chosen that option you are presented with a list of variables that can be edited. Some can only have integer
`values such as "number of particles" and may perform an error if given a decimal value. Here is a list of the values and
`what they all do:
`No of images - The number of different randomized images used. The more used, the more random the effect will be. : INT
`X and Y image size - The x and y size of the images in pixels : INT
`No of particles - The number of particles/plains used in the effect : INT
`Particles per deploy - The number of particles deployed at a time:
`Max effect radius - The maximum radius that a dot can be placed within on the particle : DEC
`Effect density - The number of dots on a particle : INT
`Effect speck size - The HALF X and Y size of the dots on a particle : INT
`Effect blurriness - How blurrily the image with be blurred each time it is blurred : INT
`Effect blur times - The number of times the image will be blurred : INT
`Start fadedness - How faded each particle will be when it is deployed at the origin (spinning cube). 0 = Invisible : INT
`Start X and Y size - The size of each particle on deployment : DEC
`Start X and Y pos randomness - The randomness range of the position of each particle apon deployment : DEC
`Fade speed - The speed at which each particle fades : INT
`Rise speed - The speed at which each particle rises : DEC
`Rise speed randomness - How random the rise speed will be : DEC
`Gravity - The force of gravity on each particle : DEC
`Disperse range - The range over which the particles will be scattered along the X axis : INT
`X and Y scale speed - The speed at which each particle is scaled : DEC
`Scale speed randomness - How random the speed at which each particle is scaled will be : DEC
`X and Y scale speed randomness - How random the speed at which each particle's dimensions are scaled will be : DEC
`Start size randomness - How random the particle size will be apon deployment : DEC
`Start X and Y size randomness - How random each dimension of the particles will be at deployment : DEC
`Paricle deploy spacing - The space between each deployment : INT
`Particle deploy randomness - How often the particles will be successfully deployed. A higher number results in a lower success rate : INT
`Value 1,2 and 3 random range - These values are used for colouring the particles. You choose a random range (eg. 100 will generate a
`number from 0 to 100) for each one, then you can assign each colour a random range using the next set
`of variables. The colours are not assigned separate values automatically as you may want to randomize two
`colours but keep them the same colour. In that case you want to use the same random range for each colour : INT
`Use value 1,2 or 3 for red/green/blue - Which value you want to use for each colour (explained above) : INT
`Red/Green/Blue displace - The amount that will be added onto the previously randomized colour values (eg. Adding 50 to a random range of 100 will
`generate a value between 50 and 150) : INT
`(Colour values should be between 0 and 255)
`Use the up and down keys to select a variable, use backspce to clear the value, and type a new value. Press space and the effect will load (unless
`you have entered an impossible figure). You can then use...
`"S" to save your effect
`"E" to edit your effect
`Left and right keys to change the wind direction
`Up and down keys to zoom in and out
`The mouse to move the origin
`Escape to exit
`Have fun making particle effects!
`CODE
set display mode 640,480,32:data 10.0,100.0,100.0,50.0,1.0,40.0,100.0,5.0,8.0,3.0,200.0,6.0,4.0,50.0,30.0,2.0,0.3,0.0,0.0,0.0,5.0,3.0,0.0,0.0,0.0,0.0,1.0,1.0,0.0,0.0,155.0,0.0:sync on:sync rate 40:v=39:dim rn(3):dim f#(v+1):dim t$(v+1):s=1
data 0.0,1.0,1.0,1.0,100.0,100.0,100.0,10.0,100.0,100.0,35.0,1.0,40.0,200.0,1.0,4.0,1.0,400.0,6.0,4.0,50.0,50.0,5.0,1.0,0.0,0.0,1.0,-5.0,-5.0,0.0,0.0,0.0:input "0=load effect / 1=smoke / 2=fire / 3=water / other=new effect : ",p:for x=1 to 3
data 0.0,1.0,1.0,0.0,0.0,0.0,50.0,0.0,1.0,2.0,3.0,255.0,100.0,0.0,10.0,100.0,100.0,100.0,1.0,50.0,50.0,1.0,2.0,1.0,400.0,2.0,2.0,0.0,80.0,0.0,2.0,1.0:for y=1 to v:read v#:if x=p:f#(y)=v#:endif:next y:next x:if p=0:input "Load effect: ",s$
data 0.1,4.0,6.0,6.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,155.0,0.0,0.0,1.0,1.0,2.0,100.0,100.0,255.0,"No of images","Image size X","Image size Y","No of particles","Particles per deploy","Max effect radius","Effect density","Effect speck size"
data "Effect blurriness","Effect blur times","Start fadedness","Start x size","Start y size","Start X pos randomness","Start Y pos randomness","Fade speed","Rise speed","Rise speed randomness","Gravity","Disperse range","X scale speed","Y scale speed"
data "Scale speed randomness","X scale speed randomness","Y scale speed randomness","Start size randomness","Start X size randomness","Start Y size randomness","Particle deploy spacing","Particle deploy randomness","Value1 random range"
data "Value2 random range","Value3 random range","Use value 1,2 or 3 for red?","Use value 1,2 or 3 for green?","Use value 1,2 or 3 for blue?","Red displace","Green displace","Blue displace":load array s$,f#(1):endif:for x=1 to v:read s$
t$(x)=s$:next x:do:repeat:for x=1 to v:if s=x:ink rgb(255,100,100),0:text 300,12*x-4,t$:else:ink rgb(255,255,255),0:text 300,12*x-4,str$(f#(x)):endif:text 10,12*x-4,t$(x)+":":next x:ink rgb(255,255,0),0:text 10,-3,"SPACE TO CONFIRM"
if upkey()=1 and s>1 and h=0:t$="":s=s-1:t$=str$(f#(s)):if t$="0":t$="":endif:endif:if downkey()=1 and s<v and h=0:t$="":s=s+1:t$=str$(f#(s)):if t$="0":t$="":endif:endif:if inkey$()<>"" or upkey()+downkey()<>0:f#(s)=val(t$):if h=0
t$=t$+inkey$():endif:h=1:else:h=0:endif:if keystate(14)=1:t$="":endif:sync:cls:until spacekey()=1:randomize timer():create bitmap 1,f#(2),f#(3):set current bitmap 1:for l=1 to f#(1):for x=1 to f#(7):rn(1)=rnd(f#(31)):rn(2)=rnd(f#(32))
rn(3)=rnd(f#(33)):rc=rn(f#(34))+f#(37):gc=rn(f#(35))+f#(38):bc=rn(f#(36))+f#(39):da=rnd(360):dc=rnd(f#(6)):ink rgb(rc,gc,bc),0:box (f#(2)/2+sin(da)*dc)-f#(8),(f#(2)/2+cos(da)*dc)-f#(8),f#(2)/2+f#(8)+sin(da)*dc,f#(2)/2+f#(8)+cos(da)*dc
next x:for x=1 to f#(10):blur bitmap 1,f#(9):next x:set current bitmap 1:get image l,0,0,f#(2),f#(3):cls:next l:delete bitmap 1:backdrop on:color backdrop rgb(0,0,0):autocam off:hide mouse:set ambient light 0:make object cube 1000,2
ghost object on 1000:p=f#(4):dim s(2,p):dim xm#(p):dim f(p):dim g#(p):dim rr#(p):dim sr(3,p):for x=1 to f#(4):make object plain x,f#(12),f#(13):ghost object on x:texture object x,rnd(f#(1)-1)+1:hide object x:next x:repeat:if upkey()=1
z#=z#+1.0:endif:if downkey()=1:z#=z#-1.0:endif:if leftkey()=1:w#=w#-0.01:endif:if rightkey()=1:w#=w#+0.01:endif:position camera 0,0,-100+z#:mx#=mousemovex():my#=mousemovey():ox#=ox#+mx#/10.0:oy#=oy#-my#/10.0:turn object right 1000,2
pitch object up 1000,1:position object 1000,ox#,oy#,oz#:go=go+1:if rnd(f#(30))=0 and go>f#(29)+1:go=0:for x=1 to f#(5):l=l+1:if l>f#(4):l=1:endif:position object l,ox#+(rnd(f#(14))-f#(14)/2)/10.0,oy#+rnd(f#(15))/10.0,oz#+rnd(30)/10.0-1.5
sz=rnd(f#(26)):s(1,l)=200+rnd(f#(27))+sz:s(2,l)=200+rnd(f#(28))+sz:g#(l)=0:xm#(l)=(rnd(f#(20)*100.0)-f#(20)*50.0)/1000.0:f(l)=f#(11):rr#(l)=rnd(f#(18)*100.0)/100.0:sr(1,l)=rnd(f#(24)):sr(2,l)=rnd(f#(25)):sr(3,l)=rnd(f#(23))
fade object l,f(l):show object l:next x:endif:for x=1 to f#(4):position object x,object position x(x)+w#+xm#(x),object position y(x)+f#(17)+rr#(x)-g#(x),object position z(x):g#(x)=g#(x)+f#(19):s(1,x)=s(1,x)+f#(21)+sr(1,x)+sr(3,x)
s(2,x)=s(2,x)+f#(22)+sr(2,x)+sr(3,x):if s(1,x)<-100:s(1,x)=-100:endif:if s(2,x)<-100:s(2,x)=-100:endif:f(x)=f(x)-f#(16):if f(x)<0:f(x)=0:hide object x:endif:if rnd(1)=0:fade object x,f(x):endif:scale object x,100+s(1,x),100+s(2,x),100
next x:ink rgb(255,255,255),0:text 10,10,"PARTICLE EFFECT GENERATOR By Hamish McHaggis":text 10,30,"FPS: "+str$(screen fps()):text 10,50,"Polys on screen: "+str$(statistic(1)):if lower$(inkey$())="s":cls:backdrop off:wait 100
input "Save file: ",sa$:save array sa$,f#(1):backdrop on:endif:sync:until lower$(inkey$())="e":wait 100:for x=1 to p:delete object x:next x:delete object 1000:loop
Version 1 (Below, source button)
Here are some extra effect files, zipped for convenience...
http://members.lycos.co.uk/dbasic/effects.htm
And screens of the generator. 3 of the effects are built in...
Brains are for idiots.
Athelon XP 1400 Plus - Nvidia Geforce MX400 - 256mb RAM