Overview
You have received a request from a client for an application for the playing of dungeon-style puzzles. With a partner from your lab class, you will follow an agile development process to design and implement a desktop Java application that satisfies the requirements of the client (see below). The final piece of software you deliver is expected to be of professional quality, user-friendly, and demonstrate the knowledge and skills you have acquired in this course.
Partner
Your first step in this project will be to find a partner. You will do this under the guidance of your tutor in the week 3 tutorial. You may work as an individual if you wish, but your project will be judged by the same criteria as if you had done it with a partner. If class sizes necessitate, groups of 3 will be allowed.
After resolving who you will be working with, you should create a project group on WebCMS. A repository on GitLab will be created for you at the end of week 3 based on the group you create, so you must create one by then.
Once created, your repository will be available here (replace GROUP_NAME with your group’s name):
Preliminary client requirements
The client desires an application that lets the user move a player around a dungeon and try to overcome various challenges in order to “complete” the dungeon by reaching some goal. The simplest form of such a puzzle is a maze, where the player must find their way from the starting point to the exit.
More advanced puzzles may contain things like boulders that need to be pushed onto floor switches,
or enemies that need to be fought with weapons, potions, or treasure.
Dungeon layout
To be specific, the layout of each dungeon is defined by a grid of squares, each of which may contain one or more entities. The different types of entities are as follows:
Entity
Example
Description
Player
The player can be moved either up, down, left, or right into adjacent squares, as long as another entity does not stop them (e.g. a wall).
Wall
Blocks the movement of the player, enemies, boulders and arrows.
Exit
If the player goes through an exit the puzzle is complete.
Treasure
Can be collected by the player.
Door
Exists in conjunction with a single key that can open it. If the player holds the key, they can open the door by moving through it. After opening it remains open. The client will be satisfied if dungeons can be made with up to 3 doors.
Key
Can be picked up by the player when they move into the containing square. The player can carry only one key at a time, and only one door has a lock that fits the key. The key disappears once it is used to open its corresponding door.
Boulder
Acts like a wall in most cases. The only differences are that it can be pushed by the player into adjacent squares and can be destroyed by a bomb. The player is only strong enough to push one boulder at a time.
Floor switch
Switches behave like empty squares so other entities can appear on top of them. When a boulder is pushed onto a floor switch, it is triggered. Pushing a boulder off the floor switch untriggers it.
Unlit bomb
The bomb is picked up by the player when they move into the square containing it.
Lit bomb
The player can light the bombs they have collected and drop them. The fuse burns down for a short fixed period of time before the bomb explodes. Upon explosion, any boulders or enemies in the squares immediately to the left, right, above or below are destroyed. If the player is in one of these squares they die.
Enemy
Constantly moves toward the player, stopping if it cannot move any closer. The player dies upon collision with an enemy.
Sword
This can be picked up the player and used to kill enemies. Only one sword can be carried at once. Each sword is only capable of 5 hits and disappears after that. One hit of the sword is sufficient to destroy any enemy.
Invincibility potion
If the player picks this up they become invincible to all bombs and enemies. Colliding with an enemy should result in their immediate destruction. Because of this, all enemies will run away from the player when they are invincible. The effect of the potion only lasts a limited time.
Goals
In addition to its layout, each dungeon also has a goal that defines what must be achieved by the player for the dungeon to be considered complete. Basic goals are:
Getting to an exit.
Destroying all enemies.
Having a boulder on all floor switches.
Collecting all treasure.
More complex goals can be built by logically composing basic goals. For example,
Destroying all enemies AND getting to an exit
Collecting all treasure OR having a boulder on all floor switches
Getting to an exit AND (destroying all enemies OR collecting all treasure)
If getting to an exit is one of a conjunction of conditions, it must be done last. For example, if the condition is to destroy all enemies AND get to an exit, the player must destroy the enemies then get to the exit.