Skip to content

A game of twists and turns where the player tries to find the exit of the laborinth.

Notifications You must be signed in to change notification settings

jgillham/Lab-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Labyrinth Maze

Resources

Download Git Client: Windows, Mac

Git: Git Book, Git Reference, Git Advanced Tricks

WHO ARE WE:

We are the Intermediate Game Programming Group at Metropolitan State University of Denver.

CONTRIBUTING:

Checkout our forum to see where we are going with this project.
Anyone is free to contribute. Just follow the steps below:
1. Fork the project.
2. Clone your fork.
3. Get to work.
4. On the fork click pull request.

Alternatively:

  1. Download the source.

2. Get to work.
3. Submit your work to this address.

I welcome you to become part of our google discussion group. We will discuss new features, concerns, and bugs. You can also be a decider of our next game project. Find us here.


DESCRIPTION:

The goal will be to find the exit of the maze. The player will use the arrow keys to navigate the twists and turns. The player wins when they exit the maze.


The GUI will show 9-tiles with the player's character at the center tile. The outer 8 tiles represent the surroundings of the player. As the player navigates through the maze, the GUI will show the tiles changing.


FEATURES:

-Exit the maze.
-Use the arrow keys to navigate.
-9-tile GUI display.
-Restart the game after winning.

CLASS SUMMARY:

Logic

-Accepts a move if valid and commits it into the game.
-Calls a GameEvent when the game has been won.
-Calls a GameEvent when the player has moved.
-Places the character into the starting position at the beginning of the game.

Maze

-Gets a list of possible moves.
-Information is stored as a 2D Wall array.
-Loads a maze from a file.
-Checks if a coordinate is within the bounds of the maze.

Character

-Contains the current position in the maze.

TileArtist

-Draws/updates the map tiles on the GUI.

UI

-Receives key presses and submits them to the Logic.
-Shows the player.
-Shows the player's surroundings.
-Shows game stats i. e. scores and time limits.
-Shows the player when they win.
-Asks the player if they want to play again and, if so, starts the new game.

Messenger

-Notifies the UI the game is won.
-Notifies the UI the player has moved.

Wall

-Holds information about which directions are blocked.

GAME SCENARIOS:

Player Presses A Key

-JFrame class calls event listener UI.keyReleased().
-keyReleased() calls Logic.makeMove().
-makeMove() checks maze.getWall().getDirections() to ensure move is valid.
-makeMove() checks maze.contains() to see if the move is inside the map.
-If not inside, the player has won the game and ui.playerWins() is called.
-If valid, Logic updates the character position with character.getCoordinate().translate().
-If valid, Logic calls UI.playerMoved() to tell it the view should be updated.
-If valid, UI calls TileArtist.repaint() for each tile.
-If valid, eventually repaint() will call paintComponent().
-If valid, paintComponent() updates the screen.

Game Starts Up

-main creates/loads the maze.
-main creates a new character.
-main creates a new Logic class
-Logic constructor calls newMaze()
-newMaze() sets the starting position (could be random).
-main creates a new UI.
-main sets the event listener in Logic to the UI.

Player wins

-logic.makeMove() calls ui.playerWins()
-GUI shows the player won.
-GUI asks the player if they want to play again.
-GUI calls logic.newMaze() to restart the game.

About

A game of twists and turns where the player tries to find the exit of the laborinth.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages