Focus On SDL
||Author: Ernest Pazera|
List Price: $29.99
Our Price: Click to see the latest and low price
Publisher: Premier Press (18 November, 2002)
Sales Rank: 97,342
Average Customer Rating: 3.8 out of 5
Customer ReviewsRating: 2 out of 5
Not quite what you'd expect
This book isn't bad if you have no access to the documentation or online tutorials already available for SDL. The book is really short and doesn't go into depth in any one area. There is only a brief mention of using SDL with OpenGL and nothing more. Save your money, there's enough tutorials out there online that you can get more from, than in this book. Instead of calling it "Focus on SDL" the title should be "A Glance at SDL" because that's all that you are getting.
Rating: 4 out of 5
Good beginner's book, but brief.
On the positive side, this book is an excellent entry-level programmer's guide to the SDL library. Anybody with basic coding skills should be able to easily follow the examples (which, by the way, are not duplicated in print... something to keep in mind if you are reading this on the train). Surely you could learn all you need to from SDL's own web site and other online documentation. But if you prefer to sit down and read a book cover to cover, like I do, this book might be a better fit.
My biggest disappointment is that there is no coverage of OpenGL at all. My attraction to SDL is to use as a base platform for OpenGL coding. A chapter on OpenGL integration would have won a fifth star from me.
I would like to have seen more advanced and in-depth coverage. Maybe another chapter or so on implementing an example game using the framework given to us in the final section.
Rating: 4 out of 5
Focus on SDL is Ernest Pazera's fourth programming tutorial and the third one written for Premier Press. With every effort, both Mr. Pazera and Premier are getting closer to putting together an ideal set of game development tutorials. Pazera's books get more organized while Premier focuses and deflates the fat from their efforts. Focus on SDL is about all I could hope for from an SDL tutorial. It's not perfect, but it does a great job of doing what it
sets out to do.
First off, let me say something about SDL -SDL is easy! While it's got a couple of quirks here and there, SDL is a very well organized and very easy to learn library for games. And Focus on SDL realizes this.
It doesn't try to make a simple subject complicated by ignoring the big picture to focus on minutiae. The main tutorial starts out logically with a discussion of starting up and shutting down SDL, followed by creating your main window, followed by placing bitmaps on the window, followed by event-handling, followed by playing CD-audio and video, followed by the joystick, and finally finished by threads and timers. In other words, it goes in about the order you'd need to go to write a simple game. Go figure.
If you haven't figured out yet, this is a good book for beginners. It takes an easy-to-learn library and makes it even easier to learn. There aren't any code-listings for the obligatory breakout-clone in the text,
but by the time you get to page 150, you should have no problem figuring out how to structure a game from what you've read.
The next 75-odd pages of Focus on SDL are focused on
the most important SDL add-on libraries. If you go to the SDL website, you'll see that there are literally dozens of add-on libraries available that cover everything from sprite graphics to GUI libraries. Focus on SDL covers the four libraries that I would have chosen as the most important components that are not part of core SDL, namely SDL_image (loading common bitmap file formats), SDL_ttf (loading and displaying TrueType fonts), SDL_net (networking), and SDL_mixer (loading, mixing, and playing sounds). As you can imagine, a complete game would likely need most, if not all, of these add-ons, so it's good to have those covered.
The remainder of Focus on SDL covers a C++ wrapper-library for SDL. SDL lends itself very nicely for abstracting with objects, so constructing a wrapper that abstracts all of the primitive SDL bits like colors, palettes, rectangles, etc. is certainly a good idea.
One thing I'd like to commend the author for is waiting to write the class-library until the end of the book. I've read so many books that spend all of chapter 2 constructing a comprehensive class library wrapping the subject technology, then using the rest of the book teaching you how to use the class-library rather than the technology itself. That means that if I want to
know how to use a particular call, I can't just look up the call in the book. I have to look at the author's wrapper-function and figure out how it works. If you want to know the particulars of SDL_Init(), you can just look it up in the
book and read about it. You don't need to take apart the author's own version of SDL_Init() to see it works.
I mentioned earlier that the book's not perfect. My biggest
complaint is its lack of coverage of platforms other than Windows. One of the biggest advantages of SDL is that it works under pretty-much every major computer platform out there. While all of the examples should work just fine on other platforms, I would really liked to have seen coverage of getting SDL to work under Linux and Mac OSX. As it stands, the book only mentions other platforms in passing, pointing out that things like threading can be troublesome to do cross-platform, but never getting deeper than that.
My other complaint is minor. A popular use of SDL nowadays is as a windowing front-end for OpenGL. While this is indeed too deep of a subject for a tutorial like this, it would have been good to see at least some pointers for more information on marrying SDL and OpenGL.
Lack of cross-platform information notwithstanding, Focus on SDL is the best SDL tutorial that I've found. It's a perfect book for beginning game developers, as it makes an easy topic even easier. If you want to write a 2D game, check out SDL. If you want to check out SDL, get this book. I don't know how to make it any clearer.
· OpenGL Game Programming w/CD
· Game Scripting Mastery
· Focus On 3D Terrain Programming
· Programming Linux Games
· Data Structures for Game Programmers