Mail Archives: djgpp/1998/02/09/02:00:43
From: | s yoshida <syoshida AT bigfoot DOT com>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Page flipping/double buffering using Allegro...
|
Date: | Mon, 09 Feb 1998 01:08:31 -0500
|
Organization: | NETCOM Canada
|
Lines: | 33
|
Message-ID: | <34DE9D5E.6D9716C1@bigfoot.com>
|
NNTP-Posting-Host: | trt-on2-18.netcom.ca
|
Mime-Version: | 1.0
|
NNTP-Posting-Date: | 09 Feb 1998 01:08:52 EST
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
hi..
I'm currently werking on a little simple2d scrolling shooter...
I want to do this in SVGA mode like 640-480, but, using double buffering
is a little slow unless playing on p200(or better)... and i tried it to
draw using page flipping... now it's even slower, much slower(and some
wierd delay every 2sec or so, which wasnt there on double buffering
mode)....
maybe it's because my background_scrolling code sucks..
but is page flipping supporsed to be faster than double buffering? or is
it only good in modex...?
also, if any1 know a really good/easy background scrolling function,
please tell me....
my code is like...(as follows, using double buffer)im not using any
hardware scroll..
======================
while(!(key[KEY_ESC]}{
clear(buffer);
draw_BG_on_buffer (x, y); //draws a 640x480
image using draw_sprite
//on
to a bmp
draw_BG_on_buffer (screen_w + x, y); //draws the same image on to
x--; //the
same bmp cuz the other1's moving
if (abs(x)>SCREEN_W) x=0; //off the screen.... =(
blit(buffer onto screen);
}
thanks
any help/suggestions a re appreciated
- Raw text -