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 Professional Discussion / learning Dark Basic Coding

Author
Message
Student
16
Years of Service
User Offline
Joined: 18th Nov 2009
Location: London, United Kingdom.
Posted: 18th Nov 2009 22:23
Hi all,
I need help with my BSC final year project. I am new in using Dark Basic Pro to develop a game. just discover the software. can someone please help me with the code i can use to develop a game with 3 stages. from stage 1 -3.
I just need help with the coding and also platform a basic pro can be run for the player. need quick help please.

Get Information and Knowledge.
Grog Grueslayer
Valued Member
21
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 19th Nov 2009 01:24
It's good that you picked Darkbasic Pro as the language to use for your final project. But if you've never programmed before and you're wanting to make a full game in a month you'll probably have a hard time finishing.

You can learn the basics with TDK's tutorials.

http://forum.thegamecreators.com/?m=forum_view&t=99497&b=10

Zotoaster also has a list of his and other peoples tutorials.

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

Zaibatsu
20
Years of Service
User Offline
Joined: 1st May 2006
Location: Lost in Thought
Posted: 19th Nov 2009 02:04
It's in the list in the second link that Grog Grueslayer posted, but I think it would help if I linked this directly.

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

It's a simple step-by-step tutorial that I posted a while ago. It should help you learn the basics of DBP.

TDK
Retired Moderator
23
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 19th Nov 2009 02:23
@Student:

If you do Zaibatsu's tutorial, please, please, please don't get into that horrible 'commands all in capital letters' mullarky.

Believe me, it is certainly NOT neater or easier to read for many people. I personally find it VERY difficult to read on here - as do many others.

If I find questions on here with code snippets in capitals, I simply don't read them - purely because the majority of the time I can't!

And, please indent your code from day one - you'll thank me later...

TDK

Zaibatsu
20
Years of Service
User Offline
Joined: 1st May 2006
Location: Lost in Thought
Posted: 19th Nov 2009 04:06
Quote: "If you do Zaibatsu's tutorial, please, please, please don't get into that horrible 'commands all in capital letters' mullarky."


I say in my tutorial that's not the only way to code, it's just the way I like to code.

Quote: "Believe me, it is certainly NOT neater or easier to read for many people. I personally find it VERY difficult to read on here - as do many others."


I never said it was universally easier to read, I just said it was easier for me to read.

RUCCUS
21
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 19th Nov 2009 04:11
I always capitalize. I find it makes it look cleaner, maybe some don't but it does seem to be the norm around here. It just helps separate command calls from variable names (as I dont capitalize variables) for me. Just a personal preference, Im sure if the code snippet was good enough you'd manage to get past the capitals thing TDK .
Grog Grueslayer
Valued Member
21
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 19th Nov 2009 05:31
I always use lower case in code unless it's a variable, array, or function but I capitalize each command in messages. Having the IDE color the commands is enough of a difference to not need capitalizing (at least for me).

Neuro Fuzzy
19
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 19th Nov 2009 05:36
@ ruccus



TDK
Retired Moderator
23
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 19th Nov 2009 15:09 Edited at: 19th Nov 2009 15:13
Quote: "I always capitalize... Im sure if the code snippet was good enough you'd manage to get past the capitals thing TDK"


As an experienced coder, you are entitled to use caps if you like as others are unlikely to see it.

Beginners are different as they are expecting others to read and help fix problems in their code for them, so it's in their interest to make sure that it's readable by as many other people as possible. As such, it's bad practice to teach this to them.

And Zaibatsu I do accept that you do say "it's just the way I like to code". I just needed to say please don't follow suit as newcomers might assume it's a good thing...

I've been programming computers for thirty years and never come across any professional programming examples where the author has used all caps.

I'm obviously talking about languages where you aren't forced to have reserved words in caps here. The last examples I saw all in caps were probably the ZX80/81, Spectrum and the BASIC ROM in the 8-bit Atari machines.


So, to clarify my post:

I was talking about code snippets on the forums. If you look in code boxes, multiple lines of code are spaced closely together making one big horrible mess. All caps increases the problem.

With All Caps:



