Hello!
Here's my stab at making a 20 line game. All graphics etc. are generated within the program so no external sources are necessary! The program was created with the latest version of DarkBASIC Classic (1.13). In order to get it working with DB Pro you'd have to get rid of the backdrop commands, and probably change a few other lines around.
Story
In this game, you star as
Face Dude and must prevent attackers from hitting your base. To defend your territory, you must fire your atomic hat(?) at the futuristic, blue missles. Hitting the missles with your hat will immediately vaporize them. If any of the missles successfully hit you, or your base, you will substain a great deal of pain (loose one life). After all of your lives are gone, the attackers win! The enemie base has six missle launchers, so the maximum number of missles that you will have to abolish at any given time will be six (6). However, each time one of their missles is destroyed or hits your base, the next one launched gets even faster!
Controls
(Arrow Keys) : Moves
Face Dude throughout the base
SPACE KEY : Fire your hat at missles
ESCAPE KEY : Exits game after you loose (you start with 3 lives)
Screenshots
![](http://mogwai.volcanicsoft.com/fdto2.jpg)
![](http://mogwai.volcanicsoft.com/fdto1.jpg)
The Code
Simply copy and paste this code into DarkBASIC Classic (any version should work), and run it!
`FACE DUDE TAKES ON
`20-Line Game Challenge
`Mogwai Entertainment
Sync On : Sync Rate 90 : Hide Mouse : Autocam Off :Ink rgb(255,255,0),0
Box 0,0,128,128 : Ink 0,0 : Box 12,20,38,46 : Box 90,20,116,46 : Box 36,85,92,91
Get image 1,0,0,128,128 : Cls : Ink rgb(128,0,128),0 : dot 1,1 : Get image 2,0,0,2,2
Make Object Plain 1,30,30 : Make Object box 2,400,40,30 : Texture object 1,1 : Color Object 2,rgb(0,100,0) : texture backdrop 2
Set Object 1,1,0,1 : Position camera 0,100,-200 : Dim lineY#(15) : Dim LineX#(15) : Randomize Timer()
Lives = 3 : ink rgb(255,255,255),0 : Make Object Cone 3,15 : Color Object 3,rgb(255,134,15) : Dim speed#(15)
For a = 10 to 15 : LineY#(a-10) = 340+rnd(150) : Speed#(a-10)=.2 : LineX#(a-10) = (rnd(280)-140) : Make Object Box a,6,200,6
Color Object a,rgb(0,120,255) : Position Object a,lineX#(a-10),lineY#(a-10),0 : Next a : Do : inc bx,1
inc by,1 : scroll backdrop bx,by :If leftkey()=1 then x# = x# - 3
If spacekey()=1 and firing = 0 : firing = 1 : ox# = x# : Endif : If firing = 1
by# = by# + 6 : Position Object 3, ox#,by#,0 : Endif : If object in screen(3)=0 : firing = 0
by# = 58 : Endif : If firing = 0 : by# = 58 : Position Object 3,x#,by#,0
Endif : text 1,1,"Score: " + str$(score) : Position Object 1,X#,35,0 : text 1,20,"Lives: " + str$(Lives) : If rightkey()=1 then x# = x# + 3
If X# = 140 then X# = 140
For a = 10 to 15 : lineY#(a-10) = lineY#(a-10) - speed#(a-10) : Position Object a,lineX#(a-10),lineY#(a-10),0 : If Object Collision(1,0) = a or Object Collision(2,0) = a : Dec Lives, 1
LineY#(a-10) = 340+rnd(150) : LineX#(a-10) = rnd(280)-140 : speed#(a-10) = speed#(a-10) + .1 : Endif :If Object Collision(3,0) = a and firing = 1
LineY#(a-10) = 340+rnd(150) : LineX#(a-10) = rnd(280)-140 : speed#(a-10) = speed#(a-10) + .1 : Score = Score + 10 : Endif
If Lives = 0 : while escapekey()=0 : Set Text Size 36 : ink rgb(255,0,0),0 : Center Text 320,160,"You Died!"
Ink rgb(255,255,255),0 : Center Text 320,260,"Final Score: " + str$(Score) : Center text 320,430,"Created By Mogwai Entertainment!" : Sync : Endwhile
End : Endif : Next a : Sync : Loop
Have fun. My highest score so far is 530 points. I find that after 300 points, it gets very tough.