this site has demo versions of darkbasic and darkbasic pro, you can download them and run them to try it out, write your own instructions etc, how it works is that you are given a interface that looks a lot like a text editor, you type into this and darkbasic trys to make sense of what you written, darkbasic knows several hundred words or phrases that tell it to do different things, heres a short example.
load object "MR2.x",1
this will load the file you save out from lightwave (in this case I assume you use an X plugin to save it since DB likes that format), since computers like numbers it remembers this as object number 1, so every time you mention object 1 to the computer it knows you mean MR2.x
on it`s own this isn`t much good, you told the computer to load the object and it did, but you will not see anything happen if you run this since computers stop doing what they are told when they run out of instructions, and this is just one instruction, so the computer would load the object and then close the program, you might just see the model flash up on the screen for an instant, but thats not much use to anyone.
the next thing you need to do is to make the program wait until you have finished veiwing the model, to do this add the following instruction to the code.
wait key
now the program will wait until you press a key before stopping, so you will be able to see the model just floating there and when you press a key the program will continue, find no more instructions and so stop, it doesn`t do much more, but its an improvement.
next thing is to have the program actualy do something with the model you have loaded, looking at it is ok, but you could do that in lightwave (and maybe make some realy nice renders too), we need action, lets try getting the car to turn left, heres the instruction to do that
turn object left 1,2
this tells the computer to turn the object left by two degrees, as before, the computer knows the MR2 model is object number 1, and the angle is the second value, you could read this instruction as
turn object left MR2 by 2 degrees
so now your code reads
load object "MR2.x",1
wait key
turn object left 1,2
by now you should realise the catch, when the program waits for the key you can see the object, when you press the key it turns the object 2 degrees and then instantly closes, what we need is some way to get the program to keep running, plus turning the car just two degrees is not that thrilling, we need to turn the car repeatedly so that it looks to be smoothly revolving, what we need it is some way to tell the program to keep doing things over and over from one instruction to the next until we tell it to stop.
introducing the do-loop instruction, if you place the instruction to turn the car around inside the following two instructions (like this)
do
turn object left 1,2
loop
then the program will run over and over, when it sees "do" it knows to remember this point to return to later, when it sees "loop" it knows its time to go back to the "do" location it remembered earlier, and anything inbetween those points it will do over and over, this is how programs work, for example, in a car game, you move the car, move the computers cars, move the camera, check for collisions, update the display, check for the end of the race and then loop round and keep doing that until the race finishes, so this is as far as the program has got...
load object "MR2.x",1
wait key
do
turn object left 1,2
loop
this loads the object and allows you to view it, then when you press a key it starts to revolve, now this is ok, but why not place it under user control?, more like a game would do?, well you need to have some way for the program to make decisions, so how do we do that, well lets see
IF i am thirsty THEN drink
IF i am tired THEN sleep
IF i press left arrow key THEN turn car left
seem obvious enough, and its that simple for a computer to make decisions (actualy this is the only way a computer makes decisions internaly...on and either/or basis), this line
if leftkey()=1 then turn object left 1,2
can be used to replace the old turn object left line, leftkey() is an internal function of darkbasic that detects the left key being pressed (thats the left arrow key in the cursor key cluster), the empty brackets have to be there, they reserve a space for the key to return its status, 1 for down and 0 for up, this converts into plain old english (read along the line)
if leftkey equals one then turn object left MR2 two degrees
sorta cryptic, but knowing what it means its intelligible enough, but why stop at just the left key, lets go mad
if rightkey()=1 then turn object right 1,2
you should be able to work out what that does, now we can make it all into an interactive model viewer, eg
load object "MR2.x",1
waitkey
do
if leftkey() then turn object left 1,2
if rightkey() then turn object right 1,2
loop
so thats a first simple MR2 viewing program, and thats how you code in darkbasic (other languages would take hundreds of lines just to get the computer set up to load the object), all you need to do is read the manual of instructions that DB understands, and piece them together to make the program move the object/s as you like, for example to allow you to drive the object off the screen just add the following line inside the do-loop
if upkey()=1 then move object 1,0.1
you should be able to work out what key you need to use and what will happen when you press it, try it, you can`t do any damage.