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 / Simple Tutorials I made!

Author
Message
Computer Nerd
19
Years of Service
User Offline
Joined: 25th Jan 2005
Location: What do you care?
Posted: 18th Jun 2005 05:56
Okay everyone new to DarkBASIC classic or DarkBASIC Professional
should start small. By small I mean printing hello world on the
screen. I started small, and are taking tutorials currenlty myself.

Tutorial 1: Hello World
Okay fire up DarkBASIC!

-The Rem Command-
The rem command is just like a blank line to a computer, it skips
it. It's a note to keep track of your program. You make be thinking
what as this got to do with a cool 3D game that rivals doom 3.
Well if your trying to make that you need to make notes in
your program. Or else you'll forget what you did over time.
It's up to you to use them, but I think you should!

-A Fast Way to Note Things-
If you don't want to type rem out over again and again you can
use ` it does the same thing.

-Big Notes-
If you need to make a large note it would be very annoying
to type out rem or ` over and over. So instead use this
remstart, this starts a large rem statement. You can end this
large statement by remend. Again it's up to you to use it,
and another thing to note is make sure you end a remstart
or else your entire program will be just like a blank space
skipped.

-The Print Command-
Okay, what if you want to have text on your screen?
Well use the print command!
Here's an example:
print "whatever you want"
You can also use text, it works like this text x,y,string$
The X position is horizontal, y vertical, and "insert text here" for
what you want to print.
Text is somewhat better then print.
Later I'll show you how to fool around with text.

-Hello World, a friendly greeting and your first program-
Maybe went you go on to make the next big hit you'll think back
at your first program. Mine was hello world.
Okay load up DarkBASIC
type the following code:



It's not as cool as Doom 3 for sure or your favorite game (maybe it
is). But it's how you start, I'm sure John Cormack one of the
creators of Doom did not magically say I want to make Doom and
2 hours later had a masterpiece that changed gaming forever.
He had to learn it, practise it, and master it.
It'll take time before you even make an 3D example game.
Or even breakout! But Hopefully over a few weeks and stuff I'll
have tutorials that lead up to 3D pong. I'm still learning so
as I learn I'll help you all learn.

Tutorial 2: Variables, they're Very Able

-Variables-
Variables are very, very important.
There are three types of them string variables:
variable$ = "Strings have text"
Integer numbers
variable = 12
And real numbers
variable# = 12.2
If you think you'll never use them your in for a shock games made
in DarkBASIC like Monster Maze, Star Wraith, and the next best
hit all use them.

-User Input What Makes Games Fun-
The Input command is a blocking command, what it does is block
any other commands from happening until it gets done.

Here's an example
input a
Input a would only allow numbers
input a$
Input a$ would allow text only, and maybe numbers.
Note: Don't use strings for numbers if you do
this will happen:
a$ = "4"
B$ = "5"
c$ = a$ + b$
Print "45"
Variables arn't case senstive just so you know.

Okay so from this you can probably make a mad lib game!
But how, easy
a = 100
print a
This would print 100, so if you let the player put in their
own value of a then it would print whatever their value of A was.

-What's your name?-
Here's an example of a name asker:

Things to do:
Make this a mad lib game, or change it to age asker.
If you need help email jonathanskinner_45@hotmail.com
I need time to get back to you since I'm having final exams
but I have my last one on Monday!

More Tutorials To Come

Peace Out for now,
Jono

Best of luck in making the best game of this century!
I hope you do.

DarkBasic Classic Owner

Login to post a reply

Server time is: 2024-09-23 21:23:59
Your offset time is: 2024-09-23 21:23:59