Screensavers

How suitable would SDL be for developping screen savers (especially for
ugh… windows)? Has anyone tried making one using SDL?

Thanks
Drirr C.

Haven’t tried with SDL, but it should be possible, I think.

What makes a Win32 screensaver different from a “normal” exe is the
extension and some command line arguments that should be supported for
proper operation. IIRC, there was one more detail to worry about (wich
caused some minor trouble with Delphi), but I can’t remember what it
was… You’ll have to ask someone with more and more recent experience
with Win32 screen savers. :slight_smile:

As to Un*x, screen savers are just normal programs, although they (like
windows savers) should support a few standard command line args.

Of course, all screen savers should exit nicely when they receive user
input. Mouse motion should be filtered so that the screen saver doesn’t
"randomly" terminate because of noise from the mouse. Unfortunately, most
systems don’t seem to have any special API or anything for this, so it’s
just a matter of catching and processing normal input. (OTOH, that means
that you can make interactive screensavers.)

Now, it would be really nice if it was possible to keep the screen
savers timeout from ignoring joystick input on certain platforms - but
that’s really up to the OS or desktop environment. (Although a screen
saver could of course terminate directly if it detects joystick input, it
might already be too late by that time…)

//David Olofson — Programmer, Reologica Instruments AB

.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
----------------------------> http://www.linuxdj.com/maia -' .- David Olofson -------------------------------------------. | Audio Hacker - Open Source Advocate - Singer - Songwriter |-------------------------------------> http://olofson.net -'On Tuesday 04 December 2001 00:22, Drirr C. wrote:

How suitable would SDL be for developping screen savers (especially for
ugh… windows)? Has anyone tried making one using SDL?

I’ve thought about it so many times, I may as well have written one. :wink:

I’ve only ever written one screensaver: “Flying Windows” for X.
Unfortunately, it’s not part of the default Xscreensaver release. :frowning:

-bill!On Mon, Dec 03, 2001 at 05:22:52PM -0600, Drirr C. wrote:

How suitable would SDL be for developping screen savers (especially for
ugh… windows)? Has anyone tried making one using SDL?

  1. Is there a standard install location for SDL libraries on a Windows
    system? Is it worth me getting my game installer to put it in
    WINNT\System or somewhere like that, or should the game keep its DLLs to
    itself?

  2. How can I get Dr. Watson logs out of an SDL application? As far as I
    can tell, as soon as SDL_Init() is called, whether with the NOPARACUTE or
    not, I get a ‘clean’ exit rather than the Win32 debug program being
    called. I’m just starting my program with the usual main(), calling
    SDL_Init almost immediately, nothing out of the ordinary I reckon.

cheers,–
Matthew > http://www.soup-kitchen.net/
> ICQ 19482073

Matthew Bloch wrote:

  1. Is there a standard install location for SDL libraries on a Windows
    system? Is it worth me getting my game installer to put it in
    WINNT\System or somewhere like that, or should the game keep its DLLs to
    itself?

Caveat: I don’t program using SDL on WIN32 so what follows are general
observations based on non-SDL WIN32 apps I wrote. SDL could have
something special (but if it does IMHO it better have a very very good
reason for it!)

Well, keeping all DLL neatly tucked with the EXE is the best way to
avoid “DLL HELL”. Besides, it’s WINNT/System32 on some, WINDOWS/System
on others.

  1. How can I get Dr. Watson logs out of an SDL application? As far as I
    can tell, as soon as SDL_Init() is called, whether with the NOPARACUTE or
    not, I get a ‘clean’ exit rather than the Win32 debug program being
    called. I’m just starting my program with the usual main(), calling
    SDL_Init almost immediately, nothing out of the ordinary I reckon.

If it has main() then does not WIndows see it as a CONSOLE app? Could it
be that Watson does not ‘see’ those?>

cheers,


Matthew > http://www.soup-kitchen.net/
> ICQ 19482073


Michel Bardiaux
Peaktime Belgium S.A. Rue Margot, 37 B-1457 Nil St Vincent
Tel : +32 10 65.44.15 Fax : +32 10 65.44.10

  1. Is there a standard install location for SDL libraries on a Windows
    system? Is it worth me getting my game installer to put it in
    WINNT\System or somewhere like that, or should the game keep its DLLs to
    itself?

Caveat: I don’t program using SDL on WIN32 so what follows are general
observations based on non-SDL WIN32 apps I wrote. SDL could have
something special (but if it does IMHO it better have a very very good
reason for it!)

Well, keeping all DLL neatly tucked with the EXE is the best way to
avoid “DLL HELL”. Besides, it’s WINNT/System32 on some, WINDOWS/System
on others.

Sure, though my installer app knows the right System directory to put it
in. But I suppose it’s probably safer; it’s not as if SDL is the size of
MFC or VB runtime or any other monster-sized system resource.

  1. How can I get Dr. Watson logs out of an SDL application? As far as I
    can tell, as soon as SDL_Init() is called, whether with the NOPARACUTE or
    not, I get a ‘clean’ exit rather than the Win32 debug program being
    called. I’m just starting my program with the usual main(), calling
    SDL_Init almost immediately, nothing out of the ordinary I reckon.

If it has main() then does not WIndows see it as a CONSOLE app? Could it
be that Watson does not ‘see’ those?

If I put an SDL_FreeSurface((void*)12345); call in before the SDL_Init()
call, I get the proper Windows crash handler invoked (Dr. Watson / Visual
Studio). If I put my deliberate crash in afterwards, nothing happens,
just exits. If nobody else knows I guess I’ll poke around in the video
initialisation code, which I assume is the culprit.

cheers,On Wed, 5 Dec 2001, Michel Bardiaux wrote:


Matthew > http://www.soup-kitchen.net/
> ICQ 19482073

Before you start assuming the problem is within the video initilization code
of SDL, check the following things :

  • Do the SDL test programs have the same behaviour?
  • Do you link with SDLMain?
  • Are you sure your project a ‘Win32 Application’? (not a Win32 console
    application) (assuming you’re using Visual C++)

if you can answer ‘yes’ to all of the above questions, can you post a
minimal program that shows this behaviour?> ----- Original Message -----

From: Matthew Bloch [mailto:mattbee-sdl@soup-kitchen.net]

If I put an SDL_FreeSurface((void*)12345); call in before the SDL_Init()
call, I get the proper Windows crash handler invoked (Dr. Watson / Visual
Studio). If I put my deliberate crash in afterwards, nothing happens,
just exits. If nobody else knows I guess I’ll poke around in the video
initialisation code, which I assume is the culprit.

Also, are you passing SDL_INIT_NOPARACHUTE to SDL_Init()?

You probably shouldn’t get a “proper” crash without it.> -----Original Message-----

From: Matthew Bloch [mailto:mattbee-sdl at soup-kitchen.net]

If I put an SDL_FreeSurface((void*)12345); call in before the SDL_Init()
call, I get the proper Windows crash handler invoked (Dr. Watson / Visual
Studio). If I put my deliberate crash in afterwards, nothing happens,
just exits. If nobody else knows I guess I’ll poke around in the video
initialisation code, which I assume is the culprit.


Greg V. (hmaon)

  1. How can I get Dr. Watson logs out of an SDL application?
    […]

If it has main() then does not WIndows see it as a CONSOLE app? Could it
be that Watson does not ‘see’ those?

If I put an SDL_FreeSurface((void*)12345); call in before the SDL_Init()
call, I get the proper Windows crash handler invoked (Dr. Watson / Visual
Studio). If I put my deliberate crash in afterwards, nothing happens,
just exits. If nobody else knows I guess I’ll poke around in the video
initialisation code, which I assume is the culprit.
Personally, I don’t have any problem crashing my system… :slight_smile: And it’s
handled
nicely by Visual Studio whatever the reason of the crash. Could your problem
come from Dr. Watson (I never liked this one personally) ?

C ya,
Gaetan.

Before you start assuming the problem is within the video initilization code
of SDL, check the following things :

  • Do the SDL test programs have the same behaviour?
  • Do you link with SDLMain?
  • Are you sure your project a ‘Win32 Application’? (not a Win32 console
    application) (assuming you’re using Visual C++)

Thanks, it looks like I was linking to the wrong C runtime-- I’d only set
’Multithreaded DLL’ for the Debug build, not the release, and this came to
light when I peered over the project’s settings.On Wed, 5 Dec 2001, Dominique Biesmans wrote:


Matthew > http://www.soup-kitchen.net/
> ICQ 19482073

Maybe it brings up bad old memories for too many used-to-be MS Windows
users? :wink:

Anyway, is that code available for download somewhere?

//David Olofson — Programmer, Reologica Instruments AB

.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
----------------------------> http://www.linuxdj.com/maia -' .- David Olofson -------------------------------------------. | Audio Hacker - Open Source Advocate - Singer - Songwriter |-------------------------------------> http://olofson.net -'On Wednesday 05 December 2001 12:35, William Kendrick wrote:

On Mon, Dec 03, 2001 at 05:22:52PM -0600, Drirr C. wrote:

How suitable would SDL be for developping screen savers (especially
for ugh… windows)? Has anyone tried making one using SDL?

I’ve thought about it so many times, I may as well have written one. :wink:

I’ve only ever written one screensaver: “Flying Windows” for X.
Unfortunately, it’s not part of the default Xscreensaver release. :frowning:

> > > > I've only ever written one screensaver: "Flying Windows" for X. > > Unfortunately, it's not part of the default Xscreensaver release. :( > > Maybe it brings up bad old memories for too many used-to-be MS Windows > users? ;-)

Oh, you obviously haven’t seen it, have you!? :slight_smile:

Anyway, is that code available for download somewhere?

http://www.newbreedsoftware.com/flyingwindows/

(I actually run it at work, but in the “X11, non-violent” mode :slight_smile: )

-bill!On Thu, Dec 06, 2001 at 05:07:12PM +0100, David Olofson wrote:

Ah, now I get it! I was a bit worried there at first… :slight_smile:

//David Olofson — Programmer, Reologica Instruments AB

.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
----------------------------> http://www.linuxdj.com/maia -' .- David Olofson -------------------------------------------. | Audio Hacker - Open Source Advocate - Singer - Songwriter |-------------------------------------> http://olofson.net -'On Thursday 06 December 2001 20:25, William Kendrick wrote:

On Thu, Dec 06, 2001 at 05:07:12PM +0100, David Olofson wrote:

I’ve only ever written one screensaver: “Flying Windows” for X.
Unfortunately, it’s not part of the default Xscreensaver release.
:frowning:

Maybe it brings up bad old memories for too many used-to-be MS
Windows users? :wink:

Oh, you obviously haven’t seen it, have you!? :slight_smile: