Summary

This chapter was dedicated to mobile development with the new HTML5 APIs available. We talked about the huge opportunity for game developers in the open web platform with regards to mobile devices as well as some of the main challenges associated with it. We talked about some best practices with mobile web development, which include degrading gracefully and enhancing progressively, designing for all finger sizes, saving battery life wherever possible, planning for offline game play, and offering a desktop version of your application.

The final two APIs presented in this chapter were CSS media queries and JavaScript touch events. Media queries allow us to check for other properties of the user agent viewing the document, such as viewport width, height, resolution, orientation, and so on. Depending on the properties set on the user agent executing our application, we can use media queries to load different CSS rules and documents, effectively modifying the document style at run time. The new JavaScript touch events are different from mouse events, in that multiple touches are allowed at the same time as well as pressure detection, touch size, and rotation angle.

Now that you have been introduced to the new features of HTML5, including the latest CSS and JavaScript APIs, the next step is for you to get some keyboard time and start developing your own games for the largest and most exciting computing platform of all time—the open web. Happy gaming!

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.221.123.73