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.

DarkBASIC Discussion / [STICKY] TDK's Programming Tutorials For Beginners [DBC/P]

Author
Message
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 8th Feb 2007 01:09 Edited at: 21st Apr 2010 21:41
Indi originally started a thread linking all the tutorials for beginners that I had scattered around the forums. In that thread it was suggested that it would be easier to find individual tutorials if the first post contained links to each one as an index - rather than having to scroll through all posts to find each one.

Unfortunately, as Indi started the thread I was unable to edit the first post so I've started this new one. I can then update the first post if and when new tutorials are added.

The old thread has been un-stickied and is here:

http://forum.thegamecreators.com/?m=forum_view&t=96010&b=7

TDK_Man


Tutorial Index:


1. TDK's Programming For Beginners Part I - Variables
Part one of a series of tutorials from my web site which covers the basic building blocks of programming in Dark Basic - 99.9% of which is relevant to both DBC and DBPro users starting to learn programming.

Subjects Covered:

* Numeric Variables
* String Variables
* Single Dimension Arrays
* Multi-Dimensional Arrays
* Cubic Arrays
* Maths Operators
* Relational Operators
* If...Then Conditions

2. TDK's Programming For Beginners Part II - Layout, Structure And Style
Part 2 looks at program control and how to organise your code to make it easier to add to and locate errors.

Subjects Covered:

* Program Jumps
* For...Next Loops
* Do...Loops
* Repeat...Until Loops
* While...EndWhile Loops
* Program Layout
* Indentation
* Subroutines
* Variable Scope (Local/Global)

3. TDK's Programming For Beginners Part III - Elementary Commands
Part 3 covers a few 'building blocks' commands which allow you to write the most basic of programs.

Subjects Covered:

* Screen Output
* RGB()
* RGBR(), RGBG() and RGBB()
* Ink
* CLS
* Print
* Set Cursor
* STR$()
* Text/Center Text
* 2D Graphics Commands
* String Functions: Left$(), Mid$(), Right$() and CHR$()
* VAL()
* ASC()
* Rnd() and Randomize
* Mouse and Keyboard Input

4. TDK's Programming For Beginners Part IV - File Access
Part 4 shows you how to read and write data from and to disk, including a section on creating a hiscore table in your games.

Subjects Covered:

* Open To Write
* File Exist()
* Open To Read
* File End()
* Saving Arrays
* Saving Hiscore Tables
* File Formats
* Loading Routines
* Reading Other Files
* Reading Files With Line Lengths Greater than 255 Characters

5. Choosing The Correct Variables
DB Classic has both integer and float variables. This tutorial shows you how to decide which to use and why.

6. Functions In DB Classic & DB Pro
The essential guide to what Dark Basic functions are, what the benefits of using them are, how they are used and what to look out for when using them.

7. Everything You Wanted To Know About Strings
Pretty much all you need to know about using strings in your DB programs. From cutting them up and joining them back together again to shuffling and dealing a pack of cards - it's all here!

8. TDK's Timer Tutorial
How to use the Timer() function to add clocks, timer events and counters to your DB programs.

9. DB Matrix Primer
The DB terrain matrix explained fully and in detail, but in plain easy to understand terms. From initial creation to texturing and deforming - everything you need to know.

10. Dark Basic Collision Made Simple
How to stop DB objects passing through each other using the native DB collision commands.

Subjects Covered:

* Object Hit()
* Object Collision()
* Collision With Objects With Unknown Object Numbers
* Sliding Collision
* Make Object Collision Box
* Get Object Collision X()
* Get Object Collision Y()
* Get Object Collision Z()

11. 2D Shooting - A Basic Introduction (DBC & DBP)
A primer for DBC and DBP on how to shoot bullets in 2D games and still move - including firing multiple bullets.

12. Game logic for Beginners
How to turn the game you can see in your mind into a Dark Basic program.

13. DB Multiplayer Commands Tutorial
Want to create a multiplayer game in DB? This tutorial will bring you up to speed on all the commands you need to make it happen.

