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 / My first finished program.

Author
Message
Okashira
18
Years of Service
User Offline
Joined: 8th Feb 2006
Location: Right here.
Posted: 9th Mar 2006 00:39
I admit, this is kind of stupid, and I am able to do more complicated stuff then this(no really, I am), but this is the first thing I actually finished. So here is the code, just copy it into DarkBasic.



It is kind of funny, though pointless. Enjoy, and please tell me how stupid it is, er...how you like it.

-Okashira

PS: I did not post it in the Showcase, since it is so simple.

Let the games begin!
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 9th Mar 2006 02:10 Edited at: 9th Mar 2006 02:12
here's a lab if you want to try it:

store your questions, answers, correct answers in a file, or for now hard code them into an array or a data statement. Make 1 and only 1 reusable function/sub that displays the question and takes the users input, and 1 function that checks the answer and updates a score. You should have 50 to 75% less code than you do know, and the app will be open ended, meaning you could load it with 1000's of questions if you like (using files or even a database).

Also, its good youre using gosub instead of goto, too bad youre using it like a goto. Gosub is used in conjunction with RETURN, look it up in the help files.

You have been given your challenge... now go.


FREE Automatic file updates for your distributed Games and Apps - see Program Announcements Forum - DBP Demo
Okashira
18
Years of Service
User Offline
Joined: 8th Feb 2006
Location: Right here.
Posted: 10th Mar 2006 02:05
Thanks, I will try that, hopefully tommorow. And I did think I really needed to use return, though I know how to use it. I have been practicing on basic 2D game stuff and am gonna try something like space invaders soon.

-Okashira

Let the games begin!

Login to post a reply

Server time is: 2024-09-24 17:38:20
Your offset time is: 2024-09-24 17:38:20