🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.multimedia
Article #1244

Re: Disintegrating Internet Infrastructure

#1244
From: Nicholas Gessler
Date: Sun, 12 Aug 2001 01:06
72 lines
3932 bytes
Yoto Yotov <yoto@NOSPAMgmx.fr> wrote in message
news:MPG.15df4ae171cdb1479896c2@newsgroups.borland.com...

> Sounds interesting, but I've never seen it.  Actually I'm more
> interested in what the text contained than in the animation effects.

I think the contents of the text were there only to support the animation
effects: to hook you on reading something that seems serious and important
and then by performing what the text says, to create a Haiku-like "artwork."

> Wow!  You'll be wasting not only your time but especially, the user's
memory.  The font can be easily made transparent using the TBrush::Style
property.
>There's no need for bitmap letters or anything:
>
>    Canvas->Brush->Style = bsClear;
>    Canvas->TextOut(10, 10, "Completely Transparent");

WOW, that works great!  So now I have the following code that moves two
sentences across the screen and allows them to pass through (over) one
another without any problems:

int d=0;

__fastcall TForm1::TForm1(TComponent* Owner)
   : TForm(Owner)
{
Form1->Canvas->Brush->Style = bsClear;
}

void __fastcall TForm1::TimerDropTimer(TObject *Sender)              // Text
drops 150 pixels using Timer:
{
   d++;
   if (d>1) {
      Form1->Canvas->Font->Color=clBtnFace;
// we want to erase the previous text - the form is color clBtnFace
      Form1->Canvas->TextOut(150, d-1, "Watch me drop.");
   }
   Form1->Canvas->Font->Color=clBlack;
// we want to render the new text in clBlack
   Form1->Canvas->TextOut(150, d, "Watch me drop.");
   if (d==300) Form1->TimerDrop->Enabled=false;
}

And so on with another timer for another sentence moving diagonally across
the screen...
The buttons enable each timer separately or simultaneiously...

There is a limit to how fast this can be rendered.  Setting the timer
interval any faster than about 100ms has no discernable effect.

To create a "falling text" effect, using one timer for each letter (or set
of letters) in the essay seems equally wasteful.   Creating a timer for each
character or set in the text (assuming a text of 100 or 500 letters) would
be a humongous task.  But for the sake of argument, can you run 100-500
timers simultaneously without them "bumping" into one another?  How many
timers can you run together, practically speaking?

I would guess the way to go is to use one timer and have each character (or
set) respond to its cadence.  I suppose I could enter the complete text and
write code to parse the string into individual characters and assign each to
an individual rendering schedule.

The desired effect is that a few letters fall off the page at random in the
beginning, and then progressively more letters begin to fall as time goes
on.  Each character should accelerate as it falls (which the code above does
not accomplish) so I'll have to look into my physics textbook again.

Thanks again,
Nick
Technical Details
Message-ID: <3b75d616_2@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews
References: <3b744ca1$1_1@dnews> <MPG.15df4ae171cdb1479896c2@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10d0fc,5e6cf49027a11c6
X-Google-Attributes: gid10d0fc,public
X-Google-ArrivalTime: 2001-08-11 18:08:29 PST
Reply-To: "Nicholas Gessler" <gessler@ucla.edu>
From: "Nicholas Gessler" <gessler@ucla.edu>
Newsgroups: borland.public.cppbuilder.multimedia
References: <3b744ca1$1_1@dnews> <MPG.15df4ae171cdb1479896c2@newsgroups.borland.com>
Subject: Re: Disintegrating Internet Infrastructure
Date: Sat, 11 Aug 2001 18:06:05 -0700
Lines: 74
Organization: UCLA - Geography
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2615.200
X-MIMEOLE: Produced By Microsoft MimeOLE V5.00.2615.200
NNTP-Posting-Host: 4.40.56.105
Message-ID: <3b75d616_2@dnews>
X-Trace: dnews 997578262 4.40.56.105 (11 Aug 2001 18:04:22 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews