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 / This is not a flame, just want a response.

Author
Message
blather
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: United States
Posted: 30th Apr 2003 08:22
I am posting this in the newbie’s' section because it seems most appropriate.


So, the other night I posted a topic, it was errors, shaders, and textures. In it I posed the question about resources for people, "Who have never programmed before", as well as what people think about 3d canvas and texture maker. I am not looking for A vs. B comparisons, nor do I wish to hear someone drone on about the GLORY of the product. Since then I have acquired the 3Dcanvas pro download so I will answer that question myself. If the post was pulled because I simply asked for an opinion, SORRY, I'll only post about DB stuff.

The real reason for the post was about how to start the debugging process. Many self-taught people can learn from an example, but when all you do is rewrite correct examples from the book what are you learning? YES, I do want to do this on my own, but after looking at previous posts there are not many explaninations that go along with someone’s correction of another’s code.

Am I just overlooking something or what? The development of such a resource would be easy enough. Here on this board "snippets" of code are posted all the time. If the data was mined properly it could be turned into a valuable library for those of us who have never coded before. The example "problem code" could be looked at, and then followed by a short explanation of why it is wrong. Then the correction of the code could be next, with an explanation of why it works. Then maybe one or two alternatives. Now does that sound too hard, 70% of the work is already here, all that is really left are explanations and alternatives.

[for the admin: I do not whish to receive any email for other users so I am not posting my e-mail here. However I am on the newsletter list and did have to submit a valid e-mail address to join. If you plan on pulling this post too, then please do me the courtesy of telling me in the mail why and why this kind of a newbie resource is "BADVERTISING"]
"N. foolish talk esp. in great quantity"
Webster's
Rollit
21
Years of Service
User Offline
Joined: 26th Apr 2003
Location:
Posted: 30th Apr 2003 13:32
I see where you are coming from...
Well everyone here is aware of a lack of a good starting manual with well explained examples and comments... but as far as I know DB people are on the case and preparing some sort of new help file or online manual where there may be a specific example for each command (or something like it). It will ofcourse take time since tere are a lot of commands, technins etc available

what you say is a good idea though... I'm refering to the mention of posting code snipets with a good explanation from where noive ppl (inicluding me) can learn something...

for example myself...I'm not too interested in code snipets and other peopel solutions to problem as such.... what I tre to do is UNDERSTAND why that specific source code worsk the way it does...so that if it is possible I will than make my version (improve on it if at all possible) for my own use... and if I find some good result.. post it back to show what I got.

this is a proper learning process.. I do not want the fish from my fishermen friends... I want to learn how to fish so that I can catch my own fishes... and then sharing my experience back with them

sadly it takes a lot of private time from people to post their very detailed explanations of source code... especailly including explanations of WHY...alternatives etc... so it will take time to build it up.
Richard Davey
Retired Moderator
22
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 30th Apr 2003 14:32
blather - which post was "pulled" by us? I can't see anything in this board written by you that's been removed. Nor would I remove this one.

A script archive would indeed be useful, perhaps someone can set one up.

Cheers,

Rich

"Gentlemen, we are about to short-circuit the Universe!"
Tone Eternal
21
Years of Service
User Offline
Joined: 19th Apr 2003
Location: United States
Posted: 30th Apr 2003 15:47
I have only been here for a week or two, and so far I've noticed that people will post code snippets or how to do certain things.. Like I asked how to find an angle, and I got a snippet, and I found a post that showed how to measure distance. Now I have not asked how to find an angle works as I'm very involved in the game making process, but before I learned how to find the angle I did not understand why finding the distance works.. I simply posted, "can anyone break this down and show me how this works?" and I got an answer. I then did the math my self by longhand and was happy by the results!

I think the most important thing to do is ask if you want to know... If you ask for help with something, be greatful that somebody posts a code snippet! And if you want to know how it works, ask away! And be greatful that someone out there helps you!! God knows I am!
Tone Eternal
21
Years of Service
User Offline
Joined: 19th Apr 2003
Location: United States
Posted: 30th Apr 2003 15:49
MY only major suggestion is for a search engine on these forums. A keyword search would help us find answers..
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 30th Apr 2003 17:12 Edited at: 30th Apr 2003 17:13
Good debugging skills will help you understand everything.

Heres my tips...

1. Write a function that sends everything you need to monitor to the screen. Do it in an orderly fashion, putting related information together.

