🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.multimedia
3 messages
3 total messages Started by Nicholas Gessler Fri, 10 Aug 2001 21:07
Disintegrating Internet Infrastructure
#1238
Author: Nicholas Gessler
Date: Fri, 10 Aug 2001 21:07
22 lines
2228 bytes
A year or two ago there was a cleaver website containing an essay on "The
Disintigrating Internet Infrastruture."  The essay was about a paragraph
long, and by the time you read 2/3 of the way through it, you began to
notice the letters in the text beginning to fall to the bottom of the
window.  That website moved from URL to URL and I can no longer find it.

a)  If anyone knows where it is at the moment, I would greatly appreciate
hearing where it is.
b)  I thought I'd try programming this in Borland's C++.  Before I begin, I
wanted to run a possible strategy by you all.  I cannot see a way to do this
using labels or TextOut( ) while still preserving the transparency of the
background so that the letters minimally obscure the letters underneath them
as they drop from the screen.  It seems the best way is to create an image
of an alphabet in PhotoShop, make the background transparent, and cut it up
into individual letter .bmps.  Then reconstruct the text back on the screen
using one image for each character and animating the moves of eash with a
timer and a random function.  However, this seems like a lot of work.
Before I begin going down the wrong path, I wonder if you might have some
suggestions as to how to proceede?

Cheers,
Nick
Re: Disintegrating Internet Infrastructure
#1241
Author: Yoto Yotov
Date: Sat, 11 Aug 2001 19:00
24 lines
1834 bytes
> Disintigrating Internet Infrastruture."  The essay was about a paragraph
> long, and by the time you read 2/3 of the way through it, you began to
> notice the letters in the text beginning to fall to the bottom of the
> window.  That website moved from URL to URL and I can no longer find it.

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

> It seems the best way is to create an image of an alphabet in PhotoShop,
> make the background transparent, and cut it up into individual letter
> .bmps.  Then reconstruct the text back on the screenusing one image for
> each character

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");

Good luck!

-- 
Yoto Yotov
Re: Disintegrating Internet Infrastructure
#1244
Author: 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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads