- 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
- Make a wacky game in the process
This project was done for a object oriented programming course in UNSW. Written by Leonard Lee and Zachary Tan. Special thanks to Well son and Wei ze!! ๐
๐ฅ Sample gameplay on YouTube
-
Download and set-up Visual Studio Code here ๐ VSCode
-
set up java jdk here ๐ vscode for java
- download the installer for your Operating System (windows/mac)
-
Go to Extension tab in VSCode and in the search bar look for 'Java Extension Pack'
- this package includes the java code runner so we can launch the game.
- details of the extension here ๐ Java Extension Pack
-
That should do it! โญ Go to src/unsw/dungeon/FrontendApplication.java โญ and click on 'Run' on top of the main function.
โ IMPORTANT โ The set-up is currently tested and working for macOS and Linux.
โ IMPORTANT โ for windows, first download git here, then checkout into the 'windows' branch and follow setup steps 1 - 4.
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 level by reaching some goal.
Here is how the start menu looks like:
Be sure to read the instructions for the game and go on to select the different level maps!
Here's a glimpse as to how they look like!
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:
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 are being stated in the side panel in the game Dungeon window.
๐ notes for setting goals (CLICK ME TO FIND OUT)
This application will read from a JSON file containing a complete specification of the dungeon (the initial position of entities, goal, etc.).
The dungeon files have the following format:
{ "width": width in squares, "height": height in squares, "entities": list of entities, "goal-condition": goal condition }
Each entity in the list of entities is structured as:
{ "type": type, "x": x-position, "y": y-position }
where type is one of
["player", "wall", "exit", "treasure", "door", "key", "boulder", "switch", "portal", "enemy", "sword", "invincibility"]
The door
, key
, and portal
entities include an additional field id
containing a number. Keys open the door with the same id
(e.g. the key with id
0 opens the door with id
0). Portals will teleport entities to the one other portal with the same ID.
The goal condition is a JSON object representing the logical statement that defines the goal. Basic goals are:
{ "goal": goal }
where goal is one of
["exit", "enemies", "boulders", "treasure"]
In the case of a more complex goal, goal is the logical operator and the additional subgoals field is a JSON array containing subgoals, which themselves are goal conditions. For example,
{ "goal": "AND", "subgoals":
[ { "goal": "exit" },
{ "goal": "OR", "subgoals":
[ {"goal": "enemies" },
{"goal": "treasure" }
]
}
]
}
Note that the same basic goal can appear more than once in a statement.
The UI component of this project will be implemented in JavaFX.
The client has given you free reign over the visual design of the program. Included in the starter code are some example assets, but you are free to use different ones. The examples above came from here.
have fun!