I've started on a remake of Robotron for my first project. For people who don't know this classic arcade game; you play a guy with a constantly shooting gun that must dodge and kill infinite spawning enemy's. The basic concept was staying alive, and man did it make your hands sweat.
So far I have the main game pretty much finished. Next I'm going to add the media, some special effects if I can, and a simple menu system(start game, restart, high score board)
Screenshot:
Source(mind you it is pretty sloppy, so apologies):
Remstart **************************************
Angletron | JoLii | Robotron Remake
Created: Thursday, August 7, 2008
**************************************** Remend
Rem Screen Settings ***************************
Set Display Mode 800,600,16
Set Window On : Set Window Layout 4,1,0
Set Window Title "Angletron | Created by: JoLii"
Sync Rate 0 : Sync On : Sync Rate 30
Backdrop On : Color Backdrop 0
Hide Mouse : Autocam Off
Rem Setup Variables ***************************
Type Stats
Speed as Integer
Life as Integer
Attack as Integer
Endtype
Rem Player Stats ******************************
Dim Player(1) as Stats
Player(1).Speed = 1
Player(1).Life = 10
Player(1).Attack = 1
Rem enemy
erate = 30
sprate = 60
Rem Create Objects ****************************
Rem Player
Make Object Cube 1,5 `body
color object 1,RGB(0,255,0) : Set Object Wireframe 1,1
set object light 1,1 : set object ambient 1,1
Make Object Cube 2,3 `gun
position object 2,0,2,0 : Set Object Wireframe 2,1
color object 2,RGB(0,255,150)
set object light 2,1 : set object ambient 2,1
Rem Playing Area
Make Matrix 1,200,200,20,20
Set Matrix 1,1,0,1,0,1,0,1 : Position Matrix 1,-100,0,-100
Rem Spawn Point
sx = rnd(9)+1
sz = rnd(9)+1
Make Object Cube 5,10 : Color Object 5,RGB(255,0,255)
Set Object Wireframe 5,1 : Set Object Light 5,1
Set Object Ambient 5,1
Position Object 5,(sx*20)-105,5,(sz*20)-105
Rem Camera ************************************
Position Camera 0,100,-100 : Point Camera 0,0,0
Rem Main Engine *******************************
Do
set cursor 0,0
print "s";scancode()
Print "x";object position x(1)
Print "z";object position z(1)
Print "f";Screen FPS()
print "er";erate
Print "en";en#
Print "Score: ";score#
Rem scoreing modifier
if score#>500 then erate = 25
if score#>1000 then erate = 20 : sprate = 50
if score#>1500 then erate = 15
if score#>2000 then erate = 10 : sprate = 40
if score#>2500 then erate = 5
if score#>3000 then erate = 4 : sprate = 30
if score#>4000 then erate = 3
if score#>5000 then erate = 2 : sprate = 20
if score#>6000 then erate = 1
Rem Player Control ****************************
Rem Body
If Keystate(17)=1 Then Rotate Object 1,0,0,0 : Move Object 1,Player(1).Speed
If Keystate(31)=1 Then Rotate Object 1,0,180,0 : Move Object 1,Player(1).Speed
If Keystate(30)=1 Then Rotate Object 1,0,270,0 : Move Object 1,Player(1).Speed
If Keystate(32)=1 Then Rotate Object 1,0,90,0 : Move Object 1,Player(1).Speed
Rem boundaries
If Object Position x(1)<-100 Then Position object 1,-100,object POsition y(1),Object POsition z(1)
If Object Position x(1)>100 Then Position object 1,100,object POsition y(1),Object POsition z(1)
If Object Position z(1)<-100 Then Position object 1,object position x(1),object position y(1),-100
If Object Position z(1)>100 Then Position object 1,object position x(1),object position y(1),100
Rem Camera
Set Camera to Follow Object Position x(1),Object Position y(1),Object Position z(1),0,100,100,10,0
Rem Gun
Position Object 2,Object Position x(1),Object Position y(1)+2.5,Object Position z(1)
Move Object 2,2.5
If Keystate(200)=1
Rotate Object 2,0,0,0
If Keystate(203)=1 Then Rotate Object 2,0,315,0 : goto keyend
If Keystate(205)=1 Then Rotate Object 2,0,45,0 : goto keyend
Endif
If Keystate(208)=1
Rotate Object 2,0,180,0
If Keystate(203)=1 Then Rotate Object 2,0,225,0 : goto keyend
If Keystate(205)=1 Then Rotate Object 2,0,135,0 : goto keyend
Endif
If Keystate(203)=1 Then Rotate Object 2,0,270,0
If Keystate(205)=1 Then Rotate Object 2,0,90,0
keyend:
Rem Fire Bullets
Rate = Rate + 1
If Rate = 4
Rate = 0
Fire = Fire + 1 : IF Fire > 40 Then Fire = 1
If Object Exist(Fire+100) = 1 Then Delete Object Fire+100
Make Object Cube Fire+100,2 :Color Object Fire+100,RGB(255,255,0) : set object Wireframe Fire+100,1
Set Object LIght Fire+100,1 : Set Object Ambient Fire+100,1
Position Object Fire+100,Object Position x(2),Object Position y(2),Object Position z(2)
Rotate Object Fire+100,Object Angle x(2),Object Angle y(2),Object Angle z(2)
Endif
For Shoot = 1 to 50
If Object Exist(Shoot+100) = 1
Move Object Shoot+100,2
Rem bullet hit
for hit = 1 to 1000
If object exist(hit+200) = 1
If Object Position x(shoot+100)>Object Position x(hit+200)-5
If Object Position x(shoot+100)<Object Position x(hit+200)+5
If Object Position z(shoot+100)>Object Position z(hit+200)-5
If Object Position z(shoot+100)<Object Position z(hit+200)+5
Delete Object shoot+100 : Delete Object hit+200 : en# = en# - 1
Score# = Score# + 10 : goto endshoot
Endif
Endif
Endif
Endif
Endif
next hit
Endif
Next Shoot
endshoot:
Rem Enemy ********************************************
Rem Spawn Point
spawn = spawn + 1
If spawn > sprate
spawn = 0
sx = rnd(9)+1
sz = rnd(9)+1
Position Object 5,(sx*20)-105,5,(sz*20)-105
Endif
Rem Enemy
epawn = epawn + 1
If epawn > erate
epawn = 0
enemy = enemy + 1 : If enemy > 1000 then enemy = 1
If object Exist(enemy+200) = 1 then Delete Object enemy+200 : en# = en# - 1
Make Object Cube enemy+200,4 : Color Object enemy+200,RGB(255,0,0) : en# = en# + 1
Set Object Wireframe enemy+200,1 : Set Object Light enemy+200,1
Set Object Ambient enemy+200,1
Position Object enemy+200,Object Position x(5)+(rnd(20)-10),2,Object Position z(5)+(rnd(20)-10)
Endif
Rem Enemy Ai
For AI = 1 to 1000
If Object Exist(AI+200) = 1
Point Object AI+200,Object Position x(1),2,Object Position z(1)
Move Object AI+200,0.5
If Object POsition x(AI+200)>Object POsition x(1)-5
If Object POsition x(AI+200)<Object POsition x(1)+5
If Object POsition z(AI+200)>Object POsition z(1)-5
If Object POsition z(AI+200)<Object POsition z(1)+5
goto endgame
Endif
Endif
Endif
Endif
Endif
Next AI
Sync
Loop
Rem endgame
endgame:
set text size 36
Center text 400,300,"EndGame"
Center text 400,350,str$(score#)
sync
wait 2000 : exit
Attached is the game compiled for those without DB on their computer.
Controls are:
WASD - movement
arrow keys - firing direction
Tell me what you think and any improvements that are needed.
later