And stdio can only be relied on for
additional information, if at all. The end users really don’t know
about this stuff at all in most cases.
I know of experienced users and programmers who have been around
longer than I have, and still don’t have a clue what’s going on when
"nothing happens when you try to start the program"… Seems like
even that kind of people often believe that stdout and the like no
longer exists in “modern” operating systems.
I’m not convinced it should be part of core SDL - but without it in
core SDL I don’t think it will be used. With it in core SDL I’m sure
it will be overused!
Good point. Even a tiny library is “another library”… Some are
obviously frustrated already by having SDL_image and SDL_mixer as
Still, I don’t quite like the idea of extending SDL with something
like this, most importantly because it means anyone using it will
have to use SDL >= 1.2.9 (or something). An add-on lib will work
with any SDL version, and it could even (maybe even preferably) be
made completely independent of SDL.
Also - what about the cases where we are full
screen? Should we limit usage to where the SDL video is not
initialized (or only in Window mode?).
You mean popping up a dialog when in fullscreen mode? No way! That’s
the kind of stuff you do if you want some 50% chance of forcing the
user to hit the reset button… It doesn’t work anywhere near
reliably on any OS, AFAIK.
Well, of course, you can have SDL render and “drive” a dialog, but
that’s way beyond this "what to do if I can’t set up a display"
Maybe this “Q3A log window” thing I’ve been talking about could do
this sort of stuff as well, but that’s a different matter. My idea
behind that was to deal nicely with stdout/logging stuff in an easy
and “graphical desktop friendly” way, when SDL works. (Which I
guess it does somehow, to some extent, with safe parameters, if
support for any operational video API is compiled in.)
Kobo deluxe loads a logo, a font and then opens up a splash screen
with a progress bar and a status message line saying what it’s doing
ATM. Then it tries to load, scale and process the rest of the
graphics, load and render sounds etc. That’s basically the same
thing, although the current implementation is broken in two ways:
It opens up a display in the configured resolution
for the game. If this fails, no progress bar, no
messages, no nothing…
If it can’t load the message font, it’ll just die
silently, leaving no traces of what happnened,
except possibly this stderr.txt file that no one
will know to look for anyway.
This is what I’m going to fix, and I figured I might as well do it as
a compile-in “library” (like the original glSDL/wrapper) that can be
reused in other projects. Either way, it’s a typical example of
something that can be built on top of SDL, and should not be part of
I like the idea of compiling a very basic font or graphic into the
game that says “I can’t find even my basic resources” - although of
course this doesn’t do much for internalization.
And it doesn’t fix the SDL init problem.
Right. That’s where the system message box, and if that fails, stderr,
gets in. Still doesn’t have to be part of SDL (SDL should just
report errors to the application), but it’s possible to do on most
platforms, done differently on each platform and it’s a tiny patch…
Can it be implemented as a single header file, with no configuration
tool magic or anything? If so, it would be easy enough to snap in
that it doesn’t really matter if it’s included in SDL or not. It
could even be thrown into the SDL headers without affecting binary
//David Olofson - Programmer, Composer, Open Source Advocate
.- Audiality -----------------------------------------------.
| Free/Open Source audio engine for games and multimedia. |
| MIDI, modular synthesis, real time effects, scripting,… |
`-----------------------------------> http://audiality.org -’
— http://olofson.net — http://www.reologica.se —On Sunday 20 March 2005 10.43, Rob Probin wrote: