Learning Outcomes & Materials
This assignment is intended to develop and assess the following unit learning outcomes:
LO1. Iteratively apply object-oriented design principles to design small to medium-size software systems, using standard software engineering notations, namely UML class diagrams and UML interaction diagrams.
LO2. Describe the quality of object-oriented software designs, both in terms of meeting user requirements and the effective application of object-oriented design concepts and principles.
L03. Apply object-oriented programming constructs, such as abstraction, information hiding, inheritance, and polymorphism, to implement object-oriented designs using a programming language (namely, Java).
LO5. Apply principles of software engineering practice to create object-oriented systems with peers using tools including integrated development environments (IDEs), UML drawing tools, and version control systems.
To demonstrate your ability, you will be expected to:
- read and understand UML design documentation for an existing Java system
- propose a design for additional functionality for this system
- create UML class diagrams to document your design using a UML drawing tool such as diagrams.net, UMLet or plantuml – you are free to choose which one
- write a design rationale evaluating your proposed design and outlining some alternatives
- implement the features of the system that you designed
- use an integrated development environment to do so
- use git to manage your team's files and documents
The marking scheme for this assignment will reflect these expectations
Learning Materials
The base code will be automatically available in your group's repository (Gitlab).
Repeat this mantra: Design, write code, test, fix design, fix code, repeat 🚀
Note: You must NOT follow demo apps' design decisions; they only show how to use the engine, NOT how to design a proper system with object-oriented principles.
Introduction
For the rest of the semester, you will be working on a relatively large software project. You will design and implement new functionalities to an existing system that we will provide to you.
IMPORTANT: A document explaining the FIT2099 Assignment Rules is available as the Assignment Survival Kits lesson. Please read it and make sure you understand BEFORE you begin the project – you are expected to follow what it says and will almost certainly lose marks if you do not.
In this assignment (Assignment 1), you will be working individually to implement the first few features of the game. We highly recommend starting by extracting the whole game features. Then, proceed with designing, testing, and repeating the process as needed. This iterative approach will help ensure a well-developed and refined system.
Getting Started
The initial codebase will be available in a repository that will be created for you on git.infotech.monash.edu. In the meantime, please go through the assignment support modules on Ed Lesson to familiarise yourself with the game engine that you will use during the assignment.
You do not need to submit an interaction diagram (e.g. sequence diagram or communication diagram) in assignment 1. However, you will need to submit these documents for Assignment 2 and Assignment 3. For assignment 1, you may still create these documents if you find them useful for designing the system.
General background
You will be working on a text-based “rogue-like” game. Rogue-like games are named after the first such program: a fantasy game named Rogue. They were very popular in the days before home computers were capable of elaborate graphics and still have a small but dedicated following.
If you would like more information about rogue-like games, a good site is http://www.roguebasin.com/. The initial codebase will be available in the repository mentioned above. It includes a folder containing design documents for the system.
Designborne
In this assignment, we will be developing the “Designborne” game, inspired by the games such as Dark Souls, Elden Ring and Bloodborne. We may use several similar names (characters, items, locations) and concepts. The purpose of using an actual game’s concepts is to help you visualise the required features, such as watching the video gameplay from the actual game to illustrate features that you may find difficult to comprehend. We also believe that using actual game references can bring fun while working on the assignments.
All of the linked game contents, videos, and images belong to the respective owners and are subject to copyright. We mainly use the concepts for educational purposes and provide credit to the original creators accordingly. We may also add, alter, and reduce the original content and features to make them more suitable to the game engine, unit outcomes, and assignments’ time frame.
What’s next?
Below are five slides (REQ1-REQ5) describing the requirements you need to complete. Each requirement includes game features that include background stories, entity descriptions (actors, items, or ground), relationships between entities, and actions between them. We suggest extracting these features into a list and discussing it with the TAs to ensure all features are included (this discussion is not assessed, but highly recommended). Following these requirement slides, we will outline the deliverables necessary for the Assignment 1 assessment.
REQ1: The Player
In “Designborne”, you play as “The Abstracted One”, who has been revived by an unknown entity in the starting location, “The Abandoned Village”.
At the beginning of the game, the player has 150 hit points (the health attribute) and 200 stamina. They start the game by waking up in the building in the middle of the map. A building is simply several squares of floor (`_`) and dirt (`.`), surrounded by walls (`#`). The display character of the player is “@”.
Figure 1. Example of buildings in the game (red squares). They consist of walls, dirt, and floor grounds. Since the actor cannot walk over the wall, a building may have various openings at various sides (replaced with dirt or floor). For example, the middle building has an opening on the south side (a floor _). The player starts the game in the building in the middle of the map(This image does not contain the player symbol).
The player can use their limbs to attack the enemies, dealing 15 damage with 80% attack accuracy.
Make sure to display the player’s hit points and stamina before printing the menu on the console!
In the building, there is a “Broadsword”, which is a starting weapon that the player can pick up and use to attack enemies. This weapon can deal 110 damage with 80% attack accuracy. This weapon is represented by the character “1”. It also has a special skill, “Focus”, that can increase the weapon’s damage multiplier by 10% for 5 turns and set (not increase) the weapon’s hit rate to 90% while the weapon is in the player’s inventory. If the player drops the weapon while the skill is active, the weapon’s damage multiplier and hit rate will revert back to the previous state.
For simplicity, If the player uses the skill again while the skill is still active, you can simply re-apply the damage multiplier increase and reset the turns back to 5. For example, if the weapon skill was activated once, the damage multiplier is up by 10% and assume that the skill has 2 turns left. If the skill is activated at this point, the damage multiplier is up by 20% (increased by another 10%), and the turns would be reset to 5.
You can assume that all weapons have either one skill or none. The stamina points used by activating weapon skills vary between different weapons.
Whenever the player uses “Focus”, which is the Broadsword’s weapon skill, their stamina is reduced by 20% of their maximum stamina.
At each turn, the player’s stamina will recover by 1% of their maximum stamina.
REQ2: The Abandoned Village’s Surroundings
After the player exits the building, they notice that there are several bottomless pits within the village. This bottomless pit is also known as the Void, and it is represented by the display character “+”. Any entity, including the player, will be killed if they step on it.
If the player dies, make sure that the game ends and a “YOU DIED” message is displayed on the console (see the FancyMessage class).
The player also notices that there are several graveyards in the village. The graveyard is displayed as “n”. As the player gets closer to one of the graveyards, a figure rises up and attacks the player! This is because the graveyard is occupied by the former inhabitants of the village (see REQ3). The graveyard can spawn this enemy with a 25% chance at every turn of the game.
Edit (27/08/2023): For simplicity, you can assume that the graveyard can spawn a WanderingUndead with a 25% chance at every turn, regardless of the player's location.
Hint: if you need to pass in arguments to a ground’s constructor, you can do the followinggameMap.at(30, 11).setGround(new ConcreteGround(input1, input2));
REQ3: The Wandering Undead
The first enemy that the player encounters is the “Wandering Undead”, which is displayed as “t”. If the player is not within the surrounding of the enemy, it will wander around. However, when the player is nearby (within the surrounding of the enemy or one block away from the enemy), it will attack the player. This type of enemy has 100 hit points and can attack the player with its limbs, dealing 30 damage with 50% accuracy. An enemy cannot attack another enemy.
This enemy cannot enter a floor, represented by the display character “_”, so that the player can run back to safety if their health is low. Furthermore, both the player and the enemy cannot enter walls. They, however, can walk around freely in the Void*, on puddles and dirt.
* with consequences (see REQ2)
REQ4: The Burial Ground
After defeating the enemy, the player explores the deeper section of the village until they reach a locked gate (represented by the display character “=”), leading to a new region of the abandoned village, which is known as the burial ground. Since the gate is locked, the player will not be able to proceed without a key.
"...........+++++++........~~~~~~++....~~",
"...........++++++.........~~~~~~+.....~~",
"............++++...........~~~~~......++",
"............+.+.............~~~.......++",
"..........++~~~.......................++",
".........+++~~~....#######...........+++",
".........++++~.....#_____#.........+++++",
"..........+++......#_____#........++++++",
"..........+++......###_###.......~~+++++",
"..........~~.....................~~...++",
"..........~~~..................++.......",
"...........~~....~~~~~.........++.......",
"......~~....++..~~~~~~~~~~~......~......",
"....+~~~~..++++++++~~~~~~~~~....~~~.....",
"....+~~~~..++++++++~~~..~~~~~..~~~~~...."
A sample burial ground map
The burial ground must be implemented as a new map (separate from the abandoned village map). Make sure to add another Gate in the Burial Ground map to go back to the Abandoned Village map. You can assume that this is a separate gate that the player also needs to unlock.
The wandering Undead has a 25% chance of dropping an “Old Key” (represented by “-”) once they are defeated by the player. For the sake of simplicity, multiple key instances are expected in the game. The player can pick up this key and use it to unlock the gate leading to the burial ground.
In this game, only the player is able to use the gate for travelling (once they have the old key). Other actors may step into the gate once it is unlocked, but they will not be able to use it for travel.
You can assume that the old key is reusable. That is, you don’t need to remove the old key from the player’s inventory after the player uses it.
REQ5: The Inhabitants of The Burial Ground
The graveyards in the burial ground are occupied by a different type of enemy, known as the Hollow Soldier, displayed as “&”. This type of enemy has 200 hit points and can attack the player with its limbs, dealing 50 damage with 50% accuracy. The graveyard can spawn this enemy with a 10% chance at every turn of the game.
Similar to the wandering Undead (see REQ4), if the player is not within the surrounding of the enemy, it will wander around. However, when the player is nearby (within the surrounding of the enemy), it will attack the player. An enemy cannot attack another enemy.
This enemy cannot enter a floor, represented by the display character “_”, so that the player can run back to safety if their health is low. Furthermore, both the player and the enemy cannot enter walls. They, however, can walk around freely in the Void*, on puddles and dirt.
* with consequences (see REQ2)
Once defeated, this enemy has a 20% chance to drop a healing vial (represented by the display character “a”), which can be consumed by the player to heal 10% of their maximum health. It also has a 30% chance to drop a refreshing flask (represented by the display character “u”), which can be consumed by the player to increase their stamina by 20% of their maximum stamina. Each instance of both healing vials and refreshing flask can be consumed by the player only once.
For simplicity, the calculation of the probability of each item dropping is independent of the other item, so the player can get lucky and get both items after killing one Hollow Soldier.
Healing vials and refreshing flasks cannot be consumed directly from the ground. That is, they must be picked up by the player before being consumed.
The wandering Undead that the player met earlier in the Abandoned Village map (see REQ3), once defeated, also has a 20% chance to drop a healing vial. Similar to the Hollow Soldier, the calculation of the probability of the Healing vial dropping is independent of the Old key.