Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / tut. for newcomers.

Author
Message
DB newbie
19
Years of Service
User Offline
Joined: 13th Nov 2005
Location: um..... i dont remember.
Posted: 4th Mar 2006 16:59
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.

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/
UFO
19
Years of Service
User Offline
Joined: 11th Oct 2005
Location:
Posted: 4th Mar 2006 17:59 Edited at: 4th Mar 2006 18:01
cool.
I doubt that would be helpful to anyone because there are already lots of tutorials for beginners out there. It would be alot more helpful if it was more advanced, but because of your name, I don't think you are really ready to go that far. New people making tutorials is helpful to them, because it increases their understanding of the subject. But if they are new, if would be next to useless to other people because sometimes new people don't understand some things very well and do some things wrong, like there are in this one.

*You should explain the x y and z azis (what are they) if this is for newcomers
*The end program has a few things wrong with it. It should look like this:


Changes:
-it is indented
-You should always use sync on and sync in programs.
-position object and color object moved out of loop because the color and the position of the object doesn't change. It you were coloring the cube random colors, you would want to put it in the do-loop, but not if it doesn't change. Same if the cube was moving around 3D space.

In short, your time was not wasted in making this tut, since it probably helped you learn more, but if you want it to be helpful to newcomers and introduce good habits, you should wait until you are a better programmer. I still don't classify myself as being good enough to make a good tutorial.

Yamman
19
Years of Service
User Offline
Joined: 11th Jun 2005
Location:
Posted: 4th Mar 2006 18:40
why should you always use sync? if it is not a fast program, wouldnt it be better to let the computer handle refreshing? i am probably wrong, im just cursoius.
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 4th Mar 2006 18:55
It's better for a newer person to know rather than not to.

DB newbie
19
Years of Service
User Offline
Joined: 13th Nov 2005
Location: um..... i dont remember.
Posted: 4th Mar 2006 22:54 Edited at: 5th Mar 2006 00:01
ok i know more things then just the commands i posted im not a total noob that is just my origanal name and i dont want to change it because people wont remember who i am.

maybe i will do one on strings and arrays.

Check out my site!(unfinished)
http://www.freewebs.com/dbnewbie/
RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 5th Mar 2006 00:40 Edited at: 5th Mar 2006 00:41
Why do people always assume a description of DB's commands is a tutorial? Its not, its a description of DB's commands.

<EDIT>

Just noticed the program at the bottom, Im an idiot.

Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 5th Mar 2006 03:40
In the area where you talk about color you don't really tell Newbies anything that's vital to using the "rgb" command... like what "rgb" stands for and that the numbers can only be 0 to 255. Just saying "you can change the numbers in the () to anything that will make another color." won't cut it as a tutorial.


DB newbie
19
Years of Service
User Offline
Joined: 13th Nov 2005
Location: um..... i dont remember.
Posted: 5th Mar 2006 19:24
ok thank you for the suggestion Grog i might edit my post in a bit.

Check out my site!(unfinished)
http://www.freewebs.com/dbnewbie/
DB newbie
19
Years of Service
User Offline
Joined: 13th Nov 2005
Location: um..... i dont remember.
Posted: 7th Mar 2006 02:48
do you guys think i should make one with arrays for the future.

Check out my site!(unfinished)
http://www.freewebs.com/dbnewbie/
Redostrike
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: Belgium
Posted: 7th Mar 2006 10:16
Do .... Loop

Whit do and loop you can create loops.

Try this.



This program never stops because your in an infenitif loop.
You can end the program whit the help of variables. Here is an example.



Look for more in the DBP/DBC help Files.

Only heroes live forever.
Beatboxing Rulllllllllllzzzzzzzzzzzzz
www.redostrike.tk (Anime site trade availible)
RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 7th Mar 2006 16:02 Edited at: 7th Mar 2006 16:05
Im not trying to put you down and as always more tuts are better than less (if they're correct), but I dont see what this tutorial is offering that the help files and the other tutorials out there offer with so much more. Except for the final program at the end where you dont really explain what and why you did things in, this is just a basic explanation of some of DB's commands.

I know you probably dont want to hear this either but I dont quite think you're qualified to write a tutorial yet anyways. Judging from the questions you've been asking recently you've still got quite a lot to learn before you can start writing things to teach newcommers. Thats not to say this wouldnt teach newcommers anything, but from the way you've been writing things they may get an invalid idea on how or why a command is used cuasing them more damage than help in the future.

I'd say stick with programming for now, but nobody says you have to listen to me

DB newbie
19
Years of Service
User Offline
Joined: 13th Nov 2005
Location: um..... i dont remember.
Posted: 7th Mar 2006 17:00
ok it didnt put me down i was bored that day and wanted to try to help.

Check out my site!(unfinished)
http://www.freewebs.com/dbnewbie/
Computer Nerd
19
Years of Service
User Offline
Joined: 25th Jan 2005
Location: What do you care?
Posted: 7th Mar 2006 17:29
There's too many starter tutorials. I stopped doing those after I did my page man I was stupid to do beginner's tutors. I'm don't really want to help anybody anymore, I took about a week to do those tutorials, in my spare time and no one cared. Why? There's a million of them, and plus if your a newbie, if you write a tutorial your not advanced enought. You must show indentation and good habbits even if you have bad habbits.

I hope your not offended by my comments, this was not a flame

Current Project - Jono's Maze(Open Source, 3d maze shooter)
Progress Of Project - 0.5%
DB newbie
19
Years of Service
User Offline
Joined: 13th Nov 2005
Location: um..... i dont remember.
Posted: 8th Mar 2006 01:32
i know what you meen even though mine only took 10 minutes. i feel bad for you.(sympathy)

Check out my site!(unfinished)
http://www.freewebs.com/dbnewbie/
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 8th Mar 2006 06:47
Quote: "i know what you meen even though mine only took 10 minutes."


Tutorials need to be worked on a lot longer than 10 minutes. It's easy to skip things and make mistakes when the tutorial is thought up on the fly when you post. It needs to be done offline and posted after you've looked at your tutorial over and over again for a few days or even a month.

There's actually guidelines you can go by made by TGC for tutorial submissions (its for Pro but it can be used for Classic as well):
http://developer.thegamecreators.com/?f=tutorial_guidelines

I'm with RUCCUS. Just because you know the syntax of a command doesn't automatically make you qualified to make a tutorial on it. It's better to focus on learning more about Darkbasic than making tutorials.


RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 9th Mar 2006 19:11
Quote: "It needs to be done offline and posted after you've looked at your tutorial over and over again for a few days or even a month."


Hehe, I did the first two chapters for the Newcommers Guide to Blah blah blah in the forum posts But he's right, its just cuz im cool like that.

Login to post a reply

Server time is: 2024-11-27 04:37:23
Your offset time is: 2024-11-27 04:37:23