2014 | OriginalPaper | Chapter
13. Adapting to Different Devices
Published in:
Building JavaScript Games
Abstract
This chapter deals with adapting games to different devices. Until now, you’ve been developing examples that will only work on devices that have a keyboard and a mouse, such as laptop or desktop machines. One of the nice things about JavaScript programs is that they also run on smartphones and tablets, which currently is a booming market. Making your games run on such platforms will result in a lot of extra players for your games. In order to play games on smartphones or tablets, you need to handle touch input, in a way very similar to dealing with keyboard and mouse input.