Let’s take a look at SDL Game Development book

I use SDL 1.2 on my engine, but just for the window creation and input handling. That prevents me for writing boring window handling code for each platform, it just works.

These days SDL can be use on almost every platform, Windows, Mac, Linux, iOS, Android. They recently launched the a new version, SDL 2.0 and I was lucky to receive a copy of SDL Game Development written by Shaun Mitchell that covers that new version.

6821OT_cov

For anyone who is starting on game development and wants to use SDL this is a good book, it has simple code and everything is very well explained. But make no mistake, I don’t recommend this for someone who doesn’t know code at all, you need to know some C++ to use it, or at least some object oriented language, but chances are, if you are reading my blog you know a OOP language already.

Everything in the book is explained in a simple way and I don’t see anyone having any problems, I really liked the code examples, usually some books have a very “non real” code, stuff that while it works no-one usually does it like that, but this one has stuff that I would do that exact same way. It guides you from making the first hello project to loading an image, a game state machine, getting input from Keyboard, Mouse and Joysticks, a manager to handle textures, and creating a tilemap using Tiled. The Tiled chapter was a positive surprise since not many beginner/intermediate books go much into a data-driven design, and this is very important to make modern games, while it might seem hard to implement for a beginner, trust me it is well worth it.

Now for things that you might be expecting but are not covered, the book doesn’t cover any OpenGL/DirectX specifics, so if you are looking for that you won’t find it here. It is possible to directly call GL/DX instead of using SDL draw calls, this is something I do, but you might lose platform independence if not done properly. Shaders are something also not covered, but then again SDL has no native support for that, you have to do it yourself.

I also would have liked if the book covered more on configuring SDL on Mac, Linux too, since most people who choose SDL usually do want to build on those platforms.

To end this short review, I would say that for everyone that are starting in gamedev, or never used SDL this is a good book, for someone who has already used SDL 2.0 or even 1.2 in the past you probably won’t find much here that you don’t already know.

I was not payed in any form to take a look at this book, nor was this post redacted/altered in any way. I reviewed the book by reading the digital format. You can find both the digital and physical book on the link above.

More Reading

Post navigation

  • I know the book seems to focus on Windows and Visual Studio but is the sample code platform independent or is the author constantly including Windows header files and link to its DLLs?

    Thanks.

  • How about the code towards the end of chapter 1, Game.cpp/Game.h/main.cpp, I wasn’t able to get this to work correctly and the code examples downloads don’t include these.

  • Can you tell me where is the download of source code examples of sdl 2.0 ebook please send the link or post it here

  • This book is full of errors in code sorce codes in book are not complete riped from context. Maybe if author divede all source codes to separate chapter it may help, but the way as it is the book is simply unusable for learning. I give up after lesson 5 when project gone to some vector compile error, and nothing helped. Just try to google some keywords from source codes and you will see bunches of question in stackoverflow etc.
    Sorry for my English

Leave a Reply to David Amador Cancel reply

Your email address will not be published. Required fields are marked *