Nice work
Here's the DBP equivelant... You just need to put in the GUI and Health and make it look a bit neater
`started 1:23 AM 24/12/2004
`finished 2:25 AM 24/12/2004
Sync On : Sync Rate 0
AutoCam Off
Position Camera 0,100,-300
Point Camera 0,0,200
Randomize Timer()
Color Backdrop RGB(0,0,0)
Set Ambient Light 0
#Constant sw = Screen Width()
#Constant sh = Screen Height()
Global tmp As Integer
Global recalc As Float
fps As Integer
idealfps As Integer = 60
player As Integer = 1
asc1st As Integer = 2
asclast As Integer = 27
fire1st As Integer = 28
firelast As Integer = 35
mousel As Boolean
Type mytype
x,y,z As Float
act As Boolean
speed As Integer
EndType
Dim ascii(asclast - asc1st) As mytype
Dim fire(firelast - fire1st) As mytype
`Letters
For i = asc1st To asclast
Make Object Cube i,20
Position Object i,0,0,-600
Color Object i,RGB(255,255,255)
Hide Object i
Next i
`firethingos
For i = fire1st To firelast
Make Object Cylinder i,5
Color Object i,RGB(255,0,0)
Scale Object i,100,1000,100
XRotate Object i,90
Position Object i,0,0,-1000
Hide Object i
Next i
Make Object Box player,40,3,80
Color Object player,RGB(0,50,0)
Position Object player,0,0,0
For i = 1 To 5
tmp = Rnd(asclast - asc1st)
If ( ascii(tmp).act = 0 ) And ( tmp > 0 )
ascii(tmp).act = 1
ascii(tmp).speed = -5
Show Object tmp + asc1st
Position Object tmp + asc1st,Rnd(400) - 200,0,550 + Rnd(50)
Else
Dec i
EndIf
Next i
Make Matrix 1,1000,1000,10,10
Position Matrix 1,-500,-100,-50
Ink RGB(172,92,4),0
Box 0,0,2,2
Get Image 1,0,0,1,1
Prepare Matrix Texture 1,1,1,1
Fill Matrix 1,0,1
Randomize Matrix 1,20
Update Matrix 1
Do
fps = Screen FPS()
recalc = (idealfps * 1.0) / (fps * 1.0)
_control_obj(player)
For i = 1 To asclast - asc1st
If ascii(i).act = 1
Position Object i + asc1st,Object Position X(i + asc1st),0,Object Position Z(i + asc1st) + (ascii(i).speed * recalc)
If ascii(i).speed > 0
YRotate Object i + asc1st,WrapValue(Object Angle Y(i + asc1st) - (7 * recalc))
XRotate Object i + asc1st,WrapValue(Object Angle X(i + asc1st) - (5 * recalc))
Else
XRotate Object i + asc1st,WrapValue(Object Angle X(i + asc1st) - (2 * recalc))
EndIf
For m = fire1st To firelast
If ( Object Collision(m,i + asc1st) ) And ( ascii(i).speed < 0 )
ascii(i).speed = ascii(i).speed * -1
EndIf
Next m
If ( Object Screen Y(i + asc1st) > sh ) Or (( Object Position Z(i + asc1st) >= 600 ) And ( ascii(i).speed > 0 ))
Hide Object i + asc1st
ascii(i).act = 0
For m = 1 To 1
tmp = Rnd(asclast - asc1st)
If ( ascii(tmp).act = 0 ) And ( tmp > 0 )
ascii(tmp).act = 1
ascii(tmp).speed = -5
Position Object tmp + asc1st,Rnd(400) - 200,0,550 + Rnd(50)
Show Object tmp + asc1st
Else
Dec m
EndIf
Next m
EndIf
EndIf
Next i
For i = 1 To firelast - fire1st
If fire(i).act = 1
Position Object i + fire1st,Object Position X(i + fire1st),-3,Object Position Z(i + fire1st) + (fire(i).speed * recalc)
EndIf
If Object Position Z(i + fire1st) >= 600
fire(i).act = 0
Hide Object i + fire1st
Position Object i + fire1st,0,0,-600
EndIf
Next i
If MouseClick() = 1 : If mousel = 0 : mousel = 1
`** On KeyDown **
For m = 1 To firelast - fire1st
If fire(m).act = 0
fire(m).act = 1
fire(m).speed = 5
Position Object m + fire1st,Object Position X(player),-3,0
Show Object m + fire1st
Exit
EndIf
Next m
`** End On Down **
Else
`** While KeyHeld **
`** End Held **
EndIf : Else : If mousel = 1 : mousel = 0
`** On KeyUp **
`** End On Up **
EndIf : EndIf
Sync
Loop
Function _control_obj(num As Integer)
Position Object num, Object Position X(num) + MouseMoveX(),0,0
If Object Position X(num) > 200 Then Position Object num,200,0,0
If Object Position X(num) < -200 Then Position Object num,-200,0,0
EndFunction
Jess.
Team EOD :: Programmer/All-Round Nice Guy
Aust. Convention!