Game Development Reference
In-Depth Information
Chapter 4. Handling Game Controls On
Windows 8
When it comes to game controls for Windows 8, things can get a little overwhelming if you
don't have a plan in place when porting your game. If you remember back to Chapter 1
where we reviewed the different Windows 8 device form factors, you may recall the diversity
of Windows 8-capable hardware. With that in mind, the following input options could be
available at any time to control your game:
▪ Mouse
▪ Keyboard
▪ Touch
▪ Pen
▪ Game Controller
▪ Accelerometer
Luckily, if you are coming over with an existing HTML5 game, chances are good that you
are already using keyboard or mouse controls. In special cases, if your game was designed to
run on mobile multi-touch, you may be ready for multi-touch on Windows 8 with a few
minor modifications to your code.
The good news is that, if your game only uses the mouse, as in a single-input method,
chances are good that you may not have to change a thing. We'll get into this more when I
discuss touch-first design. If you are using a keyboard, you may need to offer up additional
controls on touchscreen devices. Usually, this is done with a virtual D-pad and buttons or a
virtual controller stick.
Either way, it helps to take some time out to really think through the best controls for your
game. Bad controls on a game could easily ruin an otherwise amazing creation. Since you are
porting the game over to Windows 8, you don't have to make concessions and have a great
Search WWH ::




Custom Search