Board index » delphi » Easter Egg Code

Easter Egg Code


2003-08-28 10:14:13 PM
delphi85
Greetings everyone,
I gather most of you are aware of the Alt+JEDI or Alt+TEAM Alt+QUALITY
easter egg in
D5,D6, Delphi 7 (In IDE Help|About) does anyone know what component or where i
could get source to display
the same star wars type message in my application ?
I have tried my usual group but no-one is aware of how it is done ?
Dave
 
 

Re:Easter Egg Code

"Dave de Buys" <XXXX@XXXXX.COM>writes
Quote
display
the same star wars type message in my application ?
How about this, as a starting point
- Build yourself a background bitmap. Make sure it is a dib, probably best in
the 24bits per pixel or 32bits per pixel format.
- Build yourself a text bitmap. Make sure it is a dib. It might be best to
make this a pure black and white dib. Or perhaps a 24 or 32 bits per pixel
dib to also use anti-aliased font rendering... Draw your complete text on
this text bitmap with standard GDI text rendering, black on white
- Build yourself a temporary bitmap, size and bitdepth same as background
bitmap.
- Now loop through the animation. For each frame:
- Copy the background bitmap onto the temporary bitmap. Use fast
CopyMemory instead of GDI.
- Loop through all the scanlines of temporary bitmap. For each scanline
- Calculate what scanline of the text bitmap you will need. This will
be a function of the animation frame time index, and the temporary bitmap
scanline index.
- Calculate what factor of horizontal shrinking of text you will need.
This will be a function of the temporary bitmap scanline index.
- Copy the text scanline onto the temporary bitmap scanline, such
that
- white background pixels in text scanline means just skip
- black text pixels in text scanline mean change temporary
bitmap scanline pixel to foreground text color
- you increment pixel offsets to do the horizontal shrinking of
the text that is needed
- Display the temporary bitmap
You could start with this, and next enhance it do render the text on the
temporary bitmap in an anti-aliased manner, averaging multiple text pixels
into one temporary bitmap pixel. Next, you may also want to add the fadding
out effect on the top of the text plane. By fiddling with the functions used
in the two lines that start with 'Calculate', you can also adjust angle, and
speed and such. At that point, this should give you the exact same star-wars
like results.
Report back with intermediate results regularly. I think you will get lots of
help here, this is fun!
Joris
 

Re:Easter Egg Code

It's easier just to use OpenGL to render text on a 3D plane. ;>
-Danny
 

Re:Easter Egg Code

"Danny Thorpe" <XXXX@XXXXX.COM>writes
Quote
It's easier just to use OpenGL to render text on a 3D plane. ;>
You may be right. I don't have any experience in OpenGL, so I didnt' even
think of that. Though, in your other mail, you do seem to describe a
situation that is rather typical when using heavy stuff for tasks that can
be equally well performed by relatively easy proprietary code. Did you think
of adding the trouble you described to the equation before making the
conclusion about what's easier?
I don't wish to go into an argument, though. You may be right, OpenGL may be
the shortest route. I couldn't say, I don't know OpenGL.
Joris
 

Re:Easter Egg Code

"Joris" <XXXX@XXXXX.COM>writes
Quote
"Danny Thorpe" <XXXX@XXXXX.COM>writes
news:3f4e39f8$XXXX@XXXXX.COM...
>It's easier just to use OpenGL to render text on a 3D plane. ;>

You may be right. I don't have any experience in OpenGL, so I didnt' even
think of that. Though, in your other mail, you do seem to describe a
situation that is rather typical when using heavy stuff for tasks that can
be equally well performed by relatively easy proprietary code. Did you
think
of adding the trouble you described to the equation before making the
conclusion about what's easier?

I don't wish to go into an argument, though. You may be right, OpenGL may
be
the shortest route. I couldn't say, I don't know OpenGL.
For those Easter Eggs, yes, OpenGL is definitely the easiest and quickest
solution. Just takes a few minutes.
Cheers, Alan.
 

Re:Easter Egg Code

"Bryan Valencia" <XXXX@XXXXX.COM>writes
Quote
Zamples?
Food? Clothes? House? A Jaguar Sovereign?
Please trim your quotes.
Joris
 

Re:Easter Egg Code

