[comp.sys.amiga.programmer] Lemmings - a tutorial, part I

farren@well.sf.ca.us (Mike Farren) (03/24/91)

NOTICE - this entire posting is Copyright (c) 1991 by Michael J. Farren.
The only reproduction rights granted under this copyright are for
electronic transmission between Usenet sites, and other sites connected to
Usenet sites.  Contact farren@well.sf.ca.us for reproduction rights other than
the above.

Let me start off with three or four disclaimers.  First of all, the
copyright message above is there because it is possible that I might be
able to get someone to actually buy this article for publication in some
place or another, and I wouldn't like to put any more barriers in that path
than necessary.  Second, this is long.  I couldn't think of any way to make
it shorter and still cover all the topics I wanted to cover.  Third, it's
posted to two groups - c.s.amiga.games and c.s.a.programmer, because I
think it's of interest to both areas.

Fourth, and most important - I don't want anyone to think that I'm blasting
either Lemmings or the programmers who created it.  This is a _brilliant_
game, one of the best game concepts I've seen in years - no, I take that
back - it's one of the best game concepts I've EVER seen, enough to grab me
by the scruff of the neck and MAKE me play it hours on end.  There aren't
many games this good around, and I applaud those who made it happen.

Given that, however, there still is the matter of how "Amiga-friendly" it
is.  What I intend to show here is, in detail, exactly HOW Lemmings could
have been designed so that it would operate in a multi-tasking environment,
without taking over the machine, and without denying HD users their hard
drives.  The GAME is brilliant, but the implementation of it is damned
irritating.

One presumption: in the games industry, you have to assume that your game
will be run on the lowest level system commonly available.  When I started
doing Amiga work, this was a 256K A1000. (Actually, when I _first_ started,
it was a 128K Amiga Lorraine, but that's a different story!)  Fortunately,
those days are long gone, but you still have a bottom level.  My
presumption is that the game must run on a 512K, one drive A500, with
AmigaDOS 1.3, and an NTSC screen (lower vertical resolution).

With that presumption comes one other: since a bare A500 only has 512K of
memory, it might not be possible to actually _use_ the multitasking
capabilities of the Amiga on such a machine while the game is running.  It
is not a requirement that multitasking always be available, but it should
always be allowed.  (As it happens, it is quite possible to allow
multitasking on a stock A500, albeit with a minimum amount of memory
available to actually _do_ anything.  More on this later.)

What I will do is examine the game from several different perspectives.
First, the memory usage - how can memory be best used?  What are the
requirements for memory use, and how can those be fit into a standard Amiga
while still allowing AmigaDOS to run as usual?

Second is performance.  What are the performance requirements for Lemmings?
Can those be achieved with a fully multitasking system?  Where can
performance be "tweaked", and what are the costs of doing so?

Third is difficult to define, but amounts to "system friendliness".  How
much of the existing Amiga functionality can be used, and which parts will
have to be "recreated" due to performance limitations and the like?  How
many system resources will we have to have exclusive access to, and what
measures can be taken to minimize this usage?  Can we multitask?

Fourth is producibility.  How can we squeeze the game down so that it fits
onto as few floppies as possible?  How can we produce a game which runs on
many different systems without needing separate versions for each of those
systems?  These, and other considerations, have a definite effect on the
game's sales - the cheaper it is to produce, the lower the selling price,
and the more sales there will be.

These will show up as four separate postings over the next day or so.  I
hope that it's useful - even more, I hope that game programmers will take a
hint or two - leave us our Amigas, please!