I totally screwed up and didn't have enough time, but that was just false planning of mine... (<-- hey, it rimes!)
So this is my entry so far, it is not anywhere near complete, and I'm not overall happy with it, but enjoy!
rem DarkBasic Challenge
rem Fireworks
rem by TheComet - Slinki Software
remstart
-------------------------------------------------------
Firework list
-------------------------------------------------------
-Smoke Bomb
-Small rocket
-Volcano
-Catherine wheel
-Witches Hat
-Parachute Rocket
-Flare Tube
-Saturn Rocket Pack
-Twinkle Star
-Flashing Thunder
-Thunder King
-------------------------------------------------------
remend
rem set highest display mode
sw=0:sh=0:sd=0
perform checklist for display modes
for t=1 to checklist quantity()
w=checklist value a(t)
h=checklist value b(t)
d=checklist value c(t)
if w>sw then sw=w
if h>sh then sh=h
if d>sd then sd=d
next t
set display mode sw,sh,sd
rem setup screen
sync on
sync rate 60
backdrop on
color backdrop 0
hide mouse
set camera range 1,100000
rem arrays
dim smoke(125)
dim smoke_sc(125)
dim rocketfl(60)
dim volc(200)
dim volc_grav#(200)
dim volc_a#(200)
dim volc_sp#(200)
rem generate media and objects
gosub create_images
gosub create_landscape
rem make fireworks
smoke_bomb(4)
position object 4,0,5,0
small_rocket(5)
position object 5,0,10,0
volcano(6)
position object 6,0,5,0
hide object 5
hide object 6
rem make smoke bomb particles
for t=15 to 140
make object plain t,10,10
texture object t,1
ghost object on t
hide object t
next t
rem make rocket flares
for t=141 to 200
make object plain t,2,2
set object t,1,0,0
hide object t
next t
rem variables
smoke_part=15
smoke_tex=rnd(6)+1
rocketfl_part=141
rocketfl_tex=rnd(6)+8
work=0
dist=20
rem main loop
ink rgb(255,255,255),0
do
rem control camera
y#=object position y(work+4)
oldmz=mz
mz=mousemovez()
inc dist,oldmz-mz
inc height,mousemovey()/2
angle=wrapvalue(angle+mousemovex()/2)
set camera to follow 0,0,0,angle,dist,height,10,0
point camera 0,y#,0
rem switch between fireworks
if leftkey()=1 and push=0 then dec work:push=1:if work<0 then work=0:push=0
if rightkey()=1 and push=0 then inc work:push=1:if work>2 then work=2:push=0
if push=1
for t=4 to 6:hide object t:next t:show object work+4
for t=4 to 6:hide object t:next t:show object work+4
endif
if scancode()=0 then push=0
rem info
if work=0 then info$="Smoke Bomb"
if work=1 then info$="Rocket : Click mouse to start"
if work=2 then info$="Volcano"
center text screen width()/2,20,info$
rem restore size
if push=1
for t=15 to 200
scale object t,100,100,100
next t
endif
rem make smoke come from smoke bomb
if work=0
inc smoke_part:if smoke_part=141 then smoke_part=15
position object smoke_part,0,10,0
texture object smoke_part,smoke_tex
smoke(smoke_part-15)=1
smoke_sc(smoke_part-15)=0
if rnd(200)=0 then smoke_tex=rnd(6)+1
show object smoke_part
endif
rem make particles rise in random directions
for t=15 to 140
if smoke(t-15)=1
smoke_sc(t-15)=smoke_sc(t-15)+1
scale object t,smoke_sc(t-15),smoke_sc(t-15),smoke_sc(t-15)
position object t,object position x(t)+((rnd(100)-50)/48),object position y(t)+0.2,object position z(t)+((rnd(100)-50)/48)
point object t,camera position x(),camera position y(),camera position z()
rotate object t,object angle x(t),object angle y(t),0
if smoke_sc(t-15)>120 then smoke(t-15)=0:hide object t
endif
next t
rem start rocket
if start=0 and mouseclick()=1 then start=1
rem move rocket up
if work=1 and start=1
position object 5,object position x(5),object position y(5)+0.6,object position z(5)
if y#>150 then start=2
endif
rem spray flares out the bottom
if work=1 and start=1
inc rocketfl_part:if rocketfl_part=201 then rocketfl_part=141
position object rocketfl_part,object position x(5),object position y(5),object position z(5)
rocketfl_tex=rnd(6)+8
texture object rocketfl_part,rocketfl_tex
rocketfl(rocketfl_part-141)=1
show object rocketfl_part
else
if work!1 then start=0:escale=100
if start=0 then position object 5,0,10,0
endif
rem explode
if start=2
for t=15 to 200
position object t,object position x(5),object position y(5),object position z(5)
rotate object t,rnd(360),rnd(360),0
if t<141 then texture object t,rnd(6)+1
show object t
boom#=7
next t
start=3
hide object 5
endif
rem control flares
for t=141 to 200
if rocketfl(t-141)!0
rocketfl(t-141)=rocketfl(t-141)+1
position object t,object position x(t)+((rnd(100)-50)/40),object position y(t)-1,object position z(t)+((rnd(100)-50)/40)
if rocketfl(t-141)=40 then rocketfl(t-141)=0:hide object t
point object t,camera position x(),camera position y(),camera position z()
rotate object t,object angle x(t),object angle y(t),0
endif
next t
rem explode
if start>2 and work=1
inc start
for t=15 to 200
move object t,boom#+(rnd(100)/100)
position object t,object position x(t),object position y(t)-0.2,object position z(t)
scale object t,escale,escale,escale
next t
boom#=curvevalue(0,boom#,20)
if start>70 then dec escale:if escale<0 then for t=15 to 200:hide object t:next t:start=0:for t=15 to 200:scale object t,100,100,100:next t:escale=100:show object 5
endif
rem volcano
if work=2
for x=0 to 12
inc rocketfl_part:if rocketfl_part=201 then rocketfl_part=141
if rnd(5)=0
inc smoke_part:if smoke_part=141 then smoke_part=15
position object smoke_part,0,10,0
volc(smoke_part-15)=1
volc_grav#(smoke_part-15)=rnd(50)/10
volc_a#(smoke_part-15)=rnd(360)
volc_sp#(smoke_part-15)=rnd(10)+1
show object smoke_part
texture object smoke_part,rnd(6)+1
scale object smoke_part,30,30,30
else
position object rocketfl_part,0,10,0
volc(rocketfl_part-15)=1
volc_grav#(rocketfl_part-15)=rnd(50)/10
volc_a#(rocketfl_part-15)=rnd(360)
volc_sp#(rocketfl_part-15)=rnd(10)+1
show object rocketfl_part
texture object rocketfl_part,rnd(6)+8
endif
next x
endif
rem control volcano particles
for t=15 to 200
if volc(t-15)!0
volc(t-15)=volc(t-15)+1
volc_grav#(t-15)=volc_grav#(t-15)-0.1
position object t,newxvalue(object position x(t),volc_a#(t-15),volc_sp#(t-15)/10),object position y(t)+volc_grav#(t-15),newzvalue(object position z(t),volc_a#(t-15),volc_sp#(t-15)/10)
if volc(t-15)>180 then volc(t-15)=0
point object t,camera position x(),camera position y(),camera position z()
rotate object t,object angle x(t),object angle y(t),0
endif
next t
rem refresh screen
sync
rem end of main loop
loop
rem Subroutines -------------------------------------------------------------
create_images:
rem white, blue, red, green, yellow, light blue, pink particles
for t=1 to 7:create bitmap t,64,64:next t
for b=1 to 7
set current bitmap b
ink 0,0
box 0,0,63,63
for t=0 to 2000
rx=rnd(32)
ry=rnd(32)
r=(rx+ry)/2
i=255-(r*8):if i<0 then i=0
if b=1 then ink rgb(i,i,i),0
if b=2 then ink rgb(0,0,i),0
if b=3 then ink rgb(i,0,0),0
if b=4 then ink rgb(0,i,0),0
if b=5 then ink rgb(i,i,0),0
if b=6 then ink rgb(0,i,i),0
if b=7 then ink rgb(i,0,i),0
ellipse 32,32,rx,ry
next t
get image b,0,0,64,64
delete bitmap b
next b
rem white, blue, red, green, yellow, light blue, pink sparks
for b=1 to 7
create bitmap 1,16,64
ink rgb(0,0,0),0
box 0,0,15,63
if b=1 then ink rgb(255,255,255),0
if b=2 then ink rgb(0,0,255),0
if b=3 then ink rgb(255,0,0),0
if b=4 then ink rgb(0,255,0),0
if b=5 then ink rgb(255,255,0),0
if b=6 then ink rgb(0,255,255),0
if b=7 then ink rgb(255,0,255),0
circle -200,64,214
for t=1 to 18
a=rnd(360)
d=rnd(8)+3
x=cos(a)*d
y=sin(a)*d
line 8,8,x+8,y+8
next t
get image b+7,0,0,16,64
delete bitmap 1
next b
rem make a parachute
create bitmap 1,64,64
ink 0,0
box 0,0,63,63
ink rgb(133,126,92),0
circle 32,44,43
for t=1 to 4
ellipse ((t-1)*16)+8,19,8,6
next t
ink 0,0
box 0,20,63,63
ink rgb(255,255,255),0
for t=1 to 5
line 32,50,((t-1)*16),19
next t
ink rgb(120,50,50),0
for t=0 to 8
circle 32,52,t
next t
get image 15,0,0,64,64
delete bitmap 1
rem volcano texture
create bitmap 1,128,64
ink rgb(159,11,11),0
box 0,0,127,63
for t=1 to 1000
ink rgb(rnd(255),rnd(255),rnd(255)),0
dot rnd(128),rnd(64)
next t
ink rgb(255,255,0),0
center text 64,27,"Volcano!"
get image 16,0,0,128,64
delete bitmap 1
rem witch hat texture
create bitmap 1,32,32
ink 0,0
box 0,0,31,31
for t=1 to 10
cx=rnd(32)
cy=rnd(32)
for d=0 to 7
ink rgb(rnd(255),rnd(255),rnd(255)),0
a=rnd(360)
dist=rnd(4)+3
x=(cos(a)*dist)+cx
y=(sin(a)*dist)+cy
line cx,cy,x,y
next d
next t
get image 17,0,0,32,32
delete bitmap 1
rem flare tube texture
create bitmap 1,32,32
ink rgb(200,0,0),0
box 0,0,31,31
for t=1 to 10
cx=rnd(32)
cy=rnd(32)
ink rgb(rnd(255),rnd(255),rnd(255)),0
for r=1 to rnd(8)
for s=0 to 1
circle cx+s,cy,r
next s
next r
next t
get image 18,0,0,32,32
delete bitmap 1
rem make a grass texture
create bitmap 1,64,64
ink rgb(0,50,0),0
for t=1 to 10000
ink rgb(0,rnd(30)+50,0),0
sx=rnd(64)
sy=rnd(64)
ex=rnd(64)
line sx,sy,ex,sy
next t
get image 19,0,0,64,64
delete bitmap 1
rem wood texture
create bitmap 1,64,64
ink RGB(123,69,43),0
for t=1 to 10000
ink rgb(rnd(100)+50,69,43),0
sx=rnd(64)
sy=rnd(64)
ex=rnd(64)
line sx,sy,ex,sy
next t
get image 20,0,0,64,64
delete bitmap 1
rem aim texture
create bitmap 1,128,128
ink 0,0
box 0,0,127,127
ink rgb(255,0,0),0
box 5,52,123,76
box 52,5,76,123
ink 0,0
for t=0 to 64
if t<20 or t>45
if t>45 then ink rgb(255,0,0),0
for r=0 to 1
circle 64,64+r,t
next r
endif
next t
get image 21,0,0,128,128
delete bitmap 1
rem sky texture
create bitmap 1,256,512
ink 0,0
box 0,0,255,511
for t=0 to 100
ink rgb(0,0,t),0
line 0,t+412,255,t+412
next t
get image 22,0,0,256,512
delete bitmap 1
return
create_landscape:
rem ground
make object plain 1,5000,5000
xrotate object 1,90
texture object 1,19
scale object texture 1,256,256
rem make aim object
make object plain 2,40,40
xrotate object 2,90
texture object 2,21
set object 2,1,0,1
ghost object on 2
rem make sky
make object sphere 3,5000
scale object 3,-100,100,100
texture object 3,22
scale object texture 3,1,2
return
rem Functions ------------------------------------------------------------------
function smoke_bomb(obj)
rem make core object
make object plain obj,0,0
rem make mesh and add limbs
make object sphere obj+1,10
make mesh from object 1,obj+1
delete object obj+1
add limb obj,1,1
make object triangle obj+1,0,6,0,-0.5,4.9,0,0.5,4.9,0
make mesh from object 1,obj+1
delete object obj+1
add limb obj,2,1
make object triangle obj+1,0,6,0,0,4.9,0.5,0,4.9,-0.5
make mesh from object 1,obj+1
delete object obj+1
add limb obj,3,1
delete mesh 1
rem color
color=rnd(6)
if color=0 then color=rgb(255,255,255)
if color=1 then color=rgb(0,0,255)
if color=2 then color=rgb(255,0,0)
if color=3 then color=rgb(0,255,0)
if color=4 then color=rgb(255,255,0)
if color=5 then color=rgb(0,255,255)
if color=6 then color=rgb(255,0,255)
color limb obj,1,color
endfunction color
function small_rocket(obj)
rem make core object
make object plain obj,0,0
rem make mesh and add limbs
make object cylinder obj+1,2
scale object obj+1,100,500,100
make mesh from object 1,obj+1
delete object obj+1
add limb obj,1,1
make object cone obj+1,2
position object obj+1,0,6,0
make mesh from object 1,obj+1
delete object obj+1
add limb obj,2,1
make object box obj+1,0.5,10,0.5
position object obj+1,0,-5,1
make mesh from object 1,obj+1
delete object obj+1
add limb obj,3,1
delete mesh 1
rem colour
color limb obj,1,rgb(255,0,0)
color limb obj,2,rgb(100,0,0)
texture limb obj,3,20
endfunction
function volcano(obj)
rem make core object
make object plain obj,0,0
rem make mesh and add limbs
make object cone obj+1,5
scale object obj+1,100,200,100
make mesh from object 1,obj+1
delete object obj+1
add limb obj,1,1
delete mesh 1
rem texture
texture limb obj,1,16
endfunction
left/right arrow keys to change fireworks, mouse to view, scroll to zoom.
You may notice that a lot of images that are generated are not used. They should be for fireworks I haven't completed yet.
TheComet

Make the path of your enemies easier with Waypoint Pro!