Mail Archives: djgpp/1997/12/24/21:03:16
Donald Cathcart wrote:
>
> Hi all, I am new to game programming, at least for the pc I am.
> I was wondering which language would be best to program with, DJGPP or
> Borland's C++ 5.0?
>
> I have Borland's Turbo C++ 3.0, so I am sort of leaning towards that
> language. The pros and cons of each would be great.
There are many opinions out there, but asking on the DJGPP newsgroup
alone is a bad idea because most of us (naturally) support DJGPP. :-)
Cross-posting to at least comp.lang.c or comp.lang.c++ might be a better
strategy. That said, I'll give you my (admittedly biased) pro and con
summary.
DJGPP creates 32-bit protected mode code that runs under MS-DOS on 80386
or better machines. Borland creates 16-bit real mode DOS code, or
32-bit Windows-native code. It can create 32-bit DOS code, but only
with an expensive addon package, the details of which I am unfamiliar
with.
DJGPP is a native 32-bit compiler. It allows unhindered access to all
available physical and virtual memory on your computer, subject only to
the limitations of your DPMI host. Borland makes you suffer through
segment limitations and the dreaded 640K barrier if you use it to build
DOS programs.
DJGPP (or rather, the gcc compiler that is the core of DJGPP) produces
faster, better-optimized 32-bit code than Borland.
DJGPP comes with a wide range of tools and utilities for all kinds of
users; from a Borland-style IDE that will be comfortable to Turbo C
users, to the wonderfully complex GNU Emacs IDE that is a mainstay on
Unix boxes. It also has many tools for building via the DOS command
line. Borland has just the one IDE.
DJGPP is GNU-based, which makes it easy to port code designed for Unix
systems to DOS. It also has available tools and packages that allow
semi-easy porting of Borland code, particularly graphics code. Borland
has no such compatibility options.
DJGPP has many options for graphics and game programming. It has
multiple user-designed libraries, including the powerful and
ever-growing Allegro game/graphics/sound library to the GRX library
which will be familiar to Borland users used to BGI.
DJGPP's user support is legendary. You have the entire DJGPP user base
available 24 hours a day to answer your questions. If you post a
question on the newsgroup or mailing list, you should get a substantive
response within a day, sometimes within hours if a person who can help
you is online at the time. Borland has the standard telephone customer
support, which I have not used and do not intend to use. There are,
however, a lot of programming books available that use Borland as their
model.
DJGPP is supported by its users and developers. If you find problems
with a program, you can have fixes available in only a few days. Or,
you can make changes yourself and submit them; if they are deemed
worthy, they may be included in later versions of the programs. You can
even write and submit your own complete code modules, and they will
become part of the DJGPP distribution. For examples of this, look no
farther than RHIDE and Allegro.
DJGPP requires substantially less disk space than a similarly featured
Windows-based compiler.
DJGPP is free. Borland costs $150 plus.
The cons:
DJGPP cannot produce Windows-native code without additional tools. It
cannot interface with DLL's, or call GDI routines, and it is NOT
compatible with .obj and .lib code produced by Borland, Watcom, etc.
However, there is a toolkit available called RSXNTDJ that can help you
solve many of these problems.
Many of the technical and tutorial programming books currently on the
market use specific references to Borland/Turbo/Watcom/MSVC in their
examples, and most of these don't work with DJGPP. Finding a reference
book that teaches strict ANSI C may be difficult. It's not impossible,
though; search the mailing list archives for previous posts on the
topic.
In fact, quite a bit of code out there is based on the Borland model,
because it is a popular commercial compiler. If you use a lot of code
written by third parties, you may find yourself spending a great deal of
time porting it to DJGPP. A particular example of this is assembly
language. DJGPP uses a different internal assembly language format than
Borland, et. al. It's not hard to learn, but it represents another step
you have to take. There are tutorials available, and tools like NASM
that can compile Intel-style assembly code, so you aren't completely
stuck.
DJGPP requires knowledge of MS-DOS and the DOS environment in order to
be installed and used properly. If you don't feel comfortable with DOS,
you may experience difficulties in getting it set up.
DJGPP does not hold your hand throughout the code-production process.
You need to be able to search for and utilize topics in the provided
documentation in order to use DJGPP efficiently. If you are used to
being pampered, you'll see quite a few cries of "RTFM" on this mailing
list. :-)
I'm sure others will wish to add to my list; I'm quite sure I've
forgotten things myself. But I hope I've covered the basics.
hth
--
---------------------------------------------------------------------
| John M. Aldrich | "To be 'matter of fact' about the |
| aka Fighteer I | world is to blunder into fantasy-- |
| mailto:fighteer AT cs DOT com | and dull fantasy at that, as the real|
| http://www.cs.com/fighteer | world is strange and wonderful." -LL |
---------------------------------------------------------------------
- Raw text -