Your instructor will assign one or more of the following
problems. Submit all appropriate files for grading, including code
files, screen captures, supplemental files (e.g., image files), and
Write an animated gopher-type game in which the program
displays a circle at a random location on the screen, waits for a
while and then moves the circle to another location. If the user
clicks on the circle, give them a point, otherwise, give them no
points. Display the user’s score at all times. See an
example on the right.
Note that because of the way Processing handles the
methods, you cannot easily implement the waiting behavior by
setting a slower frame rate. Processing will call
first, thus moving the target before it calls
Extra Credit: As an extra credit exercise, you
can change the target to a more sophisticated composite figure of
some sort. You’ll need to modify your point system to
determine when the user has clicked on any part of your new
Write an image choosing application similar to the one
shown on the right. The system presents the four images on the
left and allows the user to select the one that should be
displayed on the right.
Write a simple game called
that attempts to move a figure to
a target using keys. Your solution should satisfy
Extra Credit: This assignment has lots of room for extensions, which are encouraged. For example:
- Use the keys 'a' for left, 'w' for up, 's' for down, and 'd' for right
- The figure should begin in the center of the screen
- The target should be in a random location on the screen
- If the figure touches the target, the words "You Win!" should
appear in the top corner of the screen and the animation should cease.
Feel free to add as many extensions as you'd like, but there is a maximum 10% extra credit.
- Instead of using circles for the target and figure, use a more elaborate composite figure for each.
- Add an obstacle that appears randomly on the screen. If the figure is touched by the
obstacle, print "You Lose!" on the screen and stop the animation.
- Add a maze component that limits the directions that the figure can move.
Submit all appropriate files for grading, including code files,
screen captures, supplemental files (e.g., image files), and text
files. We will grade this exercise according to the following
- 40% - Basic animation - Include the basic animation or
- 40% - Selective behavior - Include the required selective
- 10% - Conciseness - Use clear, concise and efficient
selection statements and logical conditions.
- 5% - Code Documentation - Separate the logical blocks of
your program with useful comments and white space.
- 5% - Header Documentation - Document the code’s basic
purpose, authors and assignment number.
- Extra Credit: up to 10% added to your score
If you work in teams for this homework assignment, be sure to
submit all team members’ names in the code documentation.