Without Caps:



I think the second code snippet is much tidier and definitely easier for me to read.

Like many others who use the forums, I don't have 20/20 vision and if you can't easily read a code snippet in a post asking for help, you simply aren't going to help them.

So, it's not a case of won't read, it's as I said, more a case of can't read...

The fact that I still wouldn't like it even if I did have perfect vision doesn't come into it.

TDK

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 19th Nov 2009 16:23
Quote: "I've been programming computers for thirty years and never come across any professional programming examples where the author has used all caps."


I've been programming for over 40 years and have seen plenty of examples - and it's plain some professional programmers can't make up their minds (from the MS DX9 SDK):



I agree with your distate for all caps though. I often use capitalised words to make long variable names more readable as in ambientLightColour for example.
dark coder
23
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 19th Nov 2009 17:02
That's far from all caps, in that example I can only see all caps used in acronyms, typedefs and macros which other than typedefs is very common, especially for macros, as not making them upper case can cause major issues. Using all caps for everything makes very little sense, but I guess in DBPro it doesn't matter too much.

While coding style is indeed a personal preference and telling others to conform to whatever other style you prefer isn't a good thing to do, they should at least have valid(demonstrable) reasons for using such a style. But most importantly, they should be consistent about it; there's nothing more annoying than reading code that's copy/pasted from various sources all using wildly different styles leaving you with an absolute mess.

Grog Grueslayer
Valued Member
21
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 19th Nov 2009 17:57
Quote: "Like many others who use the forums, I don't have 20/20 vision and if you can't easily read a code snippet in a post asking for help, you simply aren't going to help them."


My Dad uses all caps for everything he does on a computer because he can't see lowercase letters that well.

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 19th Nov 2009 21:53
Green Gandalf:

Quote: "and it's plain some professional programmers can't make up their minds (from the MS DX9 SDK)"


Dark Coder:

Quote: "That's far from all caps"


And your point exactly?

Quote: "there's nothing more annoying than reading code that's copy/pasted from various sources all using wildly different styles leaving you with an absolute mess."


Agreed. [Note to self: must remember to check my demos carefully just in case DC is looking. ]

Quote: "My Dad uses all caps for everything he does on a computer because he can't see lowercase letters that well."


My Dad would need an unusually computer literate medium for him to see anything.
dark coder
23
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 20th Nov 2009 05:31
Quote: "And your point exactly?"


Well you did just quote someone who said "I've been programming computers for thirty years and never come across any professional programming examples where the author has used all caps."

then post "I've been programming for over 40 years and have seen plenty of examples" followed by an example with a note: "and it's plain some professional programmers can't make up their minds"

which wasn't the case, as the code wasn't all in upper case, nor was the code arbitrarily changing between cases. Though I'm sure there is some code which is all upper case, but if it was a professional who wrote it then I'd have no idea how they managed to dodge the amount of flames they'd receive from anyone reading it.

Orion1024
17
Years of Service
User Offline
Joined: 7th Mar 2009
Location: Dimensional Coordinates: 323.935.914.157
Posted: 20th Nov 2009 08:57
If you only have a month to complete your project, I would keep your game very, very simple. I'm thinking something along the lines of Pong...just as an example. You can go with a simple game and if time permits jazz it up a bit. Not sure what you mean by 'and also platform a basic pro can be run for the player.' I consider myself to be pretty good at programming and it took me several months to finish a relatively simple game. Half that time was spent debugging, BTW. So, given your time constraints, my advice is to set your goals fairly low. As mentioned use proper indentation. I also highly recommend using well chosen, descriptive variable names. As for all caps, I only use them for constants.

Looking for the vortex to another Earth
Student
16
Years of Service
User Offline
Joined: 18th Nov 2009
Location: London, United Kingdom.
Posted: 20th Nov 2009 13:44
@Orion1024
I need help with the programing side. can you give me idea where to start on DB pro please. I am new to programming and DB pro.

give me a code for dividing game into 3stages please.

Get Information and Knowledge.

Login to post a reply

Server time is: 2026-06-12 06:56:22
Your offset time is: 2026-06-12 06:56:22