CIS 554 Elm assignment: Frogger
Fall 2014, David Matuszek

Purposes of this assignment

General idea of the assignment

Frogger is a classic video game. Your assignment is to implement a simple version of the game, minus most of the hazards.

The player's task is to maneuver five frogs, one at a time, across a busy two-lane highway, and put each frog into one of five "frog homes" at the top of the screen.


A frog starts near the bottom center of the window. It responds to arrow keys; → tells it to turn 90° clockwise, ← tells it to turn 90° counterclockwise, and ↑ tells it to jump forward in the direction that it is currently facing. The frog does not respond to ↓ key presses.

The highway stretches horizontally across the screen; it is just a gray rectangle with a yellow stripe down the center. Cars appear randomly and move along the highway, using the right-hand lane. All cars move at the same speed.

The highway should be two "frog jumps" wide. That is, after the frog moves close to the highway, one jump should take it into the near lane, a second jump should take it into the far lane, and a third jump takes it to safety. Then the player maneuvers it into an unoccupied frog home, and another frog appears.

However, if the frog encounters a car, the frog turns into a permanent red spot on the highway. The car is unaffected and continues on its way, and another frog appears at the bottom of the window.

The game should get progressively harder. You might make the cars faster, or more frequent, or both. The game ends after five frogs have attempted the hazardous crossing. Do something to indicate that the game is over.

Here are some images you can use.

Due date

Turn your assignment in to Canvas before 6am Wednesday, November 19.