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 


So you want to be a programmer, eh?
Goto page 1, 2, 3  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: 229

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: 2149
Location: Mississauga, 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
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, 3  Next
Page 1 of 3

 
Free Windows games


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