Chapter 12
Advanced Input Handling
In this chapter, you will create a more advanced input handling mechanism. At the same time, a few important programming concepts, such as arrays and dictionaries, will be introduced. In the Painter game, input handling was rather basic. You only kept track of the last position that the player touched. For Painter, that was sufficient since the player plays the game using a single finger. In more complex games, this basic method of input handling is not enough. In particular, in Tut’s Tomb, the player may use multiple fingers to drag objects over the screen. In this chapter, you are going to extend the InputHelper class and make it suitable for handling multitouch input.
Creating a Touch Object
The main issue ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access