Xref: news2.mv.net comp.os.msdos.djgpp:8382
From: Joost Jonker <jjonker AT cibit DOT hvu DOT nl>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Best use of timers.
Date: Fri, 06 Sep 1996 14:16:16 +0200
Organization: Kenniscentrum CIBIT
Lines: 24
Message-ID: <32301610.6679@cibit.hvu.nl>
References: <01bb9b3f$0a4109a0$LocalHost AT apache DOT d51 DOT lilly DOT com>
Reply-To: jjonker AT cibit DOT hvu DOT nl
NNTP-Posting-Host: warande1079.warande.ruu.nl
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
To: Mark Fleig <markfleig AT worldnet DOT att DOT net>
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Mark Fleig wrote:
> 
> Just getting started with DJGPP/Allegro/etcblahblah.  So I know how to
> create timers, and I know how to use them safely... I just don't know what
> to use them for.
> 
> Could someone give me an overview of the best use for timers in a standard
> game program.  I imagine it's used to do all of the hard work and draw the
> buffers, but only blit when the timer hits a particular tick. Am I close.
> 
> thanks,
> -fleig

More uses:

1. For sprite animation (changing the sprite shape at specific times)
2. For doors in Allegro Doom :P -- door shuts after n timer ticks.
3. For demo animation : after n ticks start the plasma; after 2n
   ticks start the scrolly etc.
4. To ensure that simultaeneous animations occur at different
   speeds ie Allegro Imp shoots fireballs twice as fast as the
   Allegro Cacodemons.
5. For shareware nags; if after n ticks the user hasn't filled
   in ORDER.FRM re-format his hard disk.