Animating, keyboard and mouse events

We will continue on Chapter 10 which is more animating but also looking at how to interact with keyboard and mouse events, follow along if you get a little lost:

Since I will be away for Wednesday (and Friday for the Field Trip), I will give you your next assignment now).

Create one program that has the following:

  1. Create at least two different functions that draw an object to the screen. For example, draw_bird or draw_tree. Do not draw a stick figure, we did that one already. Create your own unique item. Do not simply draw a circle or rectangle. Draw a train, or cloud, or house, T-Rex or whatever. But minimal work = minimal points. If you created your own object in the create-a-picture lab feel free to adapt it to this lab.
  2. In Chapter 10, we talked about moving graphics with the keyboard, and the mouse. Use both to control two different items that you have drawn on the screen.
  3. In the case of the keyboard, make sure to add checks so that your object does not move off-screen and get lost. Remember you can’t just reverse the direction like the bouncing rectangle.

The assignment is due next Wed Mar 6.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s