EECS 1720 Lab for Week 12 - Mar 31 & Apr 1, 2016
In this lab, your task is to understand and possibly modify a Java
project that implements a shooter game app and follows the
Model-View-Controller (MVC) pattern. The app is in the following
Eclipse project archive
1720_W16_Lab12.zip.
Download the file and import it into Eclipse as a project.
First run the app by invoking AppDriver.java
. You can
shoot by pressing the space key. You can move the shooter using
the arrow keys. You can also rotate it by using that period and comma
keys.
Explore the project code to answer the following questions:
- Look in the
sprite
package.
What kind of sprites are there? How are the classes organized?
- Where are the target sprites created?
Try changing the number of target sprites created.
- Where are the projectile sprites created?
- How is a collision between a projectile and a target detected?
How is the target destruction implemented?
If you want, you can learn more about this shooter game app by performing the following tasks:
-
Modify the code to keep a count of the number of targets shot successfully.
Display the count on the console every time it changes.
-
Modify the code further to keep a count of the number of projectiles created, and of the shooter's success rate, i.e., the percentage of projectiles created that destroy a target.
-
Change how the target sprites move.
This lab is not graded. There is no need to sign up or submit.