Screen Fade In

 BBS: Inland Empire Archive
Date: 05-30-92 (05:30)             Number: 164
From: PHIL HODGES                  Refer#: NONE
  To: SCOTT LEVENTHAL               Recvd: NO  
Subj: Screen Fade In                 Conf: (2) Quik_Bas
SL>This may be an idiotically simple question, but I can't get it to work:

SL>My program runs in SCREEN 9 mode, and initiates on a black
  >background.  Several items are drawn to the screen, and
  >then I want an item to fade in from black.  That item will
  >be the only item on the screen in color 1.  So, here is the
  >question: how do I draw the item on a black background so
  >that it isn't initially visible, then fade it in?

   No, it's not idiotically simple.  I've been trying to figure out how
to simulate screen fading in SCREEN 9 (my card has 256K), and it either
happens instantaneously (not noticeable) or it flickers.
   One way to draw something without it being initially visible is to
draw it on one page, say 1, then switch to 0 when it's done, like so:

 SCREEN 9, ,A%, V%  'draw on hidden page
 CLS 1
  {draw picture}
 SCREEN 9, ,V%, A%  'now swap pages

  Dunno about the fading, though.  If your EGA card is like mine, you
  have 64 colors to work with, so it SHOULD be possible to some degree.

SL>The only complication is this: I would prefer that the fadein be smooth,
  >whether the program is run on an 8088 or 80486 machine, and
  >the fadein should take 1 to 2 seconds only.

SL>All suggestions will be greatfully received!

   Hope I could help, for what little I told you...

 X SLMR 2.1a X One canibal's meal is another man's person.

--- Maximus 2.00
 * Origin: The Gamorian Vortex Project (1:105/601)
Outer Court
Echo Basic Postings

Books at Amazon:

Back to BASIC: The History, Corruption, and Future of the Language

Hackers: Heroes of the Computer Revolution (including Tiny BASIC)

Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution

The Advent of the Algorithm: The Idea that Rules the World

Moths in the Machine: The Power and Perils of Programming

Mastering Visual Basic .NET