Here's is an assortment of tutorials I thought about writing to help out beginners to Dark Basic.
If... Then....:
Another huge part of games is AI code or engines. In a nutshell, if one thing happens, iniate another thing.
Example:
If myscore = 500 then goto next_level:.
If Then statements are easiest to use.
gosub enemies_sight
If enemy_sees_you then gosub enemy_fire
You are most likely going to use if then statements for any syntax you will ever make.
Logical Operators:
As you may know in all games being released, a line of code (or several depending on what language) are used to have something happen. Below is a sample list.
= Equal to
<> Not Equal to
< Less Than
> Greater Than
<= Less Than or Equal to
>= Greater Than or Equal to
If myscore = 500 then goto you_win:.
If mytimer = 0 and myscore=0 then goto you_lose:.
An excellent example of timer tutorials is TDK's that is stickied on the top of this board.
An excellent example of a game with a timer is "Mario Bros."
Do Loops:
The main part of a program would be the main loop. To create a main loop, you would make the code:
Do
Loop
Every code inside that do loop will keep occuring over and over.
If you were to type:
do
print "Hello World"
loop
you would find a LONG list of Hello World on the left of your screen.
Why?
Because that code starts with the do and after it does the command, it hits the word loop. Loop tells it to go back to the do.
If you did not want this to happen, you would type in the command:
set cursor 0,0
That would place the text, or anything, and the top left hand corner of you screen. Of course, you would type
do
set cursor 0,0
Print "Hello World"
loop
for that to happen.
Creating Objects:
Every game you have played and will play will always have an object in it. It can be a basic crate or Master Chief. The most basic command to create objects is below:
make object cube 1,100
That would tell the program to create a cube, with the diminsions of 100. 100 high, 100 wide, etc...
For our basic syntax, you would add in the command:
make object cube 1,100
do
set cursor 0,0
print "Hello World"
loop
Never ever ever ever ever place the command "make object cube 1,100" inside your do loop. Try it now and see what happens.
Exactly, it already exists. You are telling your program to read the code in you do loop, but it goes back to the to and it says to make another object. In "make object cube "1",100" the "1" is the ID number of your code. This is helpful for organising your objects with numbers.
Cameras:
One of my favorite things to deal with is Cameras. Cameras obviously view your objects and your game world.
The basic commands for using cameras are below:
position camera (position, position, position)
point camera (position, position, position)
That is easy to use for positioning where you want your camera.
MORE UPDATES SOON
Lastly, if you didn't find this useful, sorry for wasting your time.
EDIT:
These work for DBC. I haven't tried DBP, they should though.