Ok here is my final draft of my program for this challenge. I could improve more on it but i think this is all i'll do. I just added in the sound recording part where you have to indignify yourself by making fire works noises Haha! And I made the fireworks more fancy.
Rem Project: Fire Works 3d
Rem Created: 7/27/2009 7:18:16 PM
Rem Jesus is The Way the Truth and the Life
Rem ***** Main Source File *****
set display mode 1024,768,16
backdrop off
sw=screen width()
sh=screen height()
set camera range 0.1,100000
maxfire=10
stars=7777
Camera$="Aim"
camax#=270
weight#=0.2
hud=1
while spacekey()=0
cls
Print "Press Spacekey to Record Whistle Sound"
sync
endwhile
record sound 2,3000
wait 200
while spacekey()=0
cls
Print "Press Again To Stop Recording..."
sync
endwhile
stop recording sound
cls
Print "Recording stopped"
sync
wait 500
while spacekey()=0
cls
Print "Press Spacekey to Record Explosion Sound"
sync
endwhile
record sound 1,3000
wait 200
while spacekey()=0
cls
Print "Press Again To Stop Recording..."
sync
endwhile
stop recording sound
cls
for s=1 to stars
starcolor=RGB(255,255,200+rnd(55))
dot rnd(sw),rnd(sh),starcolor
next stars
sync
get image 1000,0,0,sw,sh,1
for x=0 to 50
for y=0 to 50
shade=rnd(30)-20
dot x,y,RGB(0,59+shade,0)
next y
next x
sync
for d=1 to 300
shade=rnd(30)-20
dot rnd(50),rnd(50),RGB(59+shade,25+shade/2,0)
next d
get image 2,0,0,50,50,3
box 0,0,200,20,RGB(0,0,0),RGB(0,0,0),RGB(0,0,0),RGB(0,0,0)
radius=10
for g=0 to 9
ay#=0
mx=g*20+10
my=10
if g=0 then rd#=1 : gr#=0 : bl#=0
if g=1 then rd#=0 : gr#=1 : bl#=0
if g=2 then rd#=0 : gr#=0 : bl#=1
if g=3 then rd#=1 : gr#=1 : bl#=0
if g=4 then rd#=0 : gr#=1 : bl#=1
if g=5 then rd#=0.5 : gr#=0 : bl#=1
if g=6 then rd#=1 : gr#=1 : bl#=1
if g=7 then rd#=1 : gr#=0.5 : bl#=0.5
if g=8 then rd#=0.5 : gr#=1 : bl#=1
if g=9 then rd#=1 : gr#=0 : bl#=0.5
for x=mx-radius to mx+radius
ay#=ay#+Wrapvalue(180/(radius*2))
ah#=newxvalue(0,ay#,255)
`a#=-(180/(radius*2))
a#=0
for y=my-radius to my+radius
a#=Wrapvalue(a#+180/(radius*2))
h#=newxvalue(0,a#,ah#)
base=point(x,y)
rd=RGBR(base)+h#*rd#
gr=RGBG(base)+h#*gr#
bl=RGBB(base)+h#*bl#
if rd<0 then rd=0
if gr<0 then gr=0
if bl<0 then bl=0
if rd>255 then rd=255
if gr>255 then gr=255
if bl>255 then bl=255
dot x,y,RGB(rd,gr,bl)
next y
next x
sync
get image g+3,g*20,0,g*20+20,20,3
next g
cls
box 0,0,100,30,RGB(255,255,255),RGB(255,255,255),RGB(255,255,255),RGB(255,255,255)
for t=0 to 4
for u=-5 to 4
if ABS(u)=>2 then ink RGB(0,0,255),RGB(0,0,0) else ink RGB(255,0,0),RGB(0,0,0)
line t*20,30+u,t*20+10,u
next u
next t
for t=0 to 4
for u=-5 to 4
if ABS(u)=>2 then ink RGB(0,0,255),RGB(0,0,0) else ink RGB(255,0,0),RGB(0,0,0)
line t*20+10,u,t*20+20,u+30
next u
next t
sync
get image 11,0,0,40,20,3
autocam off
make object sphere 1000,7000,16,16
texture object 1000,1000
set object cull 1000,0
make matrix 1,7000,7000,70,70
position matrix 1,-3500,0,-3500
prepare matrix texture 1,2,1,1
for angle=1 to 30
radius=20
height=100+rnd(300)
dis=30
mx=newxvalue(35,angle*(360/30),dis)
mz=newzvalue(35,angle*(360/30),dis)
ay#=-(180/(radius*2))
for x=mx-radius to mx+radius
ay#=ay#+Wrapvalue(180/(radius*2))
ah#=newxvalue(0,ay#,height)
a#=-(180/(radius*2))
for z=mz-radius to mz+radius
a#=Wrapvalue(a#+180/(radius*2))
h#=newxvalue(0,a#,ah#)
if x>=0 and x<=70 and z>=0 and z<=70
set matrix height 1,x,z,get matrix height(1,x,z)+h#
endif
next z
next x
next angle
update matrix 1
rem fire works
dim fireworks(maxfire,1)
dim fws(maxfire,7)
dim grav#(maxfire)
dim loada#(maxfire)
position camera 0,200,0
make object cone 1,15
make object cylinder 2,10
scale object 2,100,500,100
make mesh from object 1,2
delete object 2
add limb 1,1,1
texture object 1,11
offset limb 1,1,0,-30,0
xrotate object 1,90
fix object pivot 1
set object cull 1,0
scale object 1,50,50,50
for f=2 to maxfire
clone object f,1,1
next f
delete mesh 1
make object cylinder 2000,250
scale object 2000,100,15,100
make object cylinder 2001,262
scale object 2001,100,15,100
make object box 2002,100,30,10
position object 2002,-180,0,0
texture object 2002,11
color object 2000,RGB(0,0,255)
set object ambience 2000,RGB(0,0,255)
set object diffuse 2000,RGB(0,0,255)
color object 2001,RGB(70,70,70)
set object ambience 2001,RGB(255,255,255)
set object diffuse 2001,RGB(70,70,70)
for t=2000 to 2001
set object cull t,0
next t
carta#=270
for f=1 to maxfire
xrotate object f,270
position object f,newxvalue(0,carta#,127.6),24,newzvalue(0,carta#,127.6)
loada#(f)=carta#
dec carta#,12
make particles 999+f,6,10,10
set particle speed 999+f,0.1
set particle gravity 999+f,0
rotate particles 999+f,180,0,0
set particle emissions 999+f,0
set particle floor 999+f,0
set particle velocity 999+f,7
rotate particles 999+f,180,0,0
next f
make object sphere 300,4
make object cylinder 301,100
scale object 301,2,50,2
make mesh from object 301,301
make object box 302,2,2,20
make mesh from object 302,302
delete object 301
delete object 302
add limb 300,1,301
add limb 300,2,301
add limb 300,3,302
offset limb 300,1,0,-24,-10
offset limb 300,2,0,-24,10
offset limb 300,3,0,0,0
delete mesh 301
delete mesh 302
position object 300,0,50,0
make object cylinder 301,100
scale object 301,4,100,4
zrotate object 301,90
position object 301,-180,4,-10
make object cylinder 302,100
scale object 302,4,100,4
zrotate object 302,90
position object 302,-180,4,10
for t=301 to 302
color object t,RGB(80,80,80)
set object diffuse t,RGB(90,90,90)
set object ambience t,RGB(70,70,70)
next t
color object 300,RGB(255,0,0)
set object diffuse 300,RGB(255,0,0)
set object ambience 300,RGB(255,255,255)
set object ambient 300,0
color limb 300,1,RGB(0,0,255)
color limb 300,2,RGB(0,0,255)
color limb 300,3,RGB(255,255,255)
make object box 303,40,35,40
position object 303,0,17.5,125
texture object 303,11
make object cylinder 304,20
position object 304,0,10,0
make object sphere 305,50
scale object 305,100,0.5,100
position object 305,0,20,0
make object sphere 306,100
color object 306,RGB(0,255,255)
position object 306,0,20,0
ghost object on 306
make object box 307,2,2,100
make object box 308,100,2,2
position object 307,0,20,0
position object 308,0,20,0
make object sphere 309,14
position object 309,0,30,0
set reflection shading on 309
for t=304 to 308
if t<>306
color object t,RGB(80,80,80)
set object diffuse t,RGB(90,90,90)
set object ambience t,RGB(70,70,70)
endif
next t
empty checklist
perform checklist for fonts
for t=1 to checklist quantity()
if checklist string$(t)="Arial Bold" then set text font "Arial Bold"
if checklist string$(t)="Biondi" then set text font "Biondi"
next t
set text size 20
rem **********************************************************************************************************
rem *************************************************LOADING**************************************************
rem **********************************************************************************************************
sync on
sync rate 60
do
ink RGB(0,255,255),RGB(0,0,0)
camx#=camera position x()
camy#=camera position y()
camz#=camera position z()
if controlkey()=1 then inc con else con=0
if con=1 and Camera$="Aim" then Camera$="Free" : con=2
if con=1 and Camera$="Free" then Camera$="Aim" : con=2 : rotate camera 270,0,0
if spacekey()=1 then inc fire else fire=0
if fire=1 and loaded>0
loada#(loaded)=0
play sound 2
`if fw>maxfire then fw=1
fws(loaded,4)=40+rnd(20)
fws(loaded,1)=object position x(loaded)
fws(loaded,2)=0
fws(loaded,3)=object position z(loaded)
fws(loaded,0)=1
if camera$="Aim" then rotate object loaded,camax#,0,camaz#
position object loaded,fws(loaded,1),fws(loaded,2),fws(loaded,3)
set particle emissions 999+loaded,20
loaded=0
loading=0
endif
rem fireworks in the air
for f=1 to maxfire
if fws(f)=1
move object f,30
if fws(f,2)>60 and fws(f,2)<100 then set particle emissions 999+f,0
position particles 999+f,fws(f,1),fws(f,2)-10,fws(f,3)
fws(f,1)=object position x(f)
fws(f,2)=object position y(f)
fws(f,3)=object position z(f)
grav#(f)=grav#(f)+weight#
position object f,fws(f,1),fws(f,2)-grav#(f),fws(f,3)
fws(f,5)=fws(f,1)
fws(f,6)=fws(f,2)
fws(f,7)=fws(f,3)
dec fws(f,4)
if fws(f,4)<=0 or fws(f,2)-grav#(f)<get ground height(1,fws(f,1)+3500,fws(f,3)+3500)
inc explosion
if explosion>maxfire then explosion=1
make particles explosion,rnd(9)+3,10,21+rnd(14)
set particle floor explosion,0
position particles explosion,fws(f,1),fws(f,2),fws(f,3)
set particle velocity explosion,7+rnd(7)
set particle speed explosion,0.1
set particle gravity explosion,0
set particle emissions explosion,14
set particle life explosion,200
play sound 1
make particles explosion+3000,rnd(9)+3,10,21+rnd(14)
set particle floor explosion+3000,0
position particles explosion+3000,fws(f,1),fws(f,2),fws(f,3)
set particle velocity explosion+3000,7+rnd(7)
set particle speed explosion+3000,0.1
set particle gravity explosion+3000,0
set particle emissions explosion+3000,7
if rnd(5)=1
rotate particles explosion+3000,Wrapvalue(object angle x(f)+180),object angle y(f),object angle z(f)
rotate particles explosion,object angle x(f),object angle y(f),object angle z(f)
else
rotate particles explosion+3000,Wrapvalue(object angle x(f)+90),object angle y(f),object angle z(f)
rotate particles explosion,Wrapvalue(object angle x(f)+90),object angle y(f),object angle z(f)
endif
`rotate particles explosion,Wrapvalue(camax#+90),Wrapvalue(camera angle y()),0
fireworks(explosion,0)=1
fws(f,1)=0
fws(f,2)=0
fws(f,3)=0
fws(f,0)=0
fws(f,4)=0
position object f,0,0,0
rotate object f,270,0,0
grav#(f)=0
loada#(f)=0
endif
endif
next f
rem fire works on ground
loading=0
carta#=280
for f=1 to maxfire
if fws(f,0)=0
xrotate object f,270
nla#=280
for a=1 to maxfire
if loada#(a)>loada#(f) and loada#(a)<nla# then nla#=loada#(a)
next a
if loada#(f)=>270 and loading=f or loading=0 and loada#(f)=>270
if loaded=0
loadx#=object position x(f)
loady#=object position y(f)
loadz#=object position z(f)
if loady#<40 then inc loady#,7 : loading=f
if loady#=>40 and loadx#>-210 then dec loadx#,10 : loading=f : else loading=0
if loading>0
position object 300,loadx#,loady#,loadz#
if oldloading=0 then rotate object loading,270+rnd(30)-15,0,Wrapvalue(rnd(30)-15)
endif
position object f,loadx#,loady#,loadz#
if loadx#<-200 and loady#<50 then loaded=f else loaded=0
endif
else
if loada#(f)<nla#-10 then loada#(f)=Wrapvalue(loada#(f)+3)
position object f,newxvalue(0,loada#(f),127.6),24,newzvalue(0,loada#(f),127.6)
endif
endif
next t
oldloading=loading
rem explosions
for f=1 to maxfire
if fireworks(f,0)=1
inc fireworks(f,1),1
if fireworks(f,1)=15 then set particle emissions f+3000,0
if fireworks(f,1)=23 then set particle emissions f+3000,25
if fireworks(f,1)=30 then set particle emissions f,0 : set particle emissions f+3000,0
if fireworks(f,1)>130 then delete particles f : fireworks(f,0)=0 : fireworks(f,1)=1 : delete particles f+3000
endif
next f
if camera$="Free"
Center text sw/2,0,"Press Spacekey To Launch"
Center text sw/2,30,"Use WSAD or arrow Keys To Move The Camera"
camay#=Wrapvalue(camera angle y()+mousemovex()/3.0)
camax#=Wrapvalue(camera angle x()+mousemovey()/3.0)
rotate camera camax#,camay#,0
if upkey()=1 or keystate(17)=1 then move camera 10
if downkey()=1 or keystate(31)=1 then move camera -10
camx#=camera position x()
camy#=camera position y()
camz#=camera position z()
if rightkey()=1 or keystate(32)=1
camx#=newxvalue(camx#,Wrapvalue(camay#+90),10)
camz#=newzvalue(camz#,Wrapvalue(camay#+90),10)
endif
if leftkey()=1 or keystate(30)=1
camx#=newxvalue(camx#,Wrapvalue(camay#-90),10)
camz#=newzvalue(camz#,Wrapvalue(camay#-90),10)
endif
position camera camx#,camy#,camz#
endif
if camera$="Aim"
Center text sw/2,0,"Press Spacekey To Launch"
Center text sw/2,30,"Use WSAD Keys To Aim"
Center text sw/2,50,"Press The Enter Key To Toggle The Targetting System"
if returnkey()=1 then inc hudt else hudt=0
if hudt=1 then inc hud : if hud>1 then hud=0
if keystate(17)=1 or upkey()=1 then inc up#,0.1
if keystate(31)=1 or downkey()=1 then dec up#,0.1
if keystate(30)=1 or leftkey()=1 then dec side#,0.1
if keystate(32)=1 or rightkey()=1 then inc side#,0.1
rem camera bounds
if up#>0 then dec up#,0.05
if up#<0 then inc up#,0.05
if side#>0 then dec side#,0.05
if side#<0 then inc side#,0.05
if up#>2 then up#=2
if up#<-2 then up#=-2
if side#>2 then side#=2
if side#<-2 then side#=-2
if up#>-0.05 and up#<0.05 then up#=0
if side#>-0.05 and side#<0.05 then side#=0
camaz#=Wrapvalue(camaz#-side#)
camax#=Wrapvalue(camax#-up#)
if camax#>330 then camax#=330 : up#=-up#/1.5
if camax#<200 then camax#=200 : up#=-up#/1.5
if camaz#<290 and camaz#>180 then camaz#=290 : side#=-side#/1.5
if camaz#>70 and camaz#<180 then camaz#=70 : side#=-side#/1.5
position camera 0,40,0
rotate camera camax#,0,camaz#
if loaded>0
rotate object loaded,camax#,0,camaz#
endif
rem Targeting System
live=0
if hud=1
for f=1 to maxfire
if fws(f,0)=1 and object in screen(f)=1
sox=object screen x(f)
soy=object screen x(f)
dis#=sqrt((fws(f,1))^2+(fws(f,2))^2+(fws(f,3))^2)
ink RGB(0,255,0),RGB(0,0,0)
circle sox,soy,(dis#/100)
TEXT sox,soy,"Distance : "+STR$(dis#,2)
live=1
endif
next f
if live=1 then ink RGB(0,255,0),RGB(0,0,0) : ink RGB(255,0,0),RGB(0,0,0)
line sw/2-200,sh/2,sw/2-100,sh/2
line sw/2+200,sh/2,sw/2+100,sh/2
line sw/2,sh/2-50,sw/2,sh/2-100
line sw/2,sh/2+50,sw/2,sh/2+100
endif
endif
position object 1000,camera position x(),camera position y(),camera position z()
set cursor 0,0
if loaded>0 then Print "Fire Work Cartridge in Place" else if loading>0 then Print "Loading Cartridge..."
Text sw-text width("Toggle Camera Modes With The Control Key"),sh-30,"Toggle Camera Modes With The Control Key"
sync
loop
I hope i'm not too late!
Randomnosity is a special influence upon man kind allowing one to think outside the usual bouderies and into a fantastic world created by oneself. Elephants don't cut it