14. Beginners Introduction To Particles In DB Classic
An in-depth look at simulating particles in DB Classic (Pro has it's own particle commands). Make flames, smoke, clouds, dust, weather effects and much, much more.

15. A Guide On Writing Tutorials
Think you could write a tutorial yourself? Check out this guide to see what is expected of you if you do.

16. A Tutorial On How To Create In-Game Menus
Need a menu screen in your game with clickable buttons? This tutorial shows you three methods of doing it - the hardest part is deciding which method to use...

17. The Secrets Of Set Camera To Follow
Can't get the camera to follow you character or car. Check out this tutorial to find out where you are going wrong. Even includes a media-less boxing ring! Go figure what that's for...

18. How To Avoid Using Goto
A simple explanation of why using Goto can cause your programs to stop working and also makes them a lot harder to write than they need to be. I also discuss why I think using functions for everything isn't really the right way to do things either...

TDK_Man

Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 10th Feb 2007 00:28
Youve made a lot of tutorials... Putting them all in one place was a good idea. (Acknowledging indi as well)


Cheers,

-db


"There's no such thing as a stupid question, just stupid people."
Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 10th Feb 2007 03:11 Edited at: 10th Feb 2007 03:12
That's a lot of tutorials!

I have a question--

If I have questions about any of these tutorials should I post them here or in the tutorial's original post?

TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 10th Feb 2007 04:23
It's probably better posting in the tutorial in question's thread rather than here.

TDK_Man

Inverted
18
Years of Service
User Offline
Joined: 19th Nov 2006
Location: Oregon
Posted: 20th Feb 2007 16:33
Thanks TDK, these will definately help me out! Now i just need to have time to read them.

Thanks again,
-Inverted

Opposites are different, not wrong
me logic gets wiggly sometimes
17
Years of Service
User Offline
Joined: 24th Feb 2007
Location:
Posted: 24th Feb 2007 21:15
Hi i just got here
i've spent the last year with flash / swish
trying to learn several programming languages
java , vb , c
making me dizzy
thinking im going to try this as a new approach
So hello folks , glad to meet ya !

rachen
Sarge Edlow
17
Years of Service
User Offline
Joined: 3rd Mar 2007
Location:
Posted: 3rd Mar 2007 08:21
hey do i need to know how to do all this command stuff before hand, or will the system tell me?


hopefully, it wont be confusing

Im the TS4 messiah
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 10th May 2007 09:37
hopefully, it wont be confusing

My tutorials are never confusing!

Just added Tutorial 16 - on how to make in-game menu screens. Includes three methods - Mouse X,Y detecttion, Colour Zone Detection and Sprite Collision Detection.

All required graphics are embedded in the tutorial so you can right-click on them and save them to your project folder.

TDK_Man

Zojin
17
Years of Service
User Offline
Joined: 11th May 2007
Location:
Posted: 12th May 2007 07:43
OMG... THANKS... ALOT.... VERY GOOD TUTORIALS!!!!!!!
MikeB
17
Years of Service
User Offline
Joined: 5th Apr 2007
Location: My Computer, Shropshire, England
Posted: 22nd May 2007 15:21 Edited at: 26th May 2007 20:18
Yeah thanks alot TDK, these are awesome.

E.D.

SimSmall
20
Years of Service
User Offline
Joined: 7th Aug 2004
Location: United Kingdom
Posted: 8th Jun 2007 20:36
TDK_Man is always very helpful. He is an outstanding member of the community, who shares his experience with all. I'm personally very proud to be part of a community with such a highly skilled and helpful programmer.

So, Barrie, Thank you for all of your work you have committed to the community, and I know you're going to keep it up...
Lucifer
18
Years of Service
User Offline
Joined: 26th Dec 2005
Location:
Posted: 17th Jun 2007 03:11 Edited at: 18th Jun 2007 02:29
Hey Tdk, i used the "thingy" (dont remember the name) and looked at this page http://web.archive.org/web/20010407005138/www.darkbasic.co.uk/cgi-bin/Ultimate.cgi?action=intro .. it's the darkbasic forums in the year 2000, and i see that you were a moderator back then, is that you? cool, you're ancient..

TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 18th Jun 2007 09:25
Quote: "is that you?"


Yes - that was me.

And yes I am ancient lol!

TDK_Man

Lucifer
18
Years of Service
User Offline
Joined: 26th Dec 2005
Location:
Posted: 18th Jun 2007 17:12 Edited at: 25th Jun 2007 13:39
wow, so you're like a 100 years old...

(lame joke)



Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 2nd Jul 2007 17:22 Edited at: 6th Jul 2007 22:34
@ TDK

Bravo, these tutorials are excellent. I think I will brush up on my basics while I'm here.

Power to the NOOBS!

I make music and art. Here is a sample of my art: done in Paint! It's all I have
Aralox
17
Years of Service
User Offline
Joined: 16th Jan 2007
Location: Melbourne
Posted: 7th Jul 2007 13:31
I absolutely love people who do stuff like this, thank you Tdk man.


011100000111001001100001011101100110100101101110
Roborb = [0-------------] - Planning stages
Dark Dragon
17
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 29th Aug 2007 20:21
Once again,TDK, you have done the semi-impossible! nice!
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 18th Dec 2007 21:25
@Lucifer -
Quote: "wow, so you're like a 100 years old...(lame joke)"


That makes him only 4 years old silly - this is a computer forum - we speak in binary! (Another lame joke)

Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 21st Dec 2007 00:41
@JPS
What the hell is that! "4" (a third lame joke)

demons breath
21
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 21st Dec 2007 00:53
Woah you guys are on a roll with the humour now...

"A West Texas girl, just like me"
-Bush
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 21st Dec 2007 03:40
In Binary 100 = Decimal 4 = Yes it's lame - and Corny - and seemed appropriate at the time

Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 22nd Dec 2007 15:01
@JPS
I was pretending I had never seen a "4" before
Now I understand that you mean 100

Paynterboi TicTacToe
16
Years of Service
User Offline
Joined: 23rd Dec 2007
Location: That one place
Posted: 24th Dec 2007 00:18
hey can you make a tutorial on how to make a loading screen or somthing so that people dont see my boxes beeing made and moved etc if that makes sense oh and for some reason after i posted first message i cant see it in forums (new sorry XD) is ther a wait time or somthing so that it goes through bad language filters?

EYE R T3H +ick +ack +oe mester
Insert Name Here
17
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 25th Dec 2007 12:17 Edited at: 27th Dec 2007 11:45
@Painter Boy
Quote: "hey can you make a tutorial on how to make a loading screen or somthing so that people dont see my boxes beeing made and moved etc if that makes sense oh and for some reason after i posted first message i cant see it in forums (new sorry XD) is ther a wait time or somthing so that it goes through bad language filters?"

There are a number of ways to solve that problem, there's no need for a tutorial because that is a way too specific and simple problem.
Make a thread about it and I'll tell you how

Don't want to clog up TDK's thread


Sudoku arts, the rabi and Nancy DrewG
Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 26th Dec 2007 22:50
@Painter Boy
Quote: "hey can you make a tutorial on how to make a loading screen or somthing so that people dont see my boxes beeing made and moved etc if that makes sense oh and for some reason after i posted first message i cant see it in forums (new sorry XD) is ther a wait time or somthing so that it goes through bad language filters?"

There are a number of ways to solve that problem, there's no need for a tutorial because that is a way too specific and simple problem.
Make a thread about it and I'll tell you how

Don't want to clog up TDK's thread

Bloder
17
Years of Service
User Offline
Joined: 24th Feb 2007
Location: Cyberspace
Posted: 27th Dec 2007 11:09
Wow, TDK-your tutorials are great! I used the one about making menus. FAB!!!
THANKS!
demons breath
21
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 27th Dec 2007 13:41
@INH: have you just copied OBese's lower post word for word?

how peculiar.

"A West Texas girl, just like me"
-Bush
Insert Name Here
17
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 27th Dec 2007 15:29
How could I have done that? He copied me!


Sudoku arts, the rabi and Nancy DrewG
Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 27th Dec 2007 16:31
@INH
Here come the lawyers!

Insert Name Here
17
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 27th Dec 2007 23:41
That smiley is lopsided.


And just to stop psamming:
Great Tutorials, TDK.


Sudoku arts, the rabi and Nancy DrewG
Pixelator
17
Years of Service
User Offline
Joined: 8th Jul 2007
Location: here
Posted: 30th Dec 2007 21:43
@Painter Boy
Quote: "hey can you make a tutorial on how to make a loading screen or somthing so that people dont see my boxes beeing made and moved etc if that makes sense oh and for some reason after i posted first message i cant see it in forums (new sorry XD) is ther a wait time or somthing so that it goes through bad language filters?"

There are a number of ways to solve that problem, there's no need for a tutorial because that is a way too specific and simple problem.
Make a thread about it and I'll tell you how

Don't want to clog up TDK's thread


Maryville Game Developers
Visit our website at http://www.freewebs.com/maryville-game-developers/index.htm
demons breath
21
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 8th Jan 2008 13:09
haha

"A West Texas girl, just like me"
-Bush
Zombie 20
17
Years of Service
User Offline
Joined: 26th Nov 2006
Location: Etters, PA
Posted: 27th Jan 2008 15:20


everything was going cool, but I've run into a rut with Left$, but tell me how am I doing?


Coffee coffee coffee coffee coffee coffee cappacino, JAVA!
Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 27th Jan 2008 23:25
@Zombie
you missed the dimension

that will print the first four characters in Text$(1)

Sinani201
17
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 28th Jan 2008 01:07
Guys, this is getting off-topic!

Seriously, how do you make the little blue text come up below your message?
Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 28th Jan 2008 03:47
@Sinani
Is your location a cave?

but yeah sorry TDK

Sinani201
17
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 28th Jan 2008 04:25
Quote: "Is your location a cave?"

If it is, then your location is behind me!

Seriously, how do you make the little blue text come up below your message?
Zombie 20
17
Years of Service
User Offline
Joined: 26th Nov 2006
Location: Etters, PA
Posted: 28th Jan 2008 20:03
obese- Thanks buddy!!

Strings are fun to work with, never knew how much fun they were until this tut.


Coffee coffee coffee coffee coffee coffee cappacino, JAVA!
Stig Design Stig Magne
18
Years of Service
User Offline
Joined: 23rd Mar 2006
Location: Norway
Posted: 25th Apr 2008 07:21
nice tutorials they have helped me
oh an Strings are fun to work with, never knew how much fun they were until this tut. same here

Stig Design (Free Games,Sources,Textures,Photo`s)
Lisence Free at http://StigDesign.piczo.com
JamesJB34
16
Years of Service
User Offline
Joined: 1st Apr 2008
Location: Nazareth,Pa USA
Posted: 28th Apr 2008 12:49
Hi this is what i was looking for for like 2 days now. Thank you sir

Now i can start learning
darkend
16
Years of Service
User Offline
Joined: 9th May 2008
Location:
Posted: 10th May 2008 20:32
fantastic tutorials still on the first one they are very well explained, but i still dont get arrays

if life is hell wat is heven
Decius
16
Years of Service
User Offline
Joined: 24th May 2008
Location:
Posted: 28th May 2008 23:02
I seem to have trouble donwloading the first tutorial. Keeps showing (THIS PAGE CANNOT BE DISPLAYED)

The only thing evil needs to prevail, is for good men to do nothing
Irojo
16
Years of Service
User Offline
Joined: 21st May 2008
Location: Eating toast.
Posted: 7th Jun 2008 01:42 Edited at: 20th Jul 2008 05:32
Nvm.

I urge you to watch the film "Who killed the electric car". Support electric cars! Did you know their used to be more electric cars then gassoline cars?
Dark Dragon
17
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 25th Jul 2008 00:39
I like all the tuts TDK!

Took me a long time to read 'em all....


oh and join my PivoT Forum at....http://pivo.proboards104.com
gourd
16
Years of Service
User Offline
Joined: 29th Jul 2008
Location:
Posted: 1st Aug 2008 15:13
hey im using visual c++ and dark GDK and i cant use any of this functions such as mousex mousey declare string with $ like name$ ink LINE and etc it says undeclared identifier what should i write in my program so this functions will work?
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 1st Aug 2008 19:02
This is the wrong thread to ask about DarkGDK. Come over to DarkGDK board - do some googling - and then post -

Random color object
16
Years of Service
User Offline
Joined: 14th Aug 2008
Location: Montreal Canada
Posted: 17th Aug 2008 14:50
May I report a proken link?
The last one

* TDK's Game Programming Forums - Open To All - DB & Team Request Boards *

Thanks alot for those tut.

My actual color is Color object 1, RGB(128,2,3) but I would like it to be random.
Random color object
16
Years of Service
User Offline
Joined: 14th Aug 2008
Location: Montreal Canada
Posted: 17th Aug 2008 19:24
Broken link here 17. A DBPro Tutorial On Making A 2D Space Invaders Clone

My actual color is Color object 1, RGB(128,2,3) but I would like it to be random.
Invincibob 8
16
Years of Service
User Offline
Joined: 4th Feb 2008
Location: Some Place Somewhere
Posted: 2nd Sep 2008 02:17
No double posting! And thanks for the tutorials TDK.

Once, I fell of a bridge and died. When I came back, I decided to haunt this forum.
Sinani201
17
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 2nd Sep 2008 03:07
@Random color object
The link isn't broken, you just have to make a TGPF account to view the post.



I'm Sinani201, and I approve of this message.

Login to post a reply

Server time is: 2024-11-23 12:57:18
Your offset time is: 2024-11-23 12:57:18