From: leger_v AT bluewin DOT ch Newsgroups: comp.os.msdos.djgpp Subject: demo.c allegro question Date: Thu, 09 Apr 1998 11:48:16 +0200 Organization: Swisscom AG, the blue window Lines: 15 Message-ID: <352C995F.286B@bluewin.ch> NNTP-Posting-Host: sio22pub78.bluewin.ch Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Hello, I've just looked at the source code of the demo which comes with the allegro game library. I noticed that for the svga modes, we can't use the retrace function. And we use the timer. There is a loop that I don't understand : while(game_time > 0 ) { move_everyone(); game_time--; } draw_screen(); The timer is set with a frequency of 6400/SCREEN_W and of course increment game_time at this rate. I don't understand how this part of the program set the speed of the game. The game_time-- doesn't depend on the speed of the computer ? Please help me. Thanks.