Introduction
In this chapter, we are going to look at the various ways you can control your PlayStation Mobile device. The PlayStation Vita includes touch sensors, a full d-pad, two analog sticks, motion sensors, and more. It has to stay compatible with other devices, so features such as the rear touch panel are not supported. Not all devices support all of the PS Vita's features; in fact, most do not. This is especially true regarding physical joystick support. Fortunately, Sony has provided a tool for making onscreen controls, which we will cover shortly. The onscreen controls are built directly into the PSM virtual machine; you simply configure the screen layout the way you wish to see it appear.
There are, however, some limitations, especially when it comes to what you can do in the simulator. For some of these recipes, you will require an actual physical device to test them. I will point out at the beginning of each recipe if there are special requirements.
You may also notice, examples in this chapter make use of the GameEngine2D framework. This is done to cut down the length of example source listings. As you may have seen from the recipes in Chapter 1, Getting Started, without using the framework, accomplishing some rather simple tasks can take a fair bit of code. Do not worry; we will cover GameEngine2D in greater detail in future recipes.