delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/10/29/04:32:29

From: malcolm AT manawatu DOT gen DOT nz (Malcolm Taylor)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: NEEDED: Advice on tools for games programming
Date: Tue, 29 Oct 1996 07:12:06 GMT
Organization: PlaNet (NZ) Manawatu, +64 6 357-9245, +64 6 367-9944
Lines: 62
Message-ID: <554790$bk6@news.manawatu.gen.nz>
References: <54mc7t$22o AT News DOT Dal DOT Ca>
NNTP-Posting-Host: ppp64-139.manawatu.gen.nz
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

an118 AT chebucto DOT ns DOT ca (Graham Howard Wile) wrote:
>       Hi there. I have recently bought books on programming games in
>C++ with a little bit of inline assembly mixed in.
> 
>        I am an experienced high-level programmer (ie: databases), but
>I know hardly anything about low-level programming required for games
>development.
> 
>        I have the DJGPP C++ compiler whose documentation is cryptic at 
>best, and it uses AT&T assembly for syntax, and all I can find for books on
>assembly are for the Intel style syntax.

First things first. Get hold of the faq. This can be found the same
place you got djgpp v2 as v2faq/faq202b.zip. This has an amazing
amount of information that will help any beginner to familiarise
themselves with djgpp. It has sections on the asm style etc.

Having said this, the AT&T asm style isn't too hard to get used to,
and djgpp's inline syntax allows for far greater control over
registers than any other compiler I know (incl Watcom). This is
important for fast code.
 
>        QUESTIONS:      
>	Since I am just introducing myself to low-level programming, (I 
>even have yet to learn C++ and Assembly), would it be wise to invest my 
>$$ in a commercial, well documented compiler like Turbo C++, Watcom, or 
>MS Visual C++ ?

I learnt C/C++ before I found djgpp, but have heard many people say
that it is great for learning the language. Also you can't go past
this newsgroup (mail-list) as a source of info and help.
 
>        Do these commercial versions come with good books, including how to
>implement inline assembly?

No. I think you'll find almost more information about djgpp around,
and it's free! I have Watcom C/C++ 10.5, and Borland C/C++ 4.0 and can
say categorically that their documentation and helpfiles are not
sufficient. One advantage of DJGPP is that when encountering a problem
and getting stuck you can ask other people about it, and often someone
else will have had a similar problem.
 
>        Should I buy their assembler along with the C++ compiler ?
>        Is C++ with inline assembly even the way to go nowadays for games
>development, or is this fundamental method on its way out, about to be
>replaced by something better ? Because I don't want to spend my
>hard-earned $$ on this stuff if it will soon be obselete.

Many, many people put down C++ saying it leads to bloated executables
and slow code. However this is completely wrong! I use C++ almost all
the time and have no problem creating fast code, my only rule of thumb
is to avoid the standard C++ library. This is where the code bloat
originates, and the functionality it gives has too many strings
attatched (ie. extra code that is not needed for your particular
usage, and undefined speeds).
To anyone who doesn't believe just take a look at my archiver - RKIVE.
This can be found on simtel.net as msdos/arcers/rkive13.zip and is
only 50K long. It is written entirely in C++.

Hope this helps,
Malcolm

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019