Chapter 4: Gesture Input

Professor Parse

In this chapter, you'll defend a garden by squishing bugs, and you'll learn that the mouse and the touchscreen are not one input, but several. The big idea is that a tap, a drag, a swipe, a long press, and a hover are all different gestures, and each one is a good fit for a different kind of action.

I'm still writing this chapter, step by step. In the meantime, you can play the finished game, and read the code and the assets that make it, so that you can run it and change it yourself.

Play the Game

The code that makes it:

The assets, which go in an assets folder next to the game: