Writing directly on screen

Hi!

I’m looking for a cross-platform way to flash text on the screen. I
want to experiment with the effects flashed messages can have on the
user, much like the ‘Eat Popcorn’ movie subliminals of the 70s but
with self-chosen messages, e.g. ‘I am an incredibly prolific hacker’.

Technically, this means overlaying text (and possibly graphics) over
the screen as a whole and removing it again, without interfering
with functionality at all.

Could SDL be used for this?

Carlo

If you mean as a way to just display text over, say, a viewed webpage, then not really.

SDL is intended to work as an executable, independant program (is this making any sense?!) either as a Windows app or under some flavour of Linux.

I guess you could grab the current screen data (somehow) and then overlay your text on it, under SDL, using a full-screen mode, and should the user move the mouse (for instance) then the SDL app would exit. Possible but quite tricky.

Hope this helps.

Ed> ----- Original Message -----

From: capocasa@gmx.net (Carlo Capocasa)
To: sdl at libsdl.org
Sent: Tuesday, 25 September, 2007 9:06:38 PM
Subject: [SDL] Writing directly on screen

Hi!

I’m looking for a cross-platform way to flash text on the screen. I
want to experiment with the effects flashed messages can have on the
user, much like the ‘Eat Popcorn’ movie subliminals of the 70s but
with self-chosen messages, e.g. ‘I am an incredibly prolific hacker’.

Technically, this means overlaying text (and possibly graphics) over
the screen as a whole and removing it again, without interfering
with functionality at all.

Could SDL be used for this?

Carlo


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

  ___________________________________________________________ 

Want ideas for reducing your carbon footprint? Visit Yahoo! For Good http://uk.promotions.yahoo.com/forgood/environment.html

Thanks! Much appreciated.

If you mean as a way to just display text over, say, a viewed webpage,
then not really.

So in other words, there is no way to use SDL to directly manipulate
video memory in a cross-platform way. Or make the main SDL window
partially translucent. (1-bit alpha would be sufficient).

SDL is intended to work as an executable, independant program (is this
making any sense?!) either as a Windows app or under some flavour of Linux.

Yeah. I want to run the app as a daemon/service.

I guess you could grab the current screen data (somehow) and then
overlay your text on it, under SDL, using a full-screen mode, and should
the user move the mouse (for instance) then the SDL app would exit.
Possible but quite tricky.

Yeah… I have a hunch that’s too much overhead for the quick
flashing I have in mind (exiting would actually be done by timer,
e.g. after 0.02 seconds).

Need to give this some more thought… Maybe just low-level
programming this for all three platforms would work better.

Thanks for your input!

Carlo

I think PyGame would be good for this. It’s a quick and easy way to use SDL
for little projects like this. Hold on a minute I’ll get you some sample
code.On 9/26/07, Carlo Capocasa wrote:

Thanks! Much appreciated.

If you mean as a way to just display text over, say, a viewed webpage,
then not really.

So in other words, there is no way to use SDL to directly manipulate
video memory in a cross-platform way. Or make the main SDL window
partially translucent. (1-bit alpha would be sufficient).

SDL is intended to work as an executable, independant program (is this
making any sense?!) either as a Windows app or under some flavour of
Linux.

Yeah. I want to run the app as a daemon/service.

I guess you could grab the current screen data (somehow) and then
overlay your text on it, under SDL, using a full-screen mode, and should
the user move the mouse (for instance) then the SDL app would exit.
Possible but quite tricky.

Yeah… I have a hunch that’s too much overhead for the quick
flashing I have in mind (exiting would actually be done by timer,
e.g. after 0.02 seconds).

Need to give this some more thought… Maybe just low-level
programming this for all three platforms would work better.

Thanks for your input!

Carlo


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Paul Holt

No, wait… translucent over the screen rather than in it’s own window? On
second thoughts I don’t think that can be done directly in a cross-platform
way with SDL.On 9/26/07, Paul Holt <@Paul_Holt> wrote:

I think PyGame would be good for this. It’s a quick and easy way to use
SDL for little projects like this. Hold on a minute I’ll get you some sample
code.

On 9/26/07, Carlo Capocasa wrote:

Thanks! Much appreciated.

If you mean as a way to just display text over, say, a viewed webpage,
then not really.

So in other words, there is no way to use SDL to directly manipulate
video memory in a cross-platform way. Or make the main SDL window
partially translucent. (1-bit alpha would be sufficient).

SDL is intended to work as an executable, independant program (is this
making any sense?!) either as a Windows app or under some flavour of
Linux.

Yeah. I want to run the app as a daemon/service.

I guess you could grab the current screen data (somehow) and then
overlay your text on it, under SDL, using a full-screen mode, and
should
the user move the mouse (for instance) then the SDL app would exit.
Possible but quite tricky.

Yeah… I have a hunch that’s too much overhead for the quick
flashing I have in mind (exiting would actually be done by timer,
e.g. after 0.02 seconds).

Need to give this some more thought… Maybe just low-level
programming this for all three platforms would work better.

Thanks for your input!

Carlo


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Paul Holt


Paul Holt

k… That’s what I’ve been wanting to know. Thanks!

Carlo