Any one got any nice out door snow FX i could play with? Mine is just a load of particals and REALY Eats my processor :o(
if you have suguestions or sample codes i could look at ?
if you have suguestions or sample codes i could look at ?
Graphics3D 800,600 SetBuffer BackBuffer() Global camera=CreateCamera() PositionEntity camera,0,2,0 Global light=CreateLight() Global plane=CreatePlane() EntityColor plane,50,50,250 Global tex=CreateTexture(32,32,1+4) SetBuffer TextureBuffer(tex) Color 255,255,255 Oval 0,0,32,32 SetBuffer BackBuffer() Global main_sprite=CreateSprite() EntityTexture main_sprite,tex HideEntity main_sprite Dim cubes(15) For loop=0 To 15 cubes(loop)=CreateCube() PositionEntity cubes(loop),Rnd(-30,30),0,Rnd(-30,30) Next Type particle Field x#,y#,z# Field angle# Field distance# Field ent Field speed# Field alpha# Field size# End Type Global snow_parts=50; NUMBER OF SNOW PARTICLES!!! Global distance=40; CHANGE THIS FOR A GREATER RADIUS OF SNOW!!! For loop=1 To snow_parts p.particle=New particle p\ent=CopyEntity(main_sprite) p\angle=Rnd(0,359) p\distance=Rnd(3,distance) p\x=EntityX(camera)+Cos(p\angle)*p\distance p\z=EntityZ(camera)+Sin(p\angle)*p\distance p\y=EntityY(camera) PositionEntity p\ent,p\x,p\y,p\z p\speed=Rnd(0.1,0.8) p\size=Rnd(0.1,0.8) ScaleSprite p\ent,p\size,p\size EntityAutoFade p\ent,0,distance Next While Not KeyHit(1) If KeyDown(200) Then MoveEntity camera,0,0,0.2 If KeyDown(208) Then MoveEntity camera,0,0,-0.2 If KeyDown(203) Then TurnEntity camera,0,1,0 If KeyDown(205) Then TurnEntity camera,0,-1,0 updateparticles(EntityX(camera),EntityY(camera),EntityZ(camera)) UpdateWorld RenderWorld Flip Wend End Function updateparticles(x#,y#,z#) For p.particle=Each particle p\y=p\y-p\speed PositionEntity p\ent,p\x,p\y,p\z If p\y<(y-3) Then p\y=y+10 p\angle=Rnd(0,359) p\distance=Rnd(3,distance) p\x=EntityX(camera)+Cos(p\angle)*p\distance p\z=EntityZ(camera)+Sin(p\angle)*p\distance p\speed=Rnd(0.1,0.8) PositionEntity p\ent,p\x,p\y,p\z p\size=Rnd(0.1,0.8) ScaleSprite p\ent,p\size,p\size End If Next End Function