Java recreation of classic 1981 arcade game “Frogger.” I coded the game using Java in IntelliJ and painted the assets were drawn in Photoshop. Java Swing was used to build the GUI.
The object of the game is to use the arrow keys to move three frogs, one at a time, from the bottom of the screen to the Lilypads at the top. This necessitates crossing car-filled streets and hopping on logs to avoid water.
Below is more information about the features and implementation of the game:
- I used File I/O to enable persistent state between game runs. Frogger stores the frog’s positions, the positions of the current obstacles, and the game state including lives and how close the user is to winning (number of frogs delivered).
- I leveraged inheritance and subtyping to create the game’s “strips”, in which I used an abstract strip class and its implementations to model the game’s streets, rivers, and Lilypad aisles.
- JUnit tests are used to verify that the game state is functional, including checking the interactions between the frog and the obstacles, as well as the state of the game.
- Linked lists are used to model the obstacles in the strips (i.e. cars, logs, and Lilypads).