Implement a basic RPG game with at least three (3) characters types (wizard, warrior, etc.) You will implement a duel where two character instances will fight each other. As an example, a warrior...

1 answer below »
Implement a basic RPG game with at least three (3) characters types (wizard, warrior, etc.) You will implement a duel where two character instances will fight each other. As an example, a warrior character fights enemies with a weapon of choice; swinging a weapon costs the character stamina. A wizard character fights by casting spells; casting spells inflict damage and expends magical power or mana. The two will face off and take turns selecting actions, which change the status of themselves and their opponent, until one or both are defeated.


Microsoft Word - Tamagotchi _Final_Project.docx Final Project: RPG Game Prompt: Implement a basic RPG game with at least three (3) characters types (wizard, warrior, etc.) You will implement a duel where two character instances will fight each other. As an example, a warrior character fights enemies with a weapon of choice; swinging a weapon costs the character stamina. A wizard character fights by casting spells; casting spells inflict damage and expends magical power or mana. The two will face off and take turns selecting actions, which change the status of themselves and their opponent, until one or both are defeated. Design Requirements: Implement the Character class • Create the base Character class. It should manage variables that keep track of every character’s state, such as name, level, or health. Include three (3) interaction functions that change those variables. For example, resting or using a healing item should increase health. Adding xp should increase a players level and allow for additional or more powerful abilities. • Include a function that updates the character’s state values in combat as well as after combat. • The Character class should have a method to save and load all of its data onto or from a file. Implement Types of Characters • Create at least three (3) new derived classes that inherits from the above Character class • Each new type (class) should be unique, from printing a unique message for each interaction to the particulars of their attack and defense. Add actions that the characters can take in support of a duel system where the characters alternate selecting actions and attacking/defending/casting spells until one is defeated (zero health). • Make sure to override the file save and load methods to make sure the new variables associated with the derived classes are updated in the save file. Implement the Game Loop • After the game starts, the player should be presented with a menu of the list of available character types to choose from, perhaps with a brief description, or allowed to load a character from a file. • When creating a new character, the player should be asked to select a character type and to provide a name. Random starting attributes may be assigned to the new character. Any further game message for the character should address it by its new name. • The game will then present the player with a duel against an opponent with interactions (attack/cast a spell, defend, flee, …), save or load files, or exit the game. • It should handle player actions, until a player flees or the duel is complete, and repeat with the menu options and provide duels until the player exits. System Requirements: • Must use file I/O for saving and loading game data • Must implement a character base class and at least three (3) different character type classes derived from the base class, with each having some unique attributes, abilities, and/or interactions. • Implement a duel system between two character instances. • Use comments to explain the sections and classes and to clarify actions and abilities. • Consider use polymorphism for easier programming. • Try using text styling (ASCII) to create an aesthetic menu system. Final Project: RPG Game Submission: 1. Prepare a Preliminary Project Report, due Friday, April 22nd. This report should include a description of how the program is (or will be) designed, including the design of the classes and their inheritance relationships. Be sure to describe the main functionality (in the form of pseudo code or step-by-step instructions) of the program. Please also provide the menu options and their use cases for your program. You can refer to ZyBooks 11.10 to learn how to use UML to describe your OOP design. 2. Prepare a 1–2‐page report explaining how the program was designed and developed, what classes were used, any special instructions to operate the program, and how the final implementation differed from the plan. Submit the report on Blackboard by Monday, May 2nd. 3. Submit your source code as a single .zip file on Blackboard by Monday, May 2nd. 4. Provide a link to a video clip (less than 5 minutes in length) demonstrating all the above required functionality. Submit this to Blackboard by Monday, May 2nd. Grading: Preliminary Project Report 25%. Peer-grading (based on the uploaded video) 25%. Final product graded by instructors and TAs 50%. Final report 20% (out of 50) Demo via video clip 40% (out of 50) Source code 40% (out of 50) Required Components 1. Please add the title of your project, your name, and peopleSoft ID in the beginning of your report 2. Describe the design of at least three classes (35%) 3. Description of the relation among classes (25%) 4. Provide use cases for the to-be-developed program based on the minimum requirements of the project option. (40%) Recommended Components • Pseudocode(s) for critical functionality of the program (can be derived from use cases and the class design) Suggestions and examples for the design of classes It is recommended to use the class diagram of UML (zyBooks 11.10) to illustrate the design of each class. The following is an example of such a diagram. There are different tools that allow you to create such a diagram, including MS Word. You can also use different colors to indicate different access modifiers for different members (e.g., green for public members, red for private members, and blue for protected members). If you use the class diagram as follows, please provide the description for each member function about what it is for. The description of the member functions of the Figure class: Figure() // default constructor that sets the center of a figure to be (0, 0) Figure (float, float) //overloaded constructor with two parameters to set the center of a figure void draw(); //draw the 2D shape given its corners in order void Center(); //Relocate the 2D shape to its current center and redraw the shape. It will call the draw() function float get_center_x(); // return the x coordinate value float get_center_y(); // return the y coordinate value void set_center(float, float); //set the center of the figure based on the input two parameters If you do not want to create the class diagram, you can simply list the member variables and member functions for each class. The following is an example. class Figure //a base class that provides the common attributes and functions of all 2D shapes --- member variables (protected) --- • float center_x //to store the x coordinate of the center of a figure • float center_y // to store the y coordinate of the center of a figure --- member functions (public) --- • Figure(); // default constructor that sets the center of a figure to be (0, 0) • Figure (float, float); //overloaded constructor with two parameters to set the center of a figure • void draw(); //draw the 2D shape given its corners in order • void Center(); //Relocate the 2D shape to its current center and redraw the shape. It will call the draw() function • float get_center_x(); // return the x coordinate value • float get_center_y(); // return the y coordinate value • void set_center(float, float); //set the center of the figure based on the input two parameters Suggestions and examples for the description of the relations among classes Again, it is recommended to use class diagram of UML to describe the relations among different classes. Different arrows (arrow heads) represent different relations. Please refer to (https://www.visual-paradigm.com/guide/uml-unified-modeling-language/uml-class-diagram- tutorial/) for more details about the arrow heads. Please also describe why you think a class should be the derived class of another class in your design. Again, your argument should be logical as in the above example. In the above example, the argument is that a circle with different radii and at different centers can be described using the Circle class. It is a special example of all possible 2D shapes that the Figure class describe. Therefore, it is logical to derive the Circle class from Figure to inherit Figure’s members while adding the radius attribute to the Circle class along with other functions related to the radius attribute. Alternatively, you can use plain English to describe the relations among classes. For example, you can say The Circle class is derived from the Figure class. This is because … [Add your argument here] inheritance inheritance https://www.visual-paradigm.com/guide/uml-unified-modeling-language/uml-class-diagram-tutorial/ https://www.visual-paradigm.com/guide/uml-unified-modeling-language/uml-class-diagram-tutorial/ The Rectangle class is also derived from the Figure class. The reason is similar to the one for the Circle class. Specifically, … [Add your argument here] You can describe the object composition relation similarly. Suggestions and examples for the use cases of the program Use cases are important for you to decide and design how your program will be used for different functionality based on the user input. Typically, each functionality should correspond to one particular use case. UML provides use case diagrams. However, for this report, you can use a more detailed step-by-step procedure to describe a use case. This will help you think about how a functionality will be implemented. The following provides the description of a few use cases of a 2D graph editing program. Use case 1: Open/Load a file for a 2D shape The program shows a user menu The user selects the option for loading a 2D shape from a file (e.g., by entering an option number) The program outputs a message asking the user to enter the file name The user enters a file name The program attempts to load the file. If the file does not, output a message to remind the user to enter a correct name; otherwise, the program will load the 2D shape and show it on the screen for the user to manipulate Use case 2: Move a 2D shape The program shows a user menu The user selects the option for editing a 2D shape The program shows the current loaded 2D shapes The user selects a 2D shape on screen (e.g., via mouse clicking)
Answered 11 days AfterApr 21, 2022

Answer To: Implement a basic RPG game with at least three (3) characters types (wizard, warrior, etc.) You will...

Arun Shankar answered on May 02 2022
82 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here