🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: rec.games.programmer
Article #554

Re: 320x400 question

#554
From: Khan
Date: Mon, 10 Aug 1992 17:39
30 lines
1846 bytes
In article <62430013@acf3.NYU.EDU> reznick@acf3.NYU.EDU (Daniel Reznick) writes:
>I don't understand the object of splitting the screen and then flipping
>only part of it.  From my understanding page flipping is almost
>instantaneous, and splitting the screen in half doesn't sound like it
>would make anything happen faster.  Will someone please explain the gain
>to be had from using a split screen for animation?

Picture Wolf-3D in your mind. At the top of the screen is the animation;
at the bottom is a status area. Now the standard animation cycle is

do {
    draw_a_frame();
    swapbuffers();
    }
while (game_not_done);

With a full screen, you have to draw the animation portion of the screen
AND the status information. This takes time, and since the status info
changes at a much slower rate than the animation, you're doing a lot of
drawing which is unnecessary since you're simply redrawing the exact
same picture over and over again.

Now suppose you split the screen, so that there are two smaller pages
and one static portion which is never flipped. You can write your status
info to the static portion, and change that only when you need to.
Meanwhile the animation continues using the smaller pages, and does so
at a faster pace since there's less to be drawn each frame.

It's a very useful technique - I plan on using it myself.
Technical Details
Message-ID: <Bss3pz.KLD@news.cso.uiuc.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!dtix!darwin.sura.net!mips!swrinde!sdd.hp.com!ux1.cso.uiuc.edu!news.cso.uiuc.edu!usenet
References: <62430013@acf3.NYU.EDU> <gate.a346oB1w165w@toz.buffalo.ny.us>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!dtix!darwin.sura.net!mips!swrinde!sdd.hp.com!ux1.cso.uiuc.edu!news.cso.uiuc.edu!usenet
From: tmkk@uiuc.edu (Khan)
Newsgroups: rec.games.programmer
Subject: Re: 320x400 question
Message-ID: <Bss3pz.KLD@news.cso.uiuc.edu>
Date: 10 Aug 92 17:39:33 GMT
References: <62430013@acf3.NYU.EDU> <gate.a346oB1w165w@toz.buffalo.ny.us>
Sender: usenet@news.cso.uiuc.edu (Net Noise owner)
Organization: University of Illinois at Urbana
Lines: 30