I started when my brother was like... dude I got DarkBASIC Pro... and I was like WHOA!... what's that? So my brother tried to drag me into learning it for over a year so we could work on a game we were planning... and I was too freaking lazy! Until recently I was like Ok ok ok ok ok! So I tried it and it hit me like an addiction! Now I just can't stop using DBPro! (But I regret not using it sooner for I could have been much more advanced!)
I still suck at it though because I am easily distracted... I started by making a Pong game through that one tutorial on here and added more stuff! (Source below, EXTREMELY glitchy! Don't ask how!)
Rem Project: Yart's Pong
Rem Created: 6/23/2004 6:58:30 PM
Rem ***** Main Source File *****
Rem Declare Scoring Variables
score1# = 0
score2# = 0
playtilted = 0
Rem Change Backdrop Colour
color backdrop rgb(0,0,0)
Rem Make Left Paddle
make object box 1,1,0.8,5
position object 1,-20,0,0
color object 1,rgb(255,0,0)
Rem Make Right Paddle
make object box 2,1,0.8,5
position object 2,20,0,0
color object 2,rgb(0,255,0)
Rem Make Ball
make object sphere 3,1
color object 3,rgb(255,255,255)
Rem Make Floor
make object box 4,21,0,16.25
position object 4,10.5,0,8.125
color object 4,rgb(0,120,0)
make object box 5,21,0,16.25
position object 5,10.5,0,-8.125
color object 5,rgb(0,160,0)
make object box 6,21,0,16.25
position object 6,-10.5,0,8.125
color object 6,rgb(160,0,0)
make object box 7,21,0,16.25
position object 7,-10.5,0,-8.125
color object 7,rgb(120,0,0)
Rem Make Wall
make object box 8,42.5,1,1
position object 8,0,0,17
color object 8,rgb(0,0,255)
make object box 9,42.5,1,1
position object 9,0,0,-17
color object 9,rgb(0,0,255)
Rem Position The Game Camera
position camera 0,20,0
point camera 0,-90,0
pitch camera up 50
Rem Make Ball Go Towards Right Paddle At Start
balla# = 90
Rem Declare Camera Rotation
camerarotation# = 0
sync on
do
Rem Rotate Camera For Beginning
camerarotation# = camerarotation# + 0.1
yrotate camera 0,camerarotation#
Rem Simple Text On Main Title
set text size 24
center text 320,150, "Yart's"
center text 320,170, "Pong"
text 1,1, "F2 to Play - F3 to Play Tilted"
text 526,1, "Escape to Quit"
center text 220,240, "Left Side"
center text 420,240, "Right Side"
center text 220,260, "A = Up"
center text 420,260, "Up Arrow = Up"
center text 220,280, "Z = Down"
center text 420,280, "Down Arrow = Down"
center text 320,300, "F5 = Pause"
center text 320,340, "Tilted and Non-Tilted Modes Can Be"
center text 320,360, "Changed During Gameplay"
Rem Start Game When Key Is Pressed
if keystate(60)=1 then gosub _startnottilted
if keystate(61)=1 then gosub _starttilted
sync
loop
Rem Start The Game
startgame:
Rem Before Gameplay Starts And Beginning Message
if playtilted# = 0 then gosub _cameranottilt
if playtilted# = 1 then gosub _cameratilt
sync
center text 320,200, "Press Any Key When Ready..."
sync
wait key
do
Rem Choose Between Tilted Or Not
if playtilted# = 0 then gosub _cameranottilt
if playtilted# = 1 then gosub _cameratilt
Rem Adds The Score Counters On The Corners Of The Screen
set cursor 0,00
print "Left Side:"
set cursor 100,00
print score1#
set cursor 0,450
print "Right Side:"
set cursor 100,450
print score2#
Rem Pause Command
If keystate(63)=1 then gosub _paused
Rem Switch Between Tilted and Not Tilted
If keystate(60)=1 then gosub _cameranottilt
If keystate(61)=1 then gosub _cameratilt
Rem Wrap The Rotational Value
balla# = wrapvalue(balla#)
Rem Moving The Right Paddle
IF upkey()=1 AND player2pos#<14 then player2pos# = player2pos#+0.2
IF downkey()=1 AND player2pos#>-14 then player2pos# = player2pos#-0.2
if upkey()=1 and ballx#>19 and ballx#<19.5 and ABS(player2pos# - ballz#)<2.5 then balla# = balla# + balla# -8
if downkey()=1 and ballx#>19 and ballx#<19.5 and ABS(player2pos# - ballz#)<2.5 then balla# = balla# + balla# + 8
Rem Wrap The Rotational Value
balla# = wrapvalue(balla#)
Rem Moving The Left Paddle
IF keystate(30)=1 AND player1pos#<14 then player1pos# = player1pos#+0.2
IF keystate(44)=1 AND player1pos#>-14 then player1pos# = player1pos#-0.2
if keystate(30)=1 and ballx#<-19 and ballx#>-19.5 and ABS(player1pos# - ballz#)<2.5 then balla# = balla# + balla# - 8
if keystate(44)=1 and ballx#<-19 and ballx#>-19.5 and ABS(player1pos# - ballz#)<2.5 then balla# = balla# + balla# + 8
Rem Wrap The Rotational Value
balla# = wrapvalue(balla#)
Rem Move Ball
ballx# = newxvalue(ballx#,balla#,0.2)
ballz# = newzvalue(ballz#,balla#,0.2)
Rem Bouce The Ball From Left And Right
If ballx#>19 and ballx#<19.5 and ABS(player2pos# - ballz#)<2.5 then balla# = 360 - balla#
If ballx#<-19 and ballx#>-19.5 and ABS(player1pos# - ballz#)<2.5 then balla# = 360 - balla#
Rem Bounce The Ball From Top And Bottom
If ballz#>16 or ballz#<-16 then balla# = 180 - balla#
Rem If Ball Passes Bat
If ballx#>21 then gosub _aimnewballleft
If ballx#<-21 then gosub _aimnewballright
Rem Refreshing The Positions
position object 1,-20,0,player1pos#
position object 2,20,0,player2pos#
position object 3,ballx#,0,ballz#
yrotate object 3,balla#
sync
loop
Rem Make New Ball After Passing Right Bat
_aimnewballleft:
ballx# = 0
ballz# = 0
balla# = -90
score1# = score1# + 1
return
Rem Make New Ball After Passing Left Bat
_aimnewballright:
ballx# = 0
ballz# = 0
balla# = 90
score2# = score2# + 1
return
Rem Non-Tilted Camera Mode
_cameranottilt:
playtilted# = 0
position camera 0,30,0
point camera 0,-90,0
return
Rem Tilted Camera Mode
_cameratilt:
playtilted# = 1
position camera 0,20,-40
point camera 0,3,0
return
Rem To Start The Game With Non Tilted Mode
_startnottilted:
playtilted# = 0
goto startgame
return
Rem To Start The Game With Tilted Mode
_starttilted:
playtilted# = 1
goto startgame
return
Rem Pauses The Game
_paused:
if playtilted# = 0 then gosub _cameranottilt
if playtilted# = 1 then gosub _cameratilt
sync
center text 320,200, "Paused!"
center text 320,240, "Press Any Key To Continue..."
sync
wait key
return
Rem Ends The Program, Of Course!
End
Now the stuff I do is... umm... ok so I got majorly sidetracked by Morrowind and the gun modelling bit ( http://forum.thegamecreators.com/?m=forum_view&t=35998&b=3 ) got me to come back here after I tried to implement that into Morrowind then I decided to start back up in DarkBASIC before I got zoned into killing Cliff Racers.
That's about all... oh yeah and my Airplane program. http://forum.thegamecreators.com/?m=forum_view&t=35995&b=6
Oh yeah, did I mention before I came to DarkBASIC I learned maybe 10 commands of C++ and maybe 15 or so of Visual Basic? lol
Pie!