-
Appreciate issues in user interface design
-
Learn practical aspects of graphical user interface programming
-
Learn more about the Java class libraries
-
Learn the application of design patterns.
You may also need to copy the contents of the bin folder in the unzipped JavaFX JDK download into a bin folder under the root directory of your cloned repository (e.g. for Windows).
The following version of the JavaFX JDK is recommended:
https://gluonhq.com/products/javafx/
Note that if you deviate from this precise directory structure, you may need to modify the VSCode configuration in .vscode/launch.json to be able to run the game in VSCode.
If the steps in the above instructions worked, you should be able to run the starter code.
IMPORTANT: Please do not push the contents of the lib or bin folders to your Gitlab repository. This is very likely to push you over the memory limits for the milestone 2 and 3 submissions.
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.
![Maze][maze]
More advanced puzzles may contain things like boulders that need to be pushed onto floor switches,
![Boulders][boulders]
enemies that need to be fought with weapons, or collectables like potions and treasure.
![Advanced dungeon][advanced]
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 | ![Player][player] | Can be moved up, down, left, and right into adjacent squares, provided another entity doesn't stop them (e.g. a wall). |
Wall | ![Wall][wall] | Blocks the movement of the player, enemies and boulders. |
Exit | ![Exit][exit] | If the player goes through it the puzzle is complete. |
Treasure | ![Treasure][treasure] | Can be collected by the player. |
Door | ![Door][door_open] ![Door][door_closed] | 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. Once open it remains so. The client will be satisfied if dungeons can be made with up to 3 doors. |
Key | ![Key][key] | Can be picked up by the player when they move into the square containing it. The player can carry only one key at a time, and only one door has a lock that fits the key. It disappears once it is used to open its corresponding door. |
Boulder | ![Boulder][boulder] | Acts like a wall in most cases. The only difference being that it can be pushed by the player into adjacent squares. The player is only strong enough to push one boulder at a time. |
Floor switch | ![Floor switch][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. |
Portal | ![Portal][portal] | Teleports entities to a corresponding portal. |
Enemy | ![Enemy][enemy] | Constantly moves toward the player, stopping if it cannot move any closer. The player dies upon collision with an enemy. |
Sword | ![Sword][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 | ![Invincibility][invincibility] | If the player picks this up they become invincible to 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. |
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 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.