DOS Games Message Board
DOS Games Discussion
A message board to talk about DOS games, get help, and find old games.
Do NOT post warez or abandonware requests please
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
NEW! DOSGames.com has been massively upgraded to v2.0 with TONS of new features!
Check out the new design and dozens of new features including online play!


So you want to be a programmer, eh?
Goto page 1, 2  Next
 
Post new topic   Reply to topic    DOS Games Discussion Forum Index -> Game Creation
Author Message
Interon
Guest






PostPosted: Sat Feb 28, 2004 10:16 pm     Post subject: So you want to be a programmer, eh? Reply with quote

It can be a tedious, boring job for those new to it. You need lots of patience and persistence if you are ever to do anything useful with it. To make DOS games, try QBasic. It is easier than C++ and Assembler and is a great way to get started.

Here, take some code from me to get you started. This is a simple trivia game. Replace the questions and answers with what you want to use.

This code might help you learn QBasic.

Code:

1 CLS
CLEAR
GOSUB QUESTION1
GOSUB QUESTION2

QUESTION1:
LOCATE 1, 1:INPUT "What is the capital of Canada?", Q$
IF UCASE$(Q$) = "OTTAWA" THEN CLS
IF UCASE$(Q$) = "OTTAWA" THEN LOCATE 1, 1: PRINT "Correct!"
IF UCASE$(Q$) = "OTTAWA" THEN LOCATE 2, 1: PRINT "Press any key to continue . . ."
IF UCASE$(Q$) = "OTTAWA" THEN DO: LOOP WHILE INKEY$ = ""
IF UCASE$(Q$) = "OTTAWA" THEN RETURN
LOCATE 1, 1: PRINT "WRONG!"
LOCATE 2, 1: PRINT "Press any key to continue . . ."
DO: LOOP WHILE INKEY$ = ""
RETURN

QUESTION2:
LOCATE 1, 1:INPUT "What color is coal?", Q$
IF UCASE$(Q$) = "BLACK" THEN CLS
IF UCASE$(Q$) = "BLACK" THEN LOCATE 1, 1: PRINT "Correct!"
IF UCASE$(Q$) = "BLACK" THEN LOCATE 2, 1: PRINT "Press any key to continue . . ."
IF UCASE$(Q$) = "BLACK" THEN DO: LOOP WHILE INKEY$ = ""
IF UCASE$(Q$) = "BLACK" THEN RETURN
LOCATE 1, 1: PRINT "WRONG!"
LOCATE 2, 1: PRINT "Press any key to continue . . ."
DO: LOOP WHILE INKEY$ = ""
RETURN
Back to top
donkeydude
Member
Member


Offline
Joined: 26 Feb 2004
Posts: 21

PostPosted: Mon Mar 01, 2004 12:54 pm     Post subject: Reply with quote

yeah, got qbasic. Shit-Eating Grin
Is it just regular BASIC, or is it different?
Back to top
Interon
Guest






PostPosted: Mon Mar 01, 2004 8:40 pm     Post subject: Reply with quote

It is a more complicated version of BASIC. It uses most of the old BASIC commands so that you could open a BASIC file in QBasic and about 99% of the time it should run. However, QBasic has lots of extra stuff that BASIC doesn't. It's like comparing Windows 3.1 to Windows 95.
Back to top
donkeydude
Member
Member


Offline
Joined: 26 Feb 2004
Posts: 21

PostPosted: Tue Mar 02, 2004 2:52 pm     Post subject: Reply with quote

what, like more commands? sounds good...
Malevolent
Back to top
Interon
Guest






PostPosted: Tue Mar 02, 2004 3:09 pm     Post subject: Reply with quote

Yeah, that, and separate subroutines, and higher limits. It is a relatively new Basic, by Microsoft, a major player in the Basic programming language versions.
Back to top
Icedragon
Lord of Gaming
Lord of Gaming


Offline
Joined: 21 Mar 2004
Posts: 232

PostPosted: Thu Apr 22, 2004 7:13 pm     Post subject: Reply with quote

QBasic is cool. I like downloading the games like nibbles and gorrila, and screwing with the colours.
Back to top
laogaming
Guest






PostPosted: Thu Apr 22, 2004 7:49 pm     Post subject: Reply with quote

AHHHHH!!! QBASIC AHHHHH!!!!!!! man i hated basic when i started it, i love c
Back to top
ripster88
Member
Member


Offline
Joined: 06 Jul 2004
Posts: 26

PostPosted: Tue Jul 06, 2004 12:56 am     Post subject: Reply with quote

Where do you get Qbasic????
Back to top
emmzee
Site Admin
Site Admin


Offline
Joined: 14 Sep 2002
Posts: 2406
Location: Ontario, Canada

PostPosted: Tue Jul 06, 2004 2:03 am     Post subject: Reply with quote

You can download QBasic as part of the "old DOS" package, right from Microsoft's FTP site:

ftp://ftp.microsoft.com/softlib/mslfiles/olddos.exe
Back to top
Nixon
Guest






PostPosted: Tue Jul 06, 2004 4:52 am     Post subject: Reply with quote

Ya should get Qb 4.5 or higher cause you can make .exe with it.

try searching in google cuase I'm to lazy to find a link.

I been programmingin Qb for a few years, but firsat I started In zzt.
Back to top
ripster88
Member
Member


Offline
Joined: 06 Jul 2004
Posts: 26

PostPosted: Wed Jul 07, 2004 1:33 am     Post subject: Reply with quote

I managed to find Qb 4.5. Thanks guys, I'm gonna try it out now.

