The problem with the wiki documentation is that its structure is too
much a parameter reference and too little a conceptual explanation of
the best practice for doing something. SDL has a lot of parts, and a
lot of ways to use those parts, and the wiki docs will more or less
explain what they all are. Just that some of them aren’t things you
should be doing anymore and exist mostly for historical and backward
compatibility sakes.
I mentioned in another post recently the event interface, for
example. It’s totally an optional subsystem, and so most things have
alternative ways of doing them. Yet none could rationally argue that
disabling the event system and working around it is EVER a good idea
anymore. Most of SDL’s targets (ALL of the main-line ones) send
events whose proper handling is mandatory.
Consequently some subsystems have multiple ways of using them, with
one being the clear preference for new development. I must have
written explanations and sample code for the joystick and game
controller event models half a dozen times a year ago. If there was
a convenient conceptual model page on the website, I might not have
needed to do it more than once?on the wiki.
But as it stands
there isn’t even a functional place to put that kind of thing just
now.
A when to use the renderer might be appropriate documentation, and
I have no idea where you’d put a tutorial for those whose games are
outgrowing the SDL renderer and need to move to OpenGL/Direct3D. Of
course if I had my way for 2.1, the renderer would grow to the point
that you don’t NEED to “outgrow” it, but it’s impossible to guarantee
that a user couldn’t screw that up for fixed pipeline OpenGL. I’d
still like to do it anyway and just stick the warning label on it for
anyone using that kind of legacy stuff.
Anyway, that’d still be
something that doesn’t fit anywhere into the wiki structure even if
it’s the kind of thing that really should be immediately available to
SDL developers.
For sound, I could see something on basic channel mixing and audio
painting being written for SDL. It’d have to link elsewhere for a
full tutorial on these things, and to wiki pages for extension
libraries, OpenAL, whatever? But fully documenting SDL’s sound
subsystem does require some small element of a tutorial because
people honestly might not really even know what they’re looking at.
Kind of why you see SDL_mixer being dragged in for what should be
trivial audio tasks.
I’ve yet to see a comprehensive explanation I fully understood about
handling full unicode text input and display. Font substitution,
input methods, etc? I tend not to even bother partly because my uses
of SDL never really involve significant text for the end-user, and
because aside from maybe iOS, I just haven’t got a clue where to
start on figuring it out. That’d make a good conceptual page. 
As you can see from these examples, there’s a lot of documentation
that could/should be in the wiki, but with the current structure
isn’t really. And there’s a fair bit that probably should be there
as well that I’ve got no good suggestion how to even implement. And
that’s still the documentation just for people who kind of know
something about what they’re doing but just don’t understand the kind
of stuff SDL gets used for. You still need more hands on, step by
step sorts of guides for those who need more hand-holding than would
be appropriate for conceptual and basic overviews and best practices
docs. That’d be a good job for additional tutorials and books.
JosephOn Sat, Nov 22, 2014 at 01:09:09AM -0600, unfy wrote:
On 11/7/2014 8:27 AM, Alex wrote:
Hello, unfy!
I’m C programmer too and I learning SDL2 now. I learn it myself
without any tutorials, using just SDL-wiki and this forum. And
sometime looking to SDL2 source code (it’s written in C). I making
simple test programs for different aspects of SDL2 and learn how it
works.
I think we need more SDL tutorials in C - it is good idea. But for
now we can learn using this resources, which we have. We can learn
SDL2 + C programming together if you interested Smile
HI Alex!
Sorry about missing this message ._.
The purist C tutorials would be more or less for my co-worker, not me.
I’m sure they’d help for others as well - a set of pure C tutorials
lets the end user then decide how to do class structure later if they
so desire to go that route. This way, a particular style isn’t forced
upon them.
When it comes time for me to pick up SDL 2.x (soon it seems), I’d do
like I did the first time I learned SDL 10-15 years or more ago - just
use the Wiki / function documentation
– which sounds like how
you’re doing it. It is by far the best way to learn IMHO, but some
people want full on tutorials / books.
-unfy
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org