Publisher: Pragmatic Bookshelf
Audience: Beginners to programming looking for a games-led approach
Reviewer: Mike James
Perhaps the most important of these is motivation.
While you can set abstract exercises in a language for students that have made the decision that learning a language is worthwhile - this is not something you can do with kids. You have to demonstrate fairly quickly that this stuff can do things - real things.
The first chapter introduces the ICE online code editor which makes it possible to start writing code with nothing to install. Even in this initial chapter the reader is writing code that produces some simple shapes and then animates them. Of course there is a lot of boiler plate generated code present in the editor to set the 3D environment up and this might worry any young beginner with a need to understand everything. As long as this isn't a problem then drawing shapes introduces ideas like coordinates and other facts of geometry - but actually not a lot of code ideas.
Chapter 2 goes on to what happens if you make a mistake - basically it's about not panicking when you see a big red X. Chapter 3 gets on with developing the ideas started in Chapter 1 and you create a simple avatar. Admittedly the avatar is just a few spheres arranged appropriately, but at this stage who cares! By the end of the chapter the idea of geometric objects moving together or relative to each other has been established.
The next chapter moves on to dealing with user input. Keyboard events are introduced and now we are starting to use lots of if statements. The if statement is introduced without any fuss and it is so low key that the average read could even miss the fact that they have just learned one of the foundations of programming.
Chapter 5 introduces functions and this is where things could get complicated. It doesn't because the function is just a way of grouping together code so you can reuse it without having to type it all over again. Again the reader could well miss the fact that this is a key idea in programming - does this matter? Probably not.
If you make it to Chapter 8 then you are probably going to, if not necessarily make it to the end of the book, master programming. The majority of the remainder of the book is about 3D graphics techniques - geometry, animation, collisions and so on - but of course in going through all of this you are learning how to code.
After Chapter 17 the book cruises to its finale at Chapter 21 through all sorts of games and game facilities. Along the way it covers a lot of programming ideas and a lot of 3D graphics techniques.
This is a book that doesn't teach you to program, instead it provides things that you want to do that need you to know how to program and it explains those things as it goes. Sometimes it gets the level wrong and you think - "why explain this here" or it doesn't go deep enough at a point where you think that this would be a good place to get some theory across. You have to put up with this as this isn't a theory-oriented book that goes through the standard motions of learning a language.
Recommended as long as you are not looking for an academically correct introduction to a programming language.
Oh and did I mention it's a lot of fun.