www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/17/02:54:27

From: Terence Ramos <de-bug AT ix DOT netcom DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: different speed animations problem!!!
Date: Sun, 16 Feb 1997 22:47:24 -0800
Organization: Netcom
Lines: 16
Message-ID: <3307FEFC.7F18@ix.netcom.com>
NNTP-Posting-Host: sjx-ca21-23.ix.netcom.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Hello, 

I am making a game with Allegro and I am encountering a problem where
the Sprite animates in different speeds.  Heres my situation.  First I
have this sprite.  Lets make it 40x40.  Now i use the key[KEY_???] thing
in a do loop to make the sprite move.  What happens is that when you
push down, for example, it moves at a certain speed.  Lets say it takes
it 30 seconds to go across the screen.  The next time i press another
key, it now only takes 12 seconds.  Then another time it takes 1 minute.
Well, you get the idea.  Now i have a rest() function in the do loop
between each time the sprite is blitted.  I thought this would make it
at least pretty uniform in the timing.  What could be my problem?  Is
there a way to make sure it always move at a certain rate?

[Terence Ramos
[de-bug AT ix DOT netcom DOT com

- Raw text -


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