Homework Assignment 6 - GUI Frogger Game

Due: Friday, March 31, at 11:59 PM

Introduction

This assignment asks you to design and implement a GUI Frogger game. As a starting point, you may want to use some of the Image and audio Clip code discussed in class (I've collected these examples at hw6_Starter_Files.zip). A description of Frogger with minimal requirements are given below.

I encourage you to look at past programs (e.g., MemoPad, CannonGame, etc.) as examples of how the GUI components work. Your best reference might be to read chapter 13 on the AWT API, or the Java API specification at the Sun web-site.

Be sure that your submission follows all homework submission requirements.

Required Specification for Frogger:

In this game, you control a frog that is trying to cross a busy highway (at least 4-lanes with two in each direction). Each lane has cars or trucks zooming by. The vehicles in a given lane all travel at the same speed, but vehicles in different lanes may travel at different speeds. The goal is for the user to get the frog across the highway without it getting squished.

The user is in control of a frog. The frog can be controlled in any reasonable way. I'll probably use mouse events. Clicking in front of the frog moves it forward one hop (one hop is the width of a lane of traffic), clicking behind moves it backward, and similarly for clicking to the left and right of it. However, you are free to use other input methods to control the frog, such as keyboard events.

If the frog does get squished it should display an "OUCH!" message at the bottom of the screen, and produce an appropriate sound effect. The user should be able to restart the frog from its original starting position by clicking the mouse once in the area below the lanes of the highway, or having a "Replay" button.

Your game might look something like:

Extra Credit Features for Frogger:

You are to submit electronically and on paper :