email me at borlaj@portlandschools.org

Loading
notes previous (14/<14) submit the dump links  
 

Frogger

 

You are going to make a very simple version of frogger. See here. (here are past versions v1, v2, v3 )

Start with this project and open it up.

 

There are 4 classes in the zip:

  • Bar which is the class for the bars that go back and forth. Look at the notes in that file. You have methods that must finish of that class.
  • BarTester which allows you to test the Bar class. It is just for practice purposes.
  • Frogger - In this class you will have an array of at least 5 bars and create one frog. Call move, draw, isCollision for each bar. I already put in code for the keys in for frog.
  • Frog that has some basic methods like moving and drawing but w/ no code.

Implementation notes:

  1. Get bar working. Run using bar tester.
    • Have it move left and right
    • Have it have a direction that it picks randomly (so it will initially go left or right)
    • Random color ? (not necessary, might be nice)
  2. In BarTester, get multiple bars working. USE AN ARRAY. Have atleast 8 of them. The only difference will be there y location.
  3. Get the frog moving around the screen.
  4. Bring the bars from BarTester in to Frogger

 

Due: Tuesday 12/19

Rubric 20 points:

  • Indented (1)
  • Variables are named appropriately (1)
  • Bar Class is correct (5 points)
    • Constructor initalizes a bar with randomX, randomColor, random speed, random direction (.5 each)
    • Bars moves correctly (1)
    • Bars is drawn correctly (1)
    • Collision is detected correctly (1 point)
  • Frogger Class makes game happen (6 points)
    • Initializes at least 5 bars (1 point)
    • Moves and draws bars (1 point)
    • Moves and draw frog (1 point)
    • Looks for collision each time (1 point)
    • Game stops on collision (1 point)
  • Frog Class (4 points)
    • moves frog in appropriate direction (2 point)
    • keeps frog in bounds (1 point)
    • draws frog (1 points)
  • Score is kept (each time they make it through, score increases) (2 points)
  • Difficulty increases in some way (maybe faster bars, more bars, etc) (1 point)

 

 

Hints:

Advanced people must have this:

 

I really want good game play to be your goal.

Rubric for those advanced people

Good game play (1 points)

At least one of the following: (1 points)

  • Reset button
  • Logs
  • Other things

To add a reset button - look at the gui page