Game Development Reference
In-Depth Information
opportunity to supply the bare minimum touch controls to satisfy tablet users and encourage
them to use something better, like a game controller. We'll explore this and more in the next
few sections.
WHAT IS A TOUCH-FIRST EXPERIENCE?
In Windows 8 design terminology, you will hear the term “touch-first experience” a lot. Windows
8 was built from the ground up to support touch input as the primary means of input, followed by
a mouse and keyboard as secondary input. This has a lot to do with the shift from traditional
desktops and laptops to tablet computers. The good news is that a mouse and a finger work simil-
arly, so if you think touch first, a mouse will always work. Of course there are special cases where
this may not always be true, especially in games.
The real thing to keep in mind when building any HTML5 game is how it will be controlled. I
design most of my games to work with a single touch or mouse click control when possible. This
way my games will always work in a browser and also on mobile devices. Because of this, I am
able to get my games running with no modification on Windows 8. Unfortunately, this may not al-
ways be the case.
NOTE
You can learn more about touch-first experience for Windows 8 here .
Working with Traditional Input
When I refer to “traditional input” I am talking about a mouse and keyboard. That's because
the majority of computers out today have a mouse and keyboard. Touch-enabled devices,
such as phones and tablets, are relatively new, especially when it comes to HTML5 games. If
your game supports a mouse and keyboard, you will not have to change a thing in your code.
Simply listen to keyboard and mouse events like you normally would in a browser. Just re-
member that if you rely too heavily on the keyboard you are going to want to offer up some
additional touch-centric controls for tablet users in order to pass Windows Store certification.
Search WWH ::




Custom Search