Main image of article Book Review: "Beginning Facebook Apps Development"
Facebook launched its game platform five years ago and the world of casual browser games has never looked back since then. Most Facebook games are still written in Flash, for example, Farmville and Top Girl, with the remainder being html strategy games without moving parts. But the games world is now starting to say goodbye to Flash and is looking to HTML5 and JavaScript as the future of online games. Facebook author Wayne Graham has released another how-to book that delves into Facebook game development using HTML5, JavaScript and CSS3. Graham, whose work includes "Facebook API Developer's Guide" in 2008, has now released "Beginning Facebook Apps Development" to cover the shift away from Flash. The book targets developers with some JavaScript and PHP knowledge, beginning with an overview of the various game genres followed by a quick intro to JavaScript. You won't learn JavaScript from this book alone, but it will point you in the right direction. Learning the Ropes Things start getting technical in Chapter Three, which addresses canvas and drawing graphics on web pages. This is the big addition to HTML5: the graphics canvas plus the JavaScript functions needed to draw on it. This is what makes "Flash-like" games possible. But that knowledge alone won't let you create a game. For that you need a plan, a way to take your game idea and end up with a design, which is the subject of Chapter Four. Once you have a plan, Chapter Five covers the tools you'll need to gather for graphics and sound. While the information on sound and audio was good, the rest of the chapter on drawing graphics felt a bit out of place.

Creating a Game

Things improve in Chapter Six, where you get to create the first game - a space invaders clone. A minor criticism at this point, however, is the author used OS X to develop the book and the game software. There's nothing wrong with OS X but it might have made sense for the publishers to get someone to add Windows instructions as well. This is a big chapter with lots of source code listed. Social Gaming is the subject of Chapter Seven, but it's the next chapter where the book begins to shine. Facebook applications consist of server code running on your servers which generate the output and send it to Facebook. This chapter covers a lot of technically heavy subjects, such as Facebook Graph API, Facebook Query Language and Facebook Software Development kits. Next you learn how to use the Facebook developer tools, particularly how to setup your game to take Facebook credits. There's a working example with Alien Turtle Invasion. The level of information here is pretty good, certainly enough to get you started and also includes how to deal with disputed payments. Got Game? In Chapter 10, you get to create a full Facebook game - a sliding puzzle using photos uploaded by friends. The first part details the game client and then follows up with Facebook integration in Chapter 11. The game is created using the popular JQuery JavaScript toolkit for the front end and PostgreSQL with PHP running on Heroku for the backend. This is one of the best chapters in the book, because it also shows you how to track and assign Facebook achievements, deal with the privacy policy, and terms of service. Chapter 12 is about launching your game, which is not just on the technical side but also how to make your launch reasonably untroubled and steps you should take to advertise and get new users.  In Chapter 13,  some HTML5 game engines are listed with their pros and cons. And, finally, the last chapter delves into creating another game using various game libraries. In conclusion,  I rate 4.5 out of 5. If you want to start developing Facebook games it's probably the best out there and, more importantly, it's up to date. Because Facebook's APIs have rapidly changed over the last three years, a lot of existing books are probably now obsolete.

Related Links