ok this tutorial will help all of the total newcomers get the basic commands and ideas of programing. okdo just copy and paste the code read what i have to say about the command and type the code yourself orelse this will not help you. lets get started now.
Print Command
the PRINT command is one of the most basic commands in DarkBASIC all it does is write text to the screen.
to use this command you have to write PRINT "helloworld"
the word print tells DarkBASIC to print whatever is in the "".
so for your first command you could have something like this and feel free to change the words in the "" to whatever you want.
now lets move on to more commands!
Text Command
the text command is just like the PRINT command that you just learned but its more complex and useful. for example you can change the font,position it, and set the writing to oh say italic.
to use the text command all you need to do is. note: TEXT is more complicated. TEXT 100,100, "hello". now your probaly think what are the numbers for. well the first number is for the X axis and the second number is for the Y axis. you can also change the size and font when using the TEXT command. to change the font all you have to do is write SET TEXT FONT "times new roman" and bam you changed the FONT you can change the font to anything you like.
and then to set the font size all you have to do is put SET TEXT SIZE 24 you can change the number to anything you like. that about somes up the TEXT command im moveing on.
RGB command
the RGB command changes the color of things. you can use it to change the color of objects if you wanted to, it is very simple to use all you need to do is, color object 1,rgb(255,0,0) that would color object one (i will get into objects later) you can change the numbers in the () to anything that will make onother color. here are some numbers to put in the () for basic colors.
red: 255,0,0
green: 0,255,0
blue: 0,0,255
yellow: 255,255,0
black: 0,0,0
white: 255,255,255
now we are moving on
Make Objects
now that you have learned some of the basic stuff we can move to making standard objects. right now i will show you how to make a cube. to make a cube all you have to do is this MAKE OBJECT CUBE 1,10 its that simple. the first number in it is its object number that you switch it to now that is its number no object can take it.
now that you have made a cube im moving on.
Position Objects
this is very easy to do all you need to do is write POSITION OBJECT 1,20,32,15
the first number tells DB that you want to move object number one, the second number is the X axiz the third is the Y axis and the fourth is the Z axis. i am now moving on.
THE PROGRAM
now that you have learned the basics lets put to gether a program
you try and make your own useing the commands you just learned. here is my program using the commands.
make object cube 1,5
do
print "DB rocks"
text 100,100, "DB rocks"
position object 1,0,0,0
color object 1,rgb(255,0,0)
loop
dont forget to use the loop command look at my program as an example of were to put it. but never ever ever load or make an object inside your loop ok. see were i put mine out of the loop. 8-
|
OK IM FINISHED WITH MY TUT> I HOPE YOU GUYS LEARNED SOMETHING THANK YOU.
Check out my site!(unfinished)
http://www.freewebs.com/dbnewbie/