2. Create a variable called iDebug. Set it to 1. When you've finished debugging, set it to 0. Only call the debug printing function when the iDebug flag is on. That way, you never have to delete your debug info from the code.

3. Assign a key that changes the sync rate. When you press it, it will drop the Sync Rate to 5 or so, so you can watch your debug variables on screen as the application progresses. When you press it again, the sync rate goes back to normal.

4. Write a function that stops the action and prints a text string to the screen. For example, I do this to check that new parameters are loading from my parameter file correctly. Once I know they are right, I comment this fact in my code and remove the debug line.

5. Cut problems in half. If you're unsure what is going wrong, and where, put breakpoints before and after specific routines. Then you can cut out sections of code that you know are working from your debug. If you're lucky, you will see that it has gone wrong between these points and be a lot closer to the problem.

Hope this helps. The only other thing that will help is practise...keep debugging until it becomes second nature. Then, and only then, will your programming skills expand exponentially!

All the best!

Thanks in advance.
All the Best,
StevieVee
Nilrem
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: United Kingdom
Posted: 30th Apr 2003 18:51
I agree with everything here especially the last post (good debugging skills really do help you) and a search engine would be top dog here, in fact, I'd say it is pretty much a neccessity? (sp?)

What are the chances of the DB forums getting one.

I hear and I forget. I see and I remember. I do and I understand.
blather
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: United States
Posted: 1st May 2003 10:03 Edited at: 1st May 2003 10:13
[To: Admin
I must appologise about the comment I made that my post had been deleted. Obviously, I need to look at the screen with my eyes open or atlest write down the proper titles for the posts I make.
The previous post I was refering to was "Errors, shaders, textures and tutorials".]

Thanks for all the posts I doo agree that a search option would do wonders. I am VERY greatful to recive any replys AT ALL. Consider the post that I thought was deleted, there is sill nothing there.

StevieVee , thanks for the tips, just one problem. So far I am still working from examples and on my own at that. So just outright slapping code on the screen so far has been a nightmare.

How about a working example.
Now as for the example code, here is a sample. This is taken from the DB game programming guide example pg. 217. It should return all three date formats. But recives a parameter mismatch error on print "short date: "; getdate("short"). BoMK, the example is copied correctly.

"N. foolish talk esp. in great quantity"
Webster's
Nilrem
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: United Kingdom
Posted: 1st May 2003 10:35
Blather I haven't looked over that code properly, because I'm taking your word for it (on copying it correctly) however, sometimes DB differs from DBP so go onto the CD-ROM (750+ page book cd-rom) and go to sources, then dbp then chapter (whatever it is?) then open the .dba file and see if there is any differences between that and the book and if it compiles properly).

I hear and I forget. I see and I remember. I do and I understand.
Rollit
21
Years of Service
User Offline
Joined: 26th Apr 2003
Location:
Posted: 1st May 2003 13:29
Nildrem, where?
750 pages book on CDROM? where is it?
I have DB PRO CDROM... no cd-book on there

DOH?!
Flashing Blade
22
Years of Service
User Offline
Joined: 19th Oct 2002
Location: United Kingdom
Posted: 1st May 2003 16:04
i got db pro.

whats this book? I want one
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 1st May 2003 20:43
Blather - the example is accessing a function called 'getdate', but the function is actually called 'getdate$'.

Rollit - you mis-read. The reply refers to the CDROM that you get with the 'Game Programming with Darkbasic' book - available on Amazon.

Flashingblade - ... erm, it's on amazon
blather
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: United States
Posted: 2nd May 2003 06:11 Edited at: 2nd May 2003 06:14
Well I the "Premier Press" book is , atleast on the cd, into DB & DBP folders. Nilrem, I took your' advice and imported the .dba file and did an ab comparison. In the book example there is no $ after the print "short date: "; getdate("short"). Yet, it does compile. see code part1. Notice also that the dates are returned on differant lines. In part 2 I have cleaned up my code, reck'ed the code and it will not compile[see previous post for error]. The only way it will compile is if the $ is added to the line in question [print "short date: "; getdate$ ("short")]. in this example it will compile but when ran it prints all dates on the same line. WTF?

The book can also be found at many bookstores just ask for(shameless plug) Beginner's guide to Darkbasic game programming by Premier press game development series. Wait a second, it can also be purchased through this web site, see main page.

"N. foolish talk esp. in great quantity"
Webster's

Login to post a reply

Server time is: 2024-11-24 12:48:43
Your offset time is: 2024-11-24 12:48:43