Challenge: 
Winner?: 
No
Code Snippet: 
REM Project: Overhead
REM Created: 12.05.2007 13:31:12
REM
REM ***** Main Source File *****
REM
set display mode 1024,768,32
`========================================================================================================================
`Draw Stuff
`========================================================================================================================
`make healt texture
ink rgb(225,225,232),rgb(0,0,0)
box 0,0,29,29
ink rgb(0,0,0),rgb(0,0,0)
line 0,11,29,11
line 0,17,29,17
line 11,0,11,29
line 17,0,17,29
ink rgb(255,0,0),rgb(0,0,0)
box 0,12,29,17 : box 12,0,17,29
get image 1,0,0,29,29
cls
`make BAR texture
ink rgb(100,100,100),rgb(0,0,0)
box 0,0,29,29
ink rgb(200,200,200),rgb(0,0,0)
line 0,0,29,0
line 0,0,0,29
line 29,29,29,0
line 29,29,0,29
get image 2,0,0,29,29
cls
`make player texture
ink rgb(0,128,255),rgb(0,0,0)
box 0,0,29,29
ink rgb(193,224,255),rgb(0,0,0)
box 0,10,29,29
get image 3,0,0,29,29
cls
`make enemy texture
ink rgb(23,192,28),rgb(0,0,0)
box 0,0,29,29
ink rgb(170,224,172),rgb(0,0,0)
box 0,10,29,29
get image 4,0,0,29,29
`make floor texture
ink rgb(55,168,17),rgb(0,0,0)
box 0,0,29,29
ink rgb(51,130,18),rgb(0,0,0)
dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) :
ink rgb(47,120,15),rgb(0,0,0)
dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) :
ink rgb(47,120,20),rgb(0,0,0)
dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) :
ink rgb(47,120,15),rgb(0,0,0)
dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) :
ink rgb(255,242,0),rgb(0,0,0)
dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) :
ink rgb(255,15,0),rgb(0,0,0)
dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29)
get image 5,0,0,29,29
cls
ink rgb(0,0,0),rgb(255,255,255)
`make enemy attention texture
ink rgb(214,16,16),rgb(0,0,0)
box 0,0,29,29
ink rgb(247,147,147),rgb(0,0,0)
box 0,10,29,29
get image 6,0,0,29,29
cls
`make enemy name1
ink rgb(255,255,255),0
print "Stan"
get image 7,0,0,35,20
cls
`make enemy name1
ink rgb(255,255,255),0
print "Troy"
get image 8,0,0,35,20
cls
`make wall texture
ink rgb(0,128,255),rgb(0,0,0)
box 0,0,29,29
ink rgb(9,100,240),rgb(0,0,0)
dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) :
get image 9,0,0,29,29
cls
`make enemy name1
box 0,0,50,50,rgb(230,141,151),rgb(29,163,230),rgb(230,141,151),rgb(29,163,230)
get image 10,0,0,50,50
cls

set text size 36

`make button quit
ink rgb(255,255,255),0
print "Quit"
dot 70,35
get image 11,0,0,70,40
cls
`make button quit
ink rgb(255,255,255),0
print "Start"
get image 12,0,0,80,35
cls
`make button quit
ink rgb(255,0,0),0
print "Quit"
dot 70,35
get image 13,0,0,70,40
cls
`make button quit
ink rgb(255,0,0),0
print "Start"
get image 14,0,0,80,35
cls
`make cursor
ink rgb(1,1,1),0
box 0,0,8,8
get image 15,0,0,8,8
cls
`make box image
ink rgb(172,152,118),rgb(0,0,0)
box 0,0,29,29
ink rgb(104,82,60),rgb(0,0,0)
line 0,0,29,0
line 0,0,0,29
line 29,29,29,0
line 29,29,0,29

line 6,0,6,29
line 12,0,12,29
line 18,0,18,29
line 24,0,24,29

get image 16,0,0,29,29
cls
`make explosion texture
ink rgb(243,143,33),rgb(0,0,0)
box 0,0,29,29
ink rgb(255,242,0),rgb(0,0,0)
dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) :
ink rgb(250,67,5),rgb(0,0,0)
dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) : dot rnd(29),rnd(29) :
get image 17,0,0,29,29
cls
`make crosshair
ink rgb(0,0,0),0
box 0,0,29,29
ink rgb(55,0,0),0
box 0,13,10,15
box 18,13,29,15
box 13,0,15,10
box 13,18,15,29

get image 18,0,0,29,29
cls

ink rgb(255,255,255),rgb(0,0,0)
`========================================================================================================================
`Routine
`========================================================================================================================
sync on : sync rate 60
hide mouse
sound(9,120)
`========================================================================================================================
`MAKE CAMERA ; LENS ; GROUND ; WINDOW ; MENU ; MEDIKITS ; WALLS ; EXPLOSIVE BOXES AND FIRE
`========================================================================================================================
`Make Camera
make camera 1
set camera range 1,1,1000000
position camera 1,100,125,75
xrotate camera 1,90
color backdrop 1,0
`Make Lens
make object plain 55,100,100
color object 55,rgb(255,255,255)
set object cull 55,0

position object 55,camera position x(1),camera position y(1),camera position z(1)
rotate object 55,camera angle x(1),camera angle y(1),camera angle z(1)
move object 55,10
set object light 55,0
set alpha mapping on 55,0
`Make Ground
make matrix 1,150,150,15,15
prepare matrix texture 1,5,1,1
`Make Window
make matrix 2,150,150,1,1
position matrix 2,148,5,0
prepare matrix texture 2,2,1,1
`Make Menu
make matrix 3,200,200,1,1
position matrix 3,0,20,0
prepare matrix texture 3,10,1,1
`Make MediKits
for h=30 to 35
   make object box h,4,1,3
   texture object h,1
   position object h,rnd(140)+5,0,rnd(140)+5
next h
`Make Walls
make object box 100,75,0.1,5
position object 100,20,0,75
make object box 101,75,0.1,5
position object 101,120,0,75
texture object 100,9 : texture object 101,9

