Assignment 2 - Transformations, Loops, Logic


Due at 11.59pm, Sunday, October 9th.

There is no late policy for this course!

If you do not complete the assignment by the deadline, you will receive 0
You will be excused pending discussion with your TA

Create a separate sketch for each part of the assignment.


In this assignment, you will give life to your character by animating it. Then you will give your character the ability to move around screen.

Part 1 - Animation

Create a new character or use your character from Assignment 1.
Separate your character code and scene code into two methods.
Draw your character in at least two different states.
Add a parameter to your character method to keep track of which state it should display.


Part 2 - Animation and Movement

Declare global variables to store: x, y, and velocity x, y for your character.

Initialize your character movement variables inside the setup method.
Choose your own starting location.

Move your character based on their given velocity.
Reverse direction when your character hits a wall.


Part 3 - Looping it up with Arrays

Choose a reasonable amount of characters for your scene (8-12).
Each character will have movement, wall collision, and animation.


Tips and Tricks