A Maze Game
In Project 5, you stamped shapes based on your mouse’s position, and in Project 7, you created a simple sketch to display typed text. Both projects relied on user input, and for the next few chapters, we’ll explore more input options, organized by the types of peripherals you can use with your computer and their level of difficulty.
You met event functions in Project 8, but so far, you’ve used only the mouse. In this chapter, you’ll tackle the keyboard! First, I’ll introduce you to a new keyboard variable as well as some keyboard event functions. Once we’ve covered the basics, you’ll write a maze game that players can navigate with the arrow keys. You’ll use your knowledge of if() statements, image processing, and incrementing and ...