The game
As we discussed at the beginning of this chapter, there are several considerations that must be kept in mind when designing and building a game to be played on a mobile device as well as on a desktop browser. As we write this final game in this book, we will apply those principles and best practices making a game to be playable on both a mobile device and an HTML5-ready browser.
The approach taken in this particular project is to design for desktop first then add mobile-specific APIs and functionality later. The number one reason for this decision was because it is much easier to test and debug an application on a desktop browser using existing tools and common practices, then add the things needed to make the code run smoothly on mobile as well.
The final game is a traditional two-dimensional space shooter, where the player controls a single ship that can move around the screen and always shoots up in the same direction. Random enemy space ships come from all sides of the screen...