|
|
4.0 out of 5 stars
Good tutorial, April 28 2003
<i>Focus on SDL</i> 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. <i>Focus on SDL</i> 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.</p> 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 <i>Focus on SDL</i> 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.</p> 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.</p>
The next 75-odd pages of <i>Focus on SDL</i> 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. <i>Focus on SDL</i> 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.</p> The remainder of <i>Focus on SDL</i> 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.</p> 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.</p> 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.</p> 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.</p> Lack of cross-platform information notwithstanding, <i>Focus on SDL</i> 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.</p>
Help other customers find the most helpful reviews
Was this review helpful to you?
|
|
|
|