Book Image

PhoneGap 3.x Mobile Application Development HOTSHOT

By : Kerri Shotts
Book Image

PhoneGap 3.x Mobile Application Development HOTSHOT

By: Kerri Shotts

Overview of this book

<p>PhoneGap allows you to use your existing knowledge of HTML, CSS, and JavaScript to create useful and exciting mobile applications.<br /><br />This book will present you with 12 exciting projects that will introduce you to the dynamic world of app development in PhoneGap. Starting with their design and following through to their completion, you will develop real-world mobile applications. Each app uses a combination of core PhoneGap technologies, plugins, and various frameworks covering the necessary concepts you can use to create many more great apps for mobile devices.</p>
Table of Contents (21 chapters)
PhoneGap 3.x Mobile Application Development HOTSHOT
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Implementing the Game view


Next, let's write the code for the Game view. We won't cover all the code—there's a good amount of it that should be familiar, and there are some portions that we'll break out into additional sections. When we're done with the project, we'll have a view that looks like the following screenshot:

Getting on with it

First, let's get the template out of the way (in www/html/gameView.html):

<html>
<body>
<div class="ui-container">
<div class="game-content-area">
<div class="game-overlay">
<div class="game-left">L</div>
<div class="game-right">R</div>
<div class="game-message">%TAPTOSTART%</div>
<div class="action-group">
<div class="game-action button">%START%</div>
<div class="game-back button">%BACK%</div>
</div>
</div>
<canvas class="game-canvas"></canvas>
</div>
</div>
</body>
</html>

Again, there's nothing terribly difficult...