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 / Help! Beginner

Author
Message
Cameron
19
Years of Service
User Offline
Joined: 7th Aug 2005
Location: In Your Closet...
Posted: 7th Aug 2005 23:05
Hey Everyone Im Not A Total Noob But I Recently Bought The Beginners Guide To Darkbasic Game Programming And Read It. After I Was done I Kind Of Got An Understanding Of DarkBasic But I Just Still Dont Get It. Like When To Do Things When U Code Im Confused.

Copyright (c) 2005 Cameron
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 8th Aug 2005 00:19
well, perhaps you should specify a little more, i have no idea what kind of answer to give you, but i have advice.. first of all don't try to stuff your head with every programming principal, start off making a pong game or something, and then progress, that's the best way to learn

Your signature has been erased by a mod because it's larger than 600x120...
Crazy Programmer
AGK Developer
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Lost in AGK
Posted: 8th Aug 2005 00:47
Hes talking about where to place the code like

sync comes first
then load ur objects
then make matrix or load terain
then main loop
start to close the main loop

Cameron
19
Years of Service
User Offline
Joined: 7th Aug 2005
Location: In Your Closet...
Posted: 8th Aug 2005 00:54
Yeah But Like the order thing i need but i read the book and i still have sort of an idea how to make a pong game. i know how to load all that stuff its just movement and other things that are confusing.

Copyright (c) 2005 Cameron
Louiz ofRohr
20
Years of Service
User Offline
Joined: 11th Nov 2004
Location:
Posted: 8th Aug 2005 01:18 Edited at: 8th Aug 2005 01:24
DarkBasic's basic program structure is very simple:



I think you did understand that much time ago, but it is basicall it..

Not difficult..
You don't need to buy a book.. DBP (and DBC, too, I think)
comes with examples and explanations for each command..
I did learn this way..

Other good way to learn is figuring out third party's code snippets..
You can read some of those and make you own comparisons, change
some statements, numbers, replacing the media in the code.. etc..

Good luck.. and welcome

The worst foe lies within the self...
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 8th Aug 2005 03:29
Programming is an art which takes years to master. I've been programming over 25 years now and I'm not as good as I'd like to be.

The problem is that a lot of newbie posts on forums are from people who think that now they've got Dark Basic, they will be able to write Quake or Doom in a few weeks. It's just not that easy!

This isn't a dig at you - or anyone else for that matter - it's just the way things are.

OK, I could write an acceptable pong game to match the arcade machine version in a few hours - as could many of the programmers who post here.

But for a newcomer to programming, I think that even pong is far too difficult if you haven't mastered the basics. Like learning a spoken foreign language, it's not easy - regardless of what anyone might have told you.

Although you say you aren't a total newbie, what programming experience do you have? If you are pretty good at another programming language then it's probably just the 3D side of things you're struggling with.

If you've not done any programming before using DB, then you may be missing the essential 'building blocks' knowledge. What level are you currently at?

For a complete beginner, I would start with writing non-graphical stuff like that number guessing game where the computer picks a number and you have to guess what it is. The computer tells you if your guess was too high or too low.

As pathetic as it is, you will learn a lot about the basics of programming by doing menial stuff like this.

To teach yourself about strings, write a version of hangman.

Before anyone will spend time filling all the blanks in for you, you'll have to let us know what level you are at the moment.

Do you understand what variables, strings, arrays, subroutines (procedures) and functions are? If you do, then the rest isn't so hard if you are prepared to keep with it!

One of the things I see with far too many DB programs is a total lack of layout and planning. It's just too easy to start writing a game with no previous thought about the layout. Anyone make software flowcharts as part of the design process any more? Nope - me neither - but you had to years ago!

Programs are no more than a list of instructions telling the computer what to do. Each instruction is carried out in sequence starting with the first and then the next. If not told otherwise, the computer does all the instructions and when the last one is done, the program ends.

GOTO was introduced so you could jump to different sections of your code and repeat things, though these days, avoid GOTO like the plague - you shouldn't ever need it.

These days we have procedures and functions and to make code re-usable so you don't have to keep re-typing it in, you should put as much as you can in them.

For example, create a procedure called InitVars which contains all your variable initialisations. At the start of your program, just use Gosub InitVars.

When you game restarts, you simply Gosub InitVars and you're ready to start again! Your main program as Louiz says contains a 'Main Loop' which goes round and round gosub'ing and calling functions.

OK, OK, I'll stop now. Said far too much already!

TDK_Man
Cameron
19
Years of Service
User Offline
Joined: 7th Aug 2005
Location: In Your Closet...
Posted: 8th Aug 2005 04:49
Thanks Man But I Already Know how to do guessing games and hangman.
but thanks for the input. and i know i cant write quake in a few weeks lol. Thanks

Copyright (c) 2005 Cameron
Cameron
19
Years of Service
User Offline
Joined: 7th Aug 2005
Location: In Your Closet...
Posted: 9th Aug 2005 08:34
Well I Know The Basics Of C++ And Pascal. So That Helps?

TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 9th Aug 2005 08:38
NP - you didn't say what level you were on, so I had to generalise!

Quote: "and i know i cant write quake in a few weeks"


You'd be surprised how many new DB users think they can! Lol

TDK_Man
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 9th Aug 2005 14:44
i tried to make a zelda game when i first started....i failed miserably

Your signature has been erased by a mod because it's larger than 600x120...
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 9th Aug 2005 17:35
Yes - the Pascal will help!

Basic is loosely based on Pascal, syntax and structure-wise.

My background is in Pascal too - having started a good few years ago with Borland Pascal and moving on to Turbo and Delphi when it appeared.

TDK_Man
Cameron
19
Years of Service
User Offline
Joined: 7th Aug 2005
Location: In Your Closet...
Posted: 10th Aug 2005 02:45
Ok cool thanks.

Login to post a reply

Server time is: 2024-11-27 21:35:41
Your offset time is: 2024-11-27 21:35:41