Say, does any of you know where I could get some games so I can play around with them??? (I've already got the one above)
Back to top
Interon
Guest






PostPosted: Wed Jul 07, 2004 3:42 pm     Post subject: Reply with quote

Invaders 1978 contains the source code
Back to top
Game master pro
Guest






PostPosted: Thu Jul 22, 2004 3:41 am     Post subject: Reply with quote

Quote:

You can download QBasic as part of the "old DOS" package, right from Microsoft's FTP site:

ftp://ftp.microsoft.com/softlib/mslfiles/olddos.exe


I cant download it, it says "the page cannot be displayed thing" are you sure you got it right
Back to top
barok
Member
Member


Offline
Joined: 15 May 2004
Posts: 30
Location: bushlands of saskatchewan

PostPosted: Sat Jul 24, 2004 11:12 pm     Post subject: Reply with quote

This site offers all versions of qb, including some vb downloads.

http://www.download-qb.tk/

if you wish to start qb, the site i recommend is this:

www.qbasic.com

a good site to show you what can be made in qb:

www.vplanet.cjb.net


btw interon, your program is horribly inefficient. you do way too many of the same checks over and over.

1 CLS
CLEAR
GOSUB QUESTION1
GOSUB QUESTION2

QUESTION1:
LOCATE 1, 1:INPUT "What is the capital of Canada?", Q$
answer$ = ucase$(Q$)
IF answer$ "OTTAWA" THEN CLS
LOCATE 1, 1: PRINT "Correct!"
LOCATE 2, 1: PRINT "Press any key to continue . . ."
DO: LOOP WHILE INKEY$ = ""
RETURN
endif
LOCATE 1, 1: PRINT "WRONG!"
LOCATE 2, 1: PRINT "Press any key to continue . . ."
DO: LOOP WHILE INKEY$ = ""
RETURN

QUESTION2:
LOCATE 1, 1:INPUT "What color is coal?", Q$
answer$ = ucase$(Q$)
IF answer$ = "BLACK" THEN CLS
LOCATE 1, 1: PRINT "Correct!"
LOCATE 2, 1: PRINT "Press any key to continue . . ."
DO: LOOP WHILE INKEY$ = ""
RETURN
endif
LOCATE 1, 1: PRINT "WRONG!"
LOCATE 2, 1: PRINT "Press any key to continue . . ."
DO: LOOP WHILE INKEY$ = ""
RETURN

furthermore you continually use do: loop while inkey$ = "". to make the code easier to read, easier on the fingers and to minimize syntax errors, you should create a waitkey subroutine that waits until a keypress.
Back to top
Interon
Guest






PostPosted: Sun Jul 25, 2004 1:45 pm     Post subject: Reply with quote

Yeah, despite making 4 games, I'm still kind of an amateur.
Back to top
barok
Member
Member


Offline
Joined: 15 May 2004
Posts: 30
Location: bushlands of saskatchewan

PostPosted: Sun Jul 25, 2004 2:24 pm     Post subject: Reply with quote

4 games isn't very many. Darkdread has over a dozen under his belt. Pity he's lost his interest in programming (again). He's starting to sound like micheal jordan. retires, comes back. retires again, comes back, etc. etc.

Being a good enough programmer to make a zelda quality game isn't easy either. I've been working on my game for what, two months? And it's still only a walkaround engine with scripted npc's. Currently i'm stuck with the bounding boxes for npc to npc collisions. It's very confusing. Shifty

Btw, i'd like to take a look at your games. Laughing
Back to top
Dogbreath
Admin
Admin


Offline
Joined: 14 Sep 2002
Posts: 4627
Location: In the back of a jacked-up Ford.

PostPosted: Sun Jul 25, 2004 3:00 pm     Post subject: Reply with quote

Speaking of Darkdread, did he ever finish Curby/Curty/Curly/whatever the hell it was/ 3 and Mysterious Song 2? I remember playing the demo and being rather impressed, but his site went down shortly after that.
Back to top
Interon
Guest






PostPosted: Sun Jul 25, 2004 3:25 pm     Post subject: Reply with quote

All 4 of them can be found on http://www.dosgamesonline.com

They are called Diamond Grabber 1, Diamond Grabber 2, Cribbage Solitaire, and Letter Targets. Source code is included in all 4 of them (released under the GNU GPL version 2).

Lots of spaghetti code with little or no comments. Also, I did not use the SUBs because I was in no mood to learn them.

However, the games work as I planned them (except for a tiny mathematical bug in Cribbage Solitaire that I could never fix, but I tried very hard).
Back to top
barok_lazee
Guest






PostPosted: Mon Jul 26, 2004 9:04 am     Post subject: Reply with quote

you're talking about secret of cooey 3, right?

Do you have the mysterious song 2 demo? Think you could upload it somewhere or email it to me? I can't find it.

if you can, here's my email address. marshall_7ca@yahoo.ca

Darkdread's games

legend of lith
legend of lith 2
secret of cooey
secret of cooey 2
secret of cooey 3 (unfinished)
mattress warrior (not what you think!)
lianne in: the dark crown
black rhino
mysterious song
mysterious song 2 (unfinished)
distant promises (demo)
in the nocturne
legend of grimtold (unfinished)

there's probably more that i'm missing...
Back to top
Wally
King of the Carrot Flowers


Offline
Joined: 01 May 2003
Posts: 4635

PostPosted: Tue Jul 27, 2004 7:04 pm     Post subject: Reply with quote

if they were more detailed like commander keen they would be awesome Happy

seeing a ^ run everywhere in diamond grabber isnt that exciting
Back to top
Display posts from previous:   
Post new topic   Reply to topic    DOS Games Discussion Forum Index -> Game Creation All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2

 


Powered by phpBB © 2001, 2005 phpBB Group and Ask an Expert
Also powered by Darren and the other admin and mods' hard work! ;)