delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/12/31/09:10:00

Message-Id: <199812311409.OAA03783@remus.clara.net>
From: "Arthur" <arfa AT clara DOT net>
To: <djgpp AT delorie DOT com>
Subject: RE: Speed problem
Date: Thu, 31 Dec 1998 14:08:21 -0000
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0
Importance: Normal
In-Reply-To: <368A8666.F52A1549@net4you.co.at>
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Reply-To: djgpp AT delorie DOT com

> > > Redrawing the whole screen in a 640x480x256 graphics mode is too
> slow on
> > > many
> > > machines. Is there a faster way? It consists of a 3 layers:
> background,
> > > car-layer and
> > > animation layer (like Bapple2). Dirty-rectangles doesn't work
> because
> > > the background
> > > always changes. Please help!
> >
> > What do you mean by "many machines"? Are you using VESA, FreeBE/AF, or
>
> > Mode-X screen modes?
>
> "many machines"=many computers
> I'm using the VESA mode 640x480 with a color depth of 8 bits.
>
> > Also make sure that you're not clearing the screen, since you don't
> need to.
> > This takes a lot of processor time and isn't usually needed. Try a
> different
> > method of drawing the screen. Instead of double buffering, try page
> flipping
> > or triple buffering.
>
> I simply redraw the background instead of clearing.
> Page flipping flickers in my 640x480x8 VESA mode.
> How does triple buffering work? (sorry about this dumb question ;)
> Allegro comes with a triple buffering example but could you maybe
> explain it to me please?

You have to have an alternative to it because only VESA3 supports it
(although some FreeBE/AF drivers do, and so does ModeX sometime). It's a bit
tricky to set up, but is really, really smooth and fast. Having said that,
I've never used the technique with Allegro. Check out the Demo game to see
how it applies to a real game.

James Arthur - jaa AT arfa DOT clara DOT net
http://www.jado.org/users/arfa/
ICQ#15054819


- Raw text -


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