www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/09/21/17:39:57

Date: Sun, 21 Sep 1997 16:38:34 -0500 (CDT)
From: Andrew Deren <aderen AT eecs DOT uic DOT edu>
To: Laine <laine AT iwn DOT fi>
cc: djgpp AT delorie DOT com
Subject: Re: My sprites move too fast
In-Reply-To: <01bcc76c$97466660$473e64c2@default>
Message-ID: <Pine.SUN.3.95.970921163749.12415B-100000@ernie.eecs.uic.edu>
MIME-Version: 1.0

On 21 Sep 1997, Laine wrote:

> Hi!
> 
> I'm doing a game with DJGPP and Allegro and
> I've got problems. Not much anymore, but still
> one. I've got too sprites, one is a falling object
> and the other is a board with wich the player tries
> to catch the object. I've managed to make them move
> at a different speed, but they both go too fast.
> So here's the QUESTION:
>  How can I slow them down. I don't think a for-loop
>  is a good idea, is it? What is a good idea?

The simplest way to do that is to put somewhere in your loop 
rest(some_time_in_miliseconds);

but the better way would be to use a timer.

> 
> PS. was this message too long? Thanks for reading
>       it. (I'm new here and I don't know how I'm
>       supposed to behave here :-)
> 
> Jarkko
> 


                        ,,,
                       (0 0)
   +-------------oOO----(_)-------------------+
   |                Andrew Deren              |  
   |             aderen AT eecs DOT uic DOT edu          |
   | www.eecs.uic.edu/~aderen/ader/main.html  |
   +-------------------------oOO--------------+
                       || ||
                      ooO Ooo
 


- Raw text -


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