Message-ID: <000f01bdb25d$c4e9c800$0a4e08c3@arthur> Reply-To: "Arthur" From: "Arthur" To: "DJGPP Mailing List" Subject: Re: Allegro and blitting to screen Date: Sat, 18 Jul 1998 16:05:51 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Precedence: bulk >HELP !!?? >I'm programming a very nice game with DJGPP and allegro. I use SVGA >640*480*256 colors, so graphic looks good. But the problem is the >double buffering. It's just too slow. Example : > > BITMAP *buffer = create_bitmap(640, 480); > > clear(buffer); > while( game_continues) { > // some drawwing on the buffer > blit(buffer, screen, 0, 0, 0, 0, 640, 480); > } > >That is a the only way I can think of, but itsn't fast enough. >So is there any faster way to do that 'blit(buffer, screen, ...)' ??? Double buffering appears to be a problem in Allegro. Even the Allegro demo game doesn't go faster than 35fps on my P200MMX. But double buffering is an inefficient method anyway. Page flipping is better, and I imagine it is fairly easy to adapt your program to do this, but you need enough video RAM to do it and for some games the "(dirty) rectangle" method is faster. I suggest you try both of these methods instead of double buffering. In comparison: at 1024x768, the dirty rectangle method hit 434 fps on my machine, and never went below 350fps (and I'm pretty good at that game). James Arthur jaa AT arfa DOT clara DOT net