Start reading SDL Game Development on your Kindle in under a minute. Don't have a Kindle? Get your Kindle here or start reading now with a free Kindle Reading App.

Deliver to your Kindle or other device


Try it free

Sample the beginning of this book for free

Deliver to your Kindle or other device

Anybody can read Kindle books—even without a Kindle device—with the FREE Kindle app for smartphones, tablets and computers.
SDL Game Development

SDL Game Development [Kindle Edition]

Shaun Mitchell
4.0 out of 5 stars  See all reviews (3 customer reviews)

Print List Price: £27.99
Kindle Price: £17.50 includes VAT* & free wireless delivery via Amazon Whispernet
You Save: £10.49 (37%)
* Unlike print books, digital books are subject to VAT.


Amazon Price New from Used from
Kindle Edition £17.50  
Paperback £27.15  
Kindle Daily Deal
Kindle Daily Deal: At least 60% off
Each day we unveil a new book deal at a specially discounted price--for that day only. Learn more about the Kindle Daily Deal or sign up for the Kindle Daily Deal Newsletter to receive free e-mail notifications about each day's deal.

Special Offers and Product Promotions

  • Purchase any Kindle Book sold by and receive £1 credit to try out our Digital Music Store. Here's how (terms and conditions apply)

Product Description

Product Description

In Detail

SDL 2.0 is the latest release of the popular Simple DirectMedia Layer API, which is designed to make life easier for C++ developers, allowing you simple low-level access to various multiplatform audio, graphics, and input devices.

SDL Game Development guides you through creating your first 2D game using SDL and C++. It takes a clear and practical approach to SDL game development, ensuring that the focus remains on creating awesome games.

Starting with the installation and setup of SDL, you will quickly become familiar with useful SDL features, covering sprites, state management, and OOP, leading to a reusable framework that is extendable for your own games. SDL Game Development culminates in the development of two exciting action games that utilize the created framework along with tips to improve the framework.


Written as a practical and engaging tutorial, SDL Game Development guides you through the development of your own framework and the creation of two exciting, fully-featured games.

Who this book is for

SDL Game Development is aimed at C++ developers who want to learn the fundamentals of SDL for cross-platform game development. This isn't a beginner's guide to C++, so a good knowledge of C++ and object-orientated programming is a must.

About the Author

Shaun Mitchell

Shaun Mitchell is a developer at a high profile online gaming company. He holds a BSc in Game Programming and Development from Qantm College / SAE Institute London. Shaun is also a moderator and active member of the programming community

Product details

  • Format: Kindle Edition
  • File Size: 1549 KB
  • Print Length: 256 pages
  • Publisher: Packt Publishing (24 Jun 2013)
  • Sold by: Amazon Media EU S.à r.l.
  • Language: English
  • ISBN-10: 1849696837
  • ISBN-13: 978-1849696838
  • ASIN: B00DL0CFI6
  • Text-to-Speech: Enabled
  • X-Ray:
  • Average Customer Review: 4.0 out of 5 stars  See all reviews (3 customer reviews)
  • Amazon Bestsellers Rank: #378,000 Paid in Kindle Store (See Top 100 Paid in Kindle Store)
  •  Would you like to give feedback on images?

Customer Reviews

4.0 out of 5 stars
4.0 out of 5 stars
Most Helpful Customer Reviews
3 of 3 people found the following review helpful
4.0 out of 5 stars Mostly a good book 3 Oct 2013
By John
Format:Kindle Edition|Verified Purchase
Summary : It's a decent book if it's what you need.

The "Game Development" part of the title is the important part here.

This is a book about how to write 2D graphical games, not a book about SDL. It shows you how to use SDL to create a window and how to draw things into textures and to the screen but that's about all. So if you want to learn the details of SDL then this is not really the book for you. It does cover everything you'd need for the games they are developing so it's not bad, but it's absolutely not the focus of the book at all. It doesn't cover much of SDL at all.

What it is is a book about writing 2D games, and specifically how to organise your c++ code in the right way. It's a very code heavy book with a lot of explanation of the code. It assumes a decent but not advanced knowledge of c++. It explains some aspects of c++ but if you don't know at least the basics of object oriented programming you might be lost.

