Touch screen controls

Some modern touchscreens are capable of tracking as many as 10 individual points of contact. Nevertheless, a simple set of single-finger taps and swipes can usually get you a long way. It's recommended to not rely on more than 4 fingertips as going above that number increases the chances of misinterpreting the input and reduces the number of compatible devices. A touch interface can provide you with:

  • A unique ID for each contact point.
  • The origin of contact (starting position).
  • Current position.
  • Change in position and time since last update (used to track movement).
  • Status since the last frame (touch started, moved, stationary, released and canceled):
    • Cancellation can happen if more than 5 inputs are detected simultaneously ...

Get Practical Game Design 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.