Reference no: EM133762866
Object Oriented Software Development
Description
The first task, Project 2A, requires that you produce a class design demonstrating how you plan to implement the game. This should be submitted in the form of a UML diagram showing all the classes you plan to implement, the relationships (e.g. inheritance and associations) between them, and their attributes, as well as their primary public methods. You do not need to show constructors, getters/setters, dependency, composition or aggregation relationships. If you so choose, you may show the relationships separately to the class members in the interest of neatness, but you must use correct UML notation. Please submit as a PDF file.
To navigate through the tabs, use the following keyboard shortcuts: Tab to move to the next focusable element. Shift + Tab to move to the previous focusable element. Use the left and right arrow keys to move between tabs. Tab to activate the selected tab and select its content.
Project 2
Overview
In this project, you will create a taxi simulation game called ShadowTaxi in the Java programming language, continuing from your work in Project 1. We will provide a full working solution for Project 1; you may use all or part of it, provided you add a comment explaining where you found the code at the top of each file that uses the sample code.
This is an individual project. You may discuss it with other students, but all of the imple- mentation must be your own work.
You may use any platform and tools you wish to develop the game, but we recommend using IntelliJ IDEA for Java development as this is what we will support in class.
There are two parts to this project, with different submission dates. The first task, Project 2A, requires that you produce a class design demonstrating how you plan to implement the game. This should be submitted in the form of a UML diagram showing all the classes you plan to implement, the relationships (e.g. inheritance and associations) between them, and their attributes/methods (regardless of privacy) . You do not need to show constructors, getters/setters, dependency, composition or aggregation relationships. Bagel classes can be shown similar to primitive data types. If you so choose, you may show the relationships between classes on a separate page to the
details (attributes and methods) of the classes in the interest of neatness, but you must use correct UML notation. Please submit as a PDF file only on Canvas.
The second task, Project 2B, is to complete the implementation of the game as described in the rest of this specification. You do not need to strictly follow your class design from Project 2A; you will likely find ways to improve the design as you implement it. Submission will be via GitLab and you must make at least 5 commits throughout your project.
Game Overview
"You are a taxi driver stuck on an endless road, attempting to survive in this current economic crisis. Move the driver to control a taxi in the lanes, pick up passengers and drop off the passen- gers at their trip end flags to earn money. Each passenger has a priority, which can increase the driver's earnings. Collect the coins, to increase the passenger's priority. If you stop past the trip end flag, you lose money! To make things harder, there are enemy cars and other cars, who will collide and cause damage to the driver, passenger and the taxi. If the driver or a passenger's health decreases to below 0, you lose! Can you beat the target score before the time elapses to complete the game?
The game is an extension to Project 1 and includes the same functionality (with some slight modi- fications which are explained later ). The player can press the arrow keys to control a driver, that can drive a taxi. The player has to press the arrow keys to move the taxi left, right or up. The taxi can pick up and accommodate one passenger at a time, by stopping close to them. The player has to drop the passenger off at their respective trip end flag - stopping past this flag, incurs a penalty on the earnings of that trip. The taxi can collect coins by colliding with them - collecting coins will increase the priority of the current passenger once. Once dropped off, the trip earnings are added to the total score.
The driver, passengers and the taxi have health values. The game also features other cars and enemy cars, that are generated randomly and move independently. If they collide with the taxi, damage is inflicted on the taxi. If the taxi's health reduces to below 0, it becomes permanently damaged and cannot be used. The user has to move the driver to a new taxi, that will be randomly generated at this stage. If other cars or enemy cars collide with the driver or passenger when walking, damage is inflicted on the driver or passenger. To win, the player needs to beat the target score of 500. If the game runs for more than 15,000 frames, the game ends in a loss. If the driver or a a passenger's health reduces to below 0, it is a loss. Further, if a new taxi goes off-screen without the driver getting in, this is a loss (this will be explained in detail later). At the end, the current top 5 scores are shown on screen.
Your Code
You must submit a class called ShadowTaxi that contains a main method that runs the game as prescribed above. You may choose to create as many additional classes as you see fit, keeping in mind the principles of object oriented design discussed so far in the subject. The purpose of this project is to evaluate how well you use OOSD concepts, specifically classes. You will be assessed based on your code running correctly, as well as the effective use of Java concepts. As always in software engineering, appropriate comments and variables/method/class names are important.
Implementation Checklist
To get you started, here is a checklist of the game features, with a suggested order for implementing them (in addition to the features in Project 1):
Draw the game play screen with new weather conditions
Read the world file, then draw the driver, one enemy car and one other car on screen
Implement movement logic for the 3 entities above
Implement image rendering, random creation and movement for all the entities in the world file
Implement the collision logic for the different combinations of entities
Implement the invincibility power collision, effect on collisions
Implement new loss detection
Supplied Package and Getting Started
You will be given a package called project-2-skeleton.zip that contains the following: (1) Skeleton code for the ShadowTaxi, MiscUtils and IOUtils classes to help you get started, stored in the src folder. (2) All graphics and fonts that you need to build the game, stored in the res folder. (3). The pom.xml file required for Maven. You should use this template exactly how you did for Project 1, that is:
Unzip it.
Move the content of the unzipped folder to the local copy of your [username]-project-2] repository.
Push to Gitlab.
Check that your push to Gitlab was successful and to the correct place.
Launch the template from IntelliJ and begin coding.
Commit and push your code regularly.
Customisation (optional)
We want to encourage creativity with this project. We have tried to outline every aspect of the game design here, but if you wish, you may customise any part of the game, including the graphics, types of actors, behaviour of actors, etc (for example, an easy extension could be to introduce a new level with different entites or powers). You can also add entirely new features. For your customisation, you may use additional libraries (other than Bagel and the Java standard library).
However, to be eligible for full marks, you must implement all of the features in the above imple- mentation checklist. Please submit the version without your customisation to [username]-project-2 repository, and save your customised version locally or push it to a new branch on your Project 2 repository.
For those of you with far too much time on your hands, we will hold a competition for the best game extension or modification, judged by the lecturers and tutors. The winning three will have their games showcased on Ed, and there will be a prize for our favourite. Past modifications have included drastically increasing the scope of the game, adding jokes and adding polish to the game, and even introducing networked gameplay.