VOGONS


First post, by shadowzero26

User metadata
Rank Newbie
Rank
Newbie

I make batch file games but I want to make dosbox games that will work on multiple platforms. Is there a guide or starting point that can help me accomplish this goal?

Important questions are:

What is the desired language to program for dosbox

What are the differences in language for dosbox vs other forms of DOS (I know there are many DOS, like thousands)

I want to use dosbox because it is stable on many os. Is there another choice?

Thank you very much.

Reply 1 of 7, by ripa

User metadata
Rank Oldbie
Rank
Oldbie

Write the game as you would write it for MS-DOS. You'll find countless tutorials about game/software development for DOS on the Internet. Especially if you use Pascal, C, C++, Basic, or assembly with the good old tools by Watcom, Borland or Microsoft.

Reply 2 of 7, by Azarien

User metadata
Rank Oldbie
Rank
Oldbie

Many DOS games were written in C or C++ using Watcom C++ compiler. Those typically display "DOS/4GW Protected Mode Run-time" on startup.

There's Open Watcom project at http://openwatcom.org (latest release from 2010) and a "V2" fork at https://sourceforge.net/projects/openwatcom/f … /current-build/ (2015, new features but rather beta quality)

There's also DJGPP http://delorie.com/djgpp which is a DOS port of well-known GCC compiler. It's quite current (GCC 5.3.0) supports modern standards (C++11, C++14) and is actively maintained.
An old version of DJGPP was used in Quake. I successfully compiled Quake from source (after minor fixes) using the newest version.

You can also write in Free Pascal http://freepascal.org whose DOS version is DJGPP-compatible (it's possible to mix C and Pascal code in one EXE).

Those are all 32-bit compilers that generate executables which should run in DOSBox and on real DOS machines.
I wouldn't really recommend using old, old 16-bit compilers like Turbo C++ or Turbo Pascal, unless you are curious how coding looked like in 1992 😀

Obviously you'll need some libraries, especially for sound and graphics. Google for it, I can't help you much. Or find the specs and write your own routines..
One library I can give you a link to is Allegro http://liballeg.org They dropped DOS support years ago, but you can still find old versions on their site.
I remember that it worked both in Watcom and DJGPP.

I recommend 32-bit version of Windows for this task (even Windows 10 is OK, but 32-bit) so you can actually run DOS tools natively (the compilers, not necessarily the game itself). Otherwise on a 64-bit system you'd need to use a cross-compiler that runs on Windows but generates DOS executables, which can give you headaches.
Forget about running the compiler inside DOSBox. It's painfully slow and may not work.

Reply 3 of 7, by shadowzero26

User metadata
Rank Newbie
Rank
Newbie

Hey, thanks a lot. I appreciate the help. One more question since you guys seem to be in the know. Is there a compiler that uses python to DOS? (To me, this sounds like a dumb question, but I've seen some weird stuff)

Reply 7 of 7, by shadowzero26

User metadata
Rank Newbie
Rank
Newbie

Thanks a lot. The info here is really helpful. I am probably going to look into C, Python, and I'm definitely going to goof around with DJGPP. I might also get that book since it's 5 bucks.

Thanks again. You guys are super helpful!