Book Image

HTML5 Game Development by Example: Beginner's Guide

By : Seng Hin Mak
Book Image

HTML5 Game Development by Example: Beginner's Guide

By: Seng Hin Mak

Overview of this book

Table of Contents (18 chapters)
HTML5 Game Development by Example Beginner's Guide Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
9
Building a Physics Car Game with Box2D and Canvas
Index

Building with the PhoneGap build


There is another option to build Android and iPhone apps from web apps—by using the PhoneGap build service. The service allows you to upload a ZIP file of the web game. Then, it uses Web View to display the HTML, similar to our previous Web View examples.

The difference is that PhoneGap provides several hardware resources via its JavaScript API. Since our game hasn't used any PhoneGap API, it gives pretty much the same result as wrapping the Web View ourselves and building using the PhoneGap.

If you don't have any native programming experience, PhoneGap or a similar cloud building service is a good choice. If you are comfortable with native development environment, I prefer wrapping the Web View myself. This provides more flexibility for future development in case we need to mix native and Web View to make it a hybrid application.

Note

Besides a PhoneGap build, there are other services that try to put HTML5 games into the native app platform. CocoonJS (https...