Introduction

Up to this point this book has treated the word mobile as referring primarily to a form factor (small screen) and an input mechanism (touchscreen). A third major aspect to mobile devices is that they are portable, and thus the user’s location can be made into an interesting aspect of game play. This chapter examines the support to determine a device’s location, known as geolocation, which is available in one of the HTML5 families of specifications, and discusses how you can use it in games.

Get Professional HTML5 Mobile Game Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.