"Joris" <XXXX@XXXXX.COM>writes
Quote
"Danny Thorpe" <XXXX@XXXXX.COM>writes
news:3f4e39f8$XXXX@XXXXX.COM...
>It's easier just to use OpenGL to render text on a 3D plane. ;>

You may be right. I don't have any experience in OpenGL, so I didnt' even
think of that. Though, in your other mail, you do seem to describe a
situation that is rather typical when using heavy stuff for tasks that can
be equally well performed by relatively easy proprietary code. Did you
think
of adding the trouble you described to the equation before making the
conclusion about what's easier?

I don't wish to go into an argument, though. You may be right, OpenGL may
be
the shortest route. I couldn't say, I don't know OpenGL.

Yes, OpenGL is much easier than implementing a custom scanline rendering
engine.
When you're done with the scanline rendering engine, all you have is
scanlines. When you're done with implementing a scene in OpenGL, you have a
3D model to play around with. If you're really bored, you can toss a teapot
in as well. (a little OpenGL joke)
For example, while viewing the scrolling credits in the Delphi IDE, try
pressing the arrow keys...
-Danny
 

Re:Easter Egg Code

<G>I like the 'Use the Source, Luke' on the underside of the scrolling
text...neat! (use down arrow to flip over the scrolling text)...
"Danny Thorpe" <XXXX@XXXXX.COM>writes
Quote

<SNIP>
For example, while viewing the scrolling credits in the Delphi IDE, try
pressing the arrow keys...

-Danny


 

Re:Easter Egg Code

Hi guys, thanks for all the comments thus far, the reason i didn't want to
go OpenGL is because i dont want to have to install any components, there
are many other developers on the project and i don't necesarily want them to
know about my egg :) i started giving the GDI rendering a bash, will let you
know if there are any advances, any source samples would be appreciated, i
do mainly OO GIS / Spatial mapping software, so this is rather new to me ...
Dave
 

Re:Easter Egg Code

Quote
but I couldn't figure out why the OpenGL context refused to bind to a child
window handle.
Missing CS_OWNDC in CreateParams/WindowClass.Style? (wild guess)
Eric
 

Re:Easter Egg Code

"Bryan Valencia" <XXXX@XXXXX.COM>writes
Quote
Zamples?
I just put some source code for a very quick and very dirty credits
display... This can greatly be improved, but it is just to show how quick it
is to do...
Cheers, Alan.
 

Re:Easter Egg Code

"Paul Nicholls" <XXXX@XXXXX.COM>writes
Quote
<G>I like the 'Use the Source, Luke' on the underside of the scrolling
text...neat! (use down arrow to flip over the scrolling text)...
I think I know who thought that one up... I have seen that statement before in
a very, very lengthy thread. ;-)
OK guys, if you all say so, I will take your word for it.
Joris
 

Re:Easter Egg Code

"Dave de Buys" <XXXX@XXXXX.COM>writes
Quote
Hi guys, thanks for all the comments thus far, the reason i didn't want to
go OpenGL is because i dont want to have to install any components, there
are many other developers on the project and i don't necesarily want them
to
know about my egg :) i started giving the GDI rendering a bash, will let
you
know if there are any advances, any source samples would be appreciated, i
do mainly OO GIS / Spatial mapping software, so this is rather new to me
...
There are no components to install to use OpenGL. OpenGL.dll is part of
the Win32 OS (after Win95, anyway).
-Danny
 

Re:Easter Egg Code

Quote
There are no components to install to use OpenGL. OpenGL.dll is part of
the Win32 OS (after Win95, anyway).
I have heard that Microsoft doesn't want to support OpenGL any more. Any
comments?
Jens
 

Re:Easter Egg Code

"Jens Gruschel" <XXXX@XXXXX.COM>writes
Quote
>There are no components to install to use OpenGL. OpenGL.dll is part
of
>the Win32 OS (after Win95, anyway).
I have heard that Microsoft doesn't want to support OpenGL any more. Any
comments?
Where have you heard/read that? Either way, I'd be very surprised if
OpenGL would disappear from the Windows platform just like that. it is such a
big thing and is so popular that I wouldn't worry at all. In the worst case,
there will an Open Source community that will take over, be sure of that.
Cheers, Alan.