|
| 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
|
|
|
| Author |
Message |
redshock Newbie

 Joined: 22 Aug 2007 Posts: 5
|
Posted: Wed Aug 22, 2007 8:31 pm
Post subject: So you want to program DOS games? Steps inside... |
|
|
I read several threads here and usually there's good advice but there's no step by step process for a complete beginner. For some background, I do lot of Windows game development and am going after a computer science degree. I started missing the old DOS games and I figured I want to try out DOS programming once and for all. It kills a quick career in game programming, but I find DOS more enjoyable to program in. Besides, DOS needs more new games These are the steps to get you into programming your own DOS games.
0) Downloads: Assuming you have XP or beyond, you need DosBox 0.71+ (http://dosbox.sourceforge.net/news.php?show_news=1). Also, you need Turbo C (http://dn.codegear.com/article/20841). You will be writing your code within Turbo C, which is running inside of DosBox. If you installed Turbo C to the C: drive, in DosBox, type "mount c c:\turboc\disk1", hit enter, then "tc.exe". Of course, there's nothing like a real DOS machine to program with Usually you can get a value machine with VGA support for around $20-$50 depending where you go.
1) Study the Standard C programming language while using Turbo C. A good book would be C: The Complete Reference by Herb Schildt. If money is an issue there are several websites available that give tutorials. Stay away from C++ since it's a lot of overhead in DOS. If you're using a DOS emulator, you might get by with it.
2) Learn a bit on data structures. I know, it's an unfun topic but it will help in the long run. Most importantly, look into stacks, queues and linked lists.
This will better help you program with efficiency and apply better performance. Liberally speaking, you can ignore this step but I recommend it. (Update) I forgot, the book above teaches exactly this in the second half.
3) Buy the book Tricks of the Game Programming Gurus by Andre' LaMothe. Link: http://www.amazon.com/Tricks-Game-Programming-Gurus-Andre-Lamothe/dp/0672305070 This is the book that set the standard for DOS game programming, so you can't go wrong with it. I just bought it for $12, so it's affordable to those inspired to make DOS games. It mostly goes over 2D and also walks you through your own raycasting(wolf3d)-type game along with networking, input, and sound. (Update) Be sure to check if the CD is included with your purchase!
And you are off to making your own DOS games.
Further thoughts:
Distributing your games:
1) You can have games from DOS and Windows to play your game. XP and below can run them without DosBox, but there's always something that might not work right without DosBox. If you tested each system and found a problem, you can tell your gamers to use DosBox. Vista removed the 16-bit subsystem that XP had, so you can no longer run native DOS games under Vista alone. However, DosBox works fine since it's a 32-bit application.
Exploring Windows:
If you feel like taking the next step and make your games Windows applications (32-bit), you can get Andre' Lamothe's other book titles known as Tricks of the Windows Game Programming Gurus (and) Tricks of the 3D Game Programming Gurus. Microsoft has a free Express edition of Visual C++ 2005/2008 that can be downloaded from their site. He really tries to keep the feel like DOS and keeps it all linear-memory for 2D/3D, which is what you were use to with the first book. It goes over various APIs plus game topics including Win32 API, COM, and DirectX.
If I think of any extra tidbits I'll include them with an update mark.
Good luck!
redshock |
|
| Back to top |
|
 |
dosraider Moderator

 Joined: 15 Mar 2005 Posts: 4930 Location: ROTFLMAO in Belgium.
|
Posted: Thu Aug 23, 2007 5:20 am
Post subject: Re: So you want to program DOS games? Steps inside... |
|
|
| redshock wrote: | | ..... If you installed Turbo C to the C: drive, in DosBox, type "mount c c:\turboc\disk1", hit enter, then "tc.exe". ... |
"mount c c:\turboc\disk1", hit enter, then "tc.exe".
Nope.
You need to install TC first and you need the files that are on the 3 disks.
Mounting your way gets the install to stuck completely.
And use dosbox to install TC, you don't need to write floppies that way.
More: many modern PCs don't have a flopdrive (yay for modern times :/ ) and the install only works from the A: , so dosbox is really the best option.
This is a better way to do things to install TC:
In windows first:
Create a c:\games\temp folder
Down the file , extract all files/subs from all the disks (3 of them) to c:\games\temp\
Run dosbox, input:
mount c c\games
mount a c:\games\temp
a:
install
Accept all, TC will be installed in c:\games\TC\ , (That's C:\TC\ in dosbox ! )
The install will find all the needed files/subs, no problems. And as you run the install from HardDisk it's fast.
You're still in dosbox here, prompt a:
To run TC:
c:
cd TC
TC
Next time you wanna run TC:
mount c c:\games
c:
cd tc
tc
Advantage is that you can store your games on your virtual dosbox C:\ (C:\games\ in windows).
You also can use the same one for your other games.
And you have the C:\games\ mounted as C, so you don't need to completely clutter up the TC folder to store your writings/testings/whatevers.
That C:\games\ is an example, can be a D:\games or other if you have more partitions.
But use a subfolder. Much better.
BTW: nice post you wrote.
And welcome to dosgames board. |
|
| Back to top |
|
 |
redshock Newbie

 Joined: 22 Aug 2007 Posts: 5
|
Posted: Thu Aug 23, 2007 6:24 am
Post subject: |
|
|
| Thanks for clearing that up! glad to be aboard... |
|
| Back to top |
|
 |
Dogbreath Admin

 Joined: 14 Sep 2002 Posts: 3888 Location: In the back of a jacked-up Ford.
|
Posted: Thu Aug 23, 2007 9:50 am
Post subject: |
|
|
Nice post.
And congrats on being the 2000th member! |
|
| Back to top |
|
 |
The_Sinister_Mastermind Overlord
 Joined: 26 Oct 2005 Posts: 2757 Location: NSW, Australia, Down Under Verse
|
Posted: Thu Aug 23, 2007 11:50 am
Post subject: |
|
|
| Indeed a nice post there redshock and it was nice chatting to you in the IRC channel earlier yesterday. I’m curious to see some of your own work, from our conversation I gathered you have aspirations of making some games yourself, be sure to keep us posted if you get anywhere, or indeed if you need some help/advice/etc from our members. |
|
| Back to top |
|
 |
|
Powered by phpBB © 2001, 2005 phpBB Group and Ask an Expert
Also powered by Darren and the other admin and mods' hard work! ;)
|
|