From: Jared Stevens Organization: Lineo To: djgpp AT delorie DOT com Subject: Re: Game Speed Date: Mon, 18 Oct 1999 15:30:57 -0600 X-Mailer: KMail [version 1.0.21] Content-Type: text/plain References: MIME-Version: 1.0 Message-Id: <99101815345000.05137@sparky.lineo.com> Content-Transfer-Encoding: 8bit Reply-To: djgpp AT delorie DOT com On Sun, 17 Oct 1999, you wrote: > Hello everybody > > I programmed a simple game in C. > (I used DJGPP and ALLEGRO) > But the game runs on different Computers with > a different speed. > Is it possible, that the game runs on all > Computers with a similar speed ? > Please Help me immidiately . In Allegro you can use a timer routine... what that is, is a function that is called every, say 30 ms, (you can specify the rate). That function increments a global variable every time it is called. In your program, all you have to do is check that variable and see if it is '1' yet. If it is still '0', then loop until it is '1'. When it equals or is above '1', run a loop of your game, and set the variable back to 0. There is an example of this in some of the examples that came with allegro, I can't remember which one, but it is in there. -- Jared Stevens