Chapter 6. Advanced input and events
This chapter covers
One day, you pick up your calculator, having made yourself several games and programs. You’ve shared them with your friends, and they think you’ve done a good job. You’re frustrated, though, because the games aren’t very interactive. You want something more immersive, where you move a hungry mouse around the screen, trying to collect pieces of cheese. You want to make the game challenging, so you need to add a way to lose: you add a hunger bar. You decide that the hunger bar will gradually fill and that the player will lose if the hunger bar fills up. In sketching out your game, you envision something like the screenshot in figure 6.1, with a moving mouse (M) chasing a piece of cheese (square).