Ok. I just purchased Dark Basic Lite recently and I was running through the fast track lessons and I was studying the source code for Cave Runner and I have a couple of questions about some snippets.
rem Load bitmaps
load bitmap "tiles.bmp",1
get image 1,0,0,256,256
delete bitmap 1
Ok, I have gathered that this is where they are loading the purple rocks and green grass you see when navigating the cave. However I am confused at the line "delete bitmap 1."
If they are loading these and want to display them, why are we deleting them? (I apologize in advance if these are overly n00b questions)
rem Load sound
load sound "hum.wav",1
load sound "explode.wav",2
set sound speed 1,6000
loop sound 1
Once again, thanks to the REMARK feature, I have gathered that we are loading the sound you hear when you crash, and the pretty much inaudible hum that is buried by the music loop. My question is, how does that "set sound speed" thing work?
rem Activate manual sync
sync on
No damn clue whatsoever, can anyone elaborate on what that's doing?
The rest of it, I am going to try and look up in the help files, but I've got one more snippet I am confused by.
rem Make landscape and ceiling matrix
make matrix 1,2000,5000,10,25
prepare matrix texture 1,1,2,2
make matrix 2,2000,5000,10,25
prepare matrix texture 2,1,2,2
fill matrix 2,0,2
randomize matrix 2,350.0
for t=0 to 25
set matrix height 2,0,t,-100
set matrix height 2,10,t,-100
next t
update matrix 2
I'm guessing the commands are the way we are forming the way the rock and grass is in-game. But, what do all of the numbers mean and where did this t variable come from and what purpose is it serving?
Once again, I'm sorry if my questions are very n00bish. I'm a recovering T3DGMaholic, entering the DB world.
Thank you in advance for your assistance.
Pentium4 3GHZ, 512MB DualChannel RAM, 256MB ATI Radeon 9800XT, SoundBlaster Audigy2, 120 GB HD.