make particles 1,9,10,7
position particles 1,60,0,75
color particles 1,0,50,107

make particles 2,9,10,7
position particles 2,80,0,75
color particles 2,0,50,107
`Make Fireboxes and explosions
for b=40 to 45
   make object box b,5,5,5
   texture object b,16
   position object b,rnd(140)+5,0,rnd(140)+5
next h

make object sphere 50,10
texture object 50,17
position object 50,50000,0,50
set alpha mapping on 50,90
`========================================================================================================================
`Player
`========================================================================================================================
`Make Player
make object sphere 1,8
texture object 1,3
position object 1,72,0,0
`Make Player Bullet
make object box 2,0.5,0.5,100
color object 2,rgb(0,0,255)
set alpha mapping on 2,50
`make player particles
make particles 5,3,10,7
color particles 5,5,10,255
`make crosshair
make object plain 11,10,10
texture object 11,18
set object cull 11,0
set object transparency 11,1
scale object 11,70,70,70
`========================================================================================================================
`Enemy 1
`========================================================================================================================
`Make Enemy 1
make object sphere 3,8
texture object 3,4
position object 3,150,0,150
`Make Enemy 1 Bullet
make object box 4,0.5,0.5,80
color object 4,rgb(255,0,0)
hide object 4
set alpha mapping on 4,50
`Make Enemy 1 Positioner
make object cube 5,3
hide object 5
`Make Enemy 1 Collisioner
make object sphere 6,50
hide object 6
`Make Enemy 1 Name
make object plain 21,17.5/1.5,10/1.5
texture object 21,7
set object transparency 21,1
`make enemy 1particles
make particles 3,4,10,7
color particles 3,255,10,5
`========================================================================================================================
`Enemy 2
`========================================================================================================================
`Make Enemy 2
make object sphere 7,8
texture object 7,4
position object 7,0,0,150
`Make Enemy 2 Bullet
make object box 8,0.5,0.5,80
color object 8,rgb(255,0,0)
hide object 8
set alpha mapping on 8,50
`Make Enemy 2 Positioner
make object cube 9,3
hide object 9
`Make Enemy 2 Collisioner
make object sphere 10,50
hide object 10
`Make Enemy 1 Name
make object plain 22,17.5/1.5,10/1.5
texture object 22,8
set object transparency 22,1
`make enemy 2particles
make particles 4,4,10,7
color particles 4,255,10,5
`========================================================================================================================
`Variables
`========================================================================================================================
power=200
ene1pow=200
ene2pow=200
d1=1
d2=1
speed as float
speed=0.5
nit as float
nit=35
KI=1
a=1
`mode=1 => menu
`mode=2 => game
Mode=1
l as float
l=1

do

if Mode=1
   sprite 15,mousex(),mousey(),15

   position matrix 3,0,20,0

   sprite 11,482,400,11
   sprite 12,482,350,12


   sprite 13,482,400,13
   sprite 14,482,350,14

   if sprite collision(15,11)=1 then show sprite 13 else hide sprite 13
   if sprite collision(15,12)=1 then show sprite 14 else hide sprite 14

   if sprite collision(15,11)=1 and mouseclick()=1 then end
   if sprite collision(15,12)=1 and mouseclick()=1 then Mode=2
endif



if Mode=2
`========================================================================================================================
`Others
`========================================================================================================================
if keystate(2)=1 then KI=1
if keystate(3)=1 then KI=0

position matrix 3,1000,1000,1000
hide sprite 11
hide sprite 12
hide sprite 13
hide sprite 14
hide sprite 15
`========================================================================================================================
`Camera
`========================================================================================================================
ncr#=curvevalue(cr#,ncr#,5)
ncf#=curvevalue(cf#,ncf#,5)
cx#=cx#+mousemovey()*0.2
cy#=cy#+mousemovex()*0.2
if cx#>80 then cx#=