If you know a little c++ are interested in seeing how to make games using c++ and want to use SDL then this is probably a good book for you. The focus is very much on the code you need to make a game work and it has lots of good examples. There is a great deal of good stuff on how to create well designed data structures in c++ for the things you need in a game, and how to use them in a game. The detail is pretty good with specific code for everything.

There are some problems with the code. The author seems very overly fond of using "new" to allocate objects that would be much better placed on the stack or as value object, and there seem to be a lot of places where there are memory leaks due to not deleting the memory.
Read more ›
Comment | 
Was this review helpful to you?
This book helped me a great deal. I understood programming with C++, and a bit of SDL, but I was completely lost on how to get started programming games.

If you have a good understanding of C++ and want to use that knowledge to program games, this book is a must buy!
Comment | 
Was this review helpful to you?
3.0 out of 5 stars Good but falls short 31 Mar 2014
By Vincent
Format:Paperback|Verified Purchase
The book seemed to be the answer to getting a foothold into SDL 2 and while it does provide a means to develop a useful framework using SDL 2 it isn't a great learning tool and more like a way to enhance your current SDL 2 understanding or to help switch over from SDL 1.

My main complaints about the book are its inconsistencies, one moment its leading you by the hand only to suddenly assume you know certain aspects, the book code is incomplete and assumes knowledge of the part of the reader at odd points.
You wont be able to simply follow the book and type in the code as presented as the author expects you to fill in the basics on your own.
The code in the book and the sample code * also have some minor variations that also reflect the inconsistency of the book.
* sample code and assets are provided in a download link after registering with the publisher, no physical copy of the sample and assets is included.

It does however provide a means to creating a framework you can make and gain insight into coding in C++ and SDL 2, and as such has some good value.
It is just a shame it seemed rushed, and the sudden assumptions and inconsistency leaves the reader doubting the effect of the material.

It is useful but be aware you will need to have a good idea of the material covered before hand, not for the complete novice.
Was this review helpful to you?
Most Helpful Customer Reviews on (beta) 2.9 out of 5 stars  14 reviews
12 of 12 people found the following review helpful
3.0 out of 5 stars Good ideas, but lacks polish 1 Sep 2013
By Greg - Published on
Format:Kindle Edition|Verified Purchase
Let me preface this review by saying that I'm currently halfway through the Kindle edition of this book, and I'd like to give you my thoughts thus far. The book succeeds in teaching you the fundamental ideas of how to build a solid, reusable framework for a game written in C++ using SDL 2.0. However, the book's code is riddled with bugs! Granted, most of them are simple syntax errors that can be easily fixed if you have some experience programming in C++ and know your way around a debugger, but recently I ran into a pretty major bug in the "Finite State Machine" chapter where, the way it's currently implemented, the program tries to access heap memory that has already been freed. I haven't yet found a simple fix for this, and I'm in the process of redesigning the way the FSM is implemented. In other words, if you simply copy + paste most of the book's code into your editor and compile it, it will not run! I also have a couple other minor gripes. His explanations of C++ concepts are pretty worthless; for example, he explains what the "::" scope resolution operator is about a quarter of the way into the book after using it in his code countless times up until that point. Also, the formatting in the Kindle edition is a bit wonky, but that's to be expected.

In summary, the book provides a good foundation for writing games with SDL, but the implementation of that foundation isn't quite there. HEED THE BOOK'S WARNING that it is NOT a beginner's guide to C++! BE FAMILIAR with data structures, polymorphism, inheritance, function overloading, pointers, callback functions, and debugging! I bought the book because SDL 2.0 is still relatively new and there aren't that many complete online tutorials available yet. If you have the patience, it might be better to wait for people such as Lazy Foo to finish their online SDL 2.0 tutorials. Otherwise, be prepared to sift through the bugs!
5 of 5 people found the following review helpful
3.0 out of 5 stars SDL 2.0 book 3 Oct 2013
By Sean Welgemoed - Published on
I'm currently half-way through the book, it's good for someone who's learnt at least all of the intermediate -> advanced fundamentals of C++.

However, throughout the book you'll find some mistakes (some minor, some can be seriously major) and things can get pretty complex pretty quickly without proper explanation. I'd recommend going through the book twice if you need a full understanding of how to create a pretty basic engine in SDL2.

The mistakes can become a little bit annoying and can slow down progress very quickly though. The very first mistake is inside a singleton for the texture handler, they neglected to show that you needed a private variable: static textureManager *s_pInstance; -you could have puzzled this out by yourself too.


I have now practically finished the book and I have removed a star. Why? Because I feel this book really bulks up on methods to learn then completely changes them as chapters go along (the states are a good example of this). You'll end up going through thinking this is the way to do things and then he suddenly switches over. I feel Shaun could have explained certain things a hell of a lot better (the state parser and why he put code together the way he did).
4 of 4 people found the following review helpful
2.0 out of 5 stars Not for a beginner; needed a competent technical reviewer. 10 Nov 2013
By talonius - Published on
Format:Paperback|Verified Purchase
First, this book is not for someone who is inexperienced. As other reviewers have pointed out, the code is riddled with bugs and/or incomplete when based solely on the text of the book. This is frustrating because he moves at a pace I could enjoy, but I end up spending more time fixing the code he presents in order to see how it works than I do learning how SDL works itself.

As a for instance, consider the code from Chapter 1. He walks you through how to do something, then redesigns it, then redesigns it again. The placement of global variables changes but there's no mention of it. Then there's the definition of Game.h with function bodies but never any mention to remove them when he creates the real functions a short bit later. All are very simple bugs that any technical reviewer would have caught, but they end up distracting you from the primary purpose of the book.

Last, but not least, let's not discard the entire conversation around the recent SDKs and how to fix SDL to compile with one instead of the DirectX SDK from June 2010. In short, if you are desiring to compile with the most recent Windows SDK (as DirectX as a separate concern has been retired by Microsoft) install the new SDK in its entirety and comment (or remove) the #include <dxsdkver.h> in DirectX.h. In _my_ version of SDL 2, this is line #35.

TL;DR: Not for a beginner (as noted), good pace, very sloppy code that distracts.
1 of 1 people found the following review helpful
4.0 out of 5 stars SDL 2.0 book review 2 Oct 2013
By S. Powley - Published on
Format:Kindle Edition|Verified Purchase
I bought the Kindle version because of the price and as there are very few resources available for SDL 2, I jumped on this purchase. I'm less than halfway through working through the examples.

I'm usually pretty good hacking / debugging the source and getting them to work ( / lazyfoo), but the chapter code examples here are a little incomplete in my opinion. While it's pretty easy figuring out most of the "#include" statements, I'm stuck trying compile one (the Game singleton SDL_Renderer). It would be nice to have the source available for ALL the chapters, not just the resulting framework and resources.

There's a fair number of memory leaks too..which I guess is okay for the earlier chapters.

Learning C++ over the last 2 years, these examples help reinforce a lot of concepts in a practical and fun way. Maybe "fun" is the wrong word, but it beats formatted "cout" results. Definitely intermediate+ level.

Looking at what's available in the source download, I believe I will still get a lot out of this book and I would recommend this.
2.0 out of 5 stars Not explained very well 24 July 2014
By G. Scott - Published on
I'm trying really hard to like this book. It does an OK job of explaining SDL, but it's practice is horrendous. The source code for the book shows only finished products, most of which doesn't contain the code you're actually writing throughout the book. Most of the code you learn throughout the chapters goes completely unexplained. For instance, after learning the initialization process and showing different ways of rendering textures to the window, he begins to show how to use objects for the different processes you've written. This involves taking code you've already written and using instructions like "now put these two lines in your Game.h file". Your Game.h file is now 75 lines, where the heck is it supposed to go? There's no additional lines showing a reference of where to put it, it just says put it in there. The book is filled with examples like this, and has left me spending more time trying to figure out how to make his code work than actually learning the SDL process.
Were these reviews helpful?   Let us know
Search Customer Reviews
Only search this product's reviews

Customer Discussions

This product's forum
Discussion Replies Latest Post
No discussions yet

Ask questions, Share opinions, Gain insight
Start a new discussion
First post:
Prompts for sign-in

Search Customer Discussions
Search all Amazon discussions

Look for similar items by category