Task Details
The Weeks 2 and 3 laboratory exercises contain a designated “Main Portfolio Exercise”. These are a series of exercises that add to each other to form a main portfolio program: TextQuest. You are to submit a final, completed version of that game.
uccessful completion of the exercises as described in the laboratory exercises may obtain you up to a maximum of 80% of the total request marks. In order to obtain a higher mark you should seek to include some advanced functionality (as described in the Week 3 portfolio description). The additional functionality should demonstrate advanced or more complex application of principles covered to date. It need not be large amounts of work but should demonstrate a willingness to explore new and advanced concepts. You must detail what you have done in an accompanying “readme” file.
The request must be created and submitted as a Visual Studio 2013 project. You may complete the exercises in your preferred IDE, however you should create a Visual Studio project in order to submit. This project must then be zipped up into one zip file for submission. The zip file MUST be named “FIT2071-AA1-YourAuthcateID.zip”. This zip file must be submitted via the Moodle request submission page. Note to reduce the file size of your zip, you can delete the “ipch” folder from your project before zipping without affecting your program.
Explicit assessment criteria are provided over the page, however please note you will be assessed on the following broad criteria:
- Meeting functional requirements as described in the exercise description
- Demonstrating a solid understanding of the week’s C++ concepts, including good practice
- Following the unit Programming Style Guide
- Creating solutions that are as efficient and extensible as possible
NOTE! Your submitted program MUST compile and run. Any submission that do not compile will be awarded zero marks. This means you should continually compile and test your code as you do it, ensuring it compiles at every step of the way.
If you have any questions or concerns please contact Tim as soon as possible.
Week2
Main Portfolio Exercise: TextQuest
This week’s portfolio exercise is to begin building a (very simple) text-based Role Playing game. We will be building upon this exercise in the next week to culminate in the submission of a game built up with the 2 portfolio exercises from weeks 2 and 3. This week we will start by writing the basic structure of the code to create a character and save the character data to a file.
Step 1. Prompt the player to enter a name for their character and save that name to a file.
Step 2. You will also need to read a file containing the default statistics associated with the different character vocations that the player can choose. Add code to your program to read in the vocation file which is a comma-separated list, with four fields corresponding to: vocation, health, strength and magic. The vocation field is a text string, the remaining fields are smallish integers. Here’s an example vocation file:1
2
3Warrior,100,120,0
Mage,80,60,100
Rogue,60,80,50
Your program should read this file, print the list of vocations to the console and ask the player to select one by entering its number in the list (starting from 0).
Now write out the character information to a file which should again be a comma separated file containing five fields: name, vocation, health, strength and magic. The health score should (initially) come from the value specified in the vocation file (the second field). Here’s an example output:1
TimTheMagical,Mage,80,60,100
Bonus: What happens if we try to save another character? Why does this happen? How might we overcome this issue to allow us to save multiple characters?
Next week we will complete the basic game with code to resurrect the character from such a save file, make a turn loop where stuff happens pseudo-randomly affecting health until the character dies! Don’t worry, we will also start to do stuff with the strength and magic fields.
Week3
Main Portfolio Exercise: TextQuest continued
This week’s portfolio exercise is to complete last week’s TextQuest game.
By now you should have a program that allows the user to create a character, choose the character’s name and choose a vocation for the character from a list of possible vocations and their health, strength and magic stats. Finally it should be saving the created character in a separate file (check last week’s lab portfolio exercise for details).
This week, we are going to again extend the program in several steps, we’re up to Step 3:
Step 3. Add to your code the ability to either read an existing character from the file created on a previous run, or create a new character from scratch.
Step 4. Now we are going to create the actual game loop. The game loop will apply a sequence of events that output a message to the screen and modify the character’s health score. Here’s a sample events file (also available on Moodle).1
2
3
4
5An enemy Warrior hits you with his weapon!,-50
An enemy Mage casts an evil spell on you!,-20
You found a health potion!,25
An enemy Rogue backstabs you from the shadows!,-40
You got eaten by a Dragon!,-1000
After each event, if the player’s health score is not yet 0, they should be prompted whether to continue (y/n). Answering ‘y’ will apply another event. Answering ‘n’ should end the loop. Before the program finishes it should write out the player’s current stats (in the same file as in Step 1/2).
HD Bonus: Implementing the basic functionality described in Steps 1-4 will enable you to achieve a maximum of 80% of the available marks. In order to achieve the final 20% (or “HD” component) you should seek to include some advanced functionality. The additional functionality should demonstrate advanced or more complex application of principles covered to date. It need not be large amounts of work but should demonstrate a willingness to explore new and advanced concepts. Note however that your program must still satisfy all functionality as detailed in Steps 1-4. You must describe your additions in the readme file included with your submission (see below).
Here are some ideas for things you could add:
- basic validation (check if the file is empty before trying to read from it, check that the name was not left blank, check that the vocation entered was within range etc.)
- the ability to save/load multiple characters
- events that allow the player to fight back at the cost of strength (if warrior/rogue) or magic (if mage)
- a simple xp/level system
Readme.txt Document: as described in the (separate) request hand-out you will also need to submit a brief text document explaining how your program works. To get marks for any extra functionality you may have implemented, it must be highlighted and explained clearly in this document.
Full details of submission are detailed in the request brief on Moodle. However, important things to note include:
- Your submitted program MUST compile and run in VISUAL STUDIO 2013. If a program will not compile it will be awarded ZERO marks. NO exceptions. This means you must continually compile and test your code!
- You can discuss ideas with others, but your code and your readme.txt document must be your own work. We will be checking! Monash applies heavy penalties to students who plagiarise.
Please note! It is not expected that you need to implement this game as an object-oriented solution. We will be writing fully object-oriented programs in the remaining assessment items.