Coded in 1 hour, here's a fast (1000 spheres = 60fps here) snow effect, just run it
sync rate 0
sync on
hide mouse
rem Amount = amount of snow particles, 1000 = 60FPS on my machine :)
amount = 1000
rem Speed = How fast should the particles move? keep this between 0.1 and 3 for the best result
speed# = 0.1
rem Lets make the 3d world
make object plain 2,5000,5000
color object 2,rgb(200,200,255)
position object 2,0,0,0
xrotate object 2,90
make object cube 1,20
color object 1,rgb(255,128,0)
position object 1,20,0,20
rem Particles
for a=1000 to 1000+amount
snow_particle_init(a,1)
position object a,0,rnd(300),0
next a
rem The main loop
do
for a=1000 to 1000+amount
snow_particle(a,speed#)
next a
if upkey()=1 then move object 1,1
if leftkey()=1 then yrotate object 1,wrapvalue(object angle y(1)-1)
if rightkey()=1 then yrotate object 1,wrapvalue(object angle y(1)+1)
position object 1,object position x(1),10,object position z(1)
position camera object position x(1)+(sin(object angle y(1)+180)*50),20,object position z(1)+(cos(object angle y(1)+180)*50)
point camera object position x(1),object position y(1),object position z(1)
text 5,10,"Amount of snow particles: "+str$(amount)
text 5,25,"FPS: "+str$(screen fps())
sync
loop
rem Functions
function snow_particle_init(number,image)
make object sphere number,rnd(1)+1
set object number,1,0,0,1
color object number,rgb(255,255,255)
endfunction
function snow_particle(number,speed#)
height# = object position y(number) - speed#
if height# < -5 then height# = 300
position object number,object position x(1)+(sin(number)*100),height#,object position z(1)+(cos(number)*100)
rotate object number,object angle x(number),object angle y(number),wrapvalue(object angle z(number)+1)
endfunction
Quote: "
Amd 2500+ | 1024mb pc2700 | A7N8X-X | Geforce4 ti 4200 128mb"