You are to write a text based adventure game for this assignment. The game
world will be represented in an overhead two-dimensional view. Characters will
represent different objects in the game
The object of the game is for the student to be awarded the highest possible
grade. The player can quit the game at any time but is awarded an 'F'. 'D' and
'C' grades are quit common. The 'B' grade is harder to obtain and requires some
rudimentary puzzle solving and 'A' grade is the hardest of all to attain. When
the student is awarded a grade the game will end and the game will display the
grade that was earned. The game is turn based and each turn the player can: quit
the game, move the student or toggle debugging messages on or off. When the
player moves the student the game will react differently depending upon
the object that occupies the destination square. Empty squares contain a space and can be
entered with no special effects. Squares containing walls cannot be entered. A
square with a letter grade will result in that grade being awarded to the
student and game ending. The exception is the square containing an 'A' which can
only be entered if the student has first picked up the key. Entering the square containing the oracle will display
the password to the player. Entering the square with the portal will query the
player for the password. The student can only be moved to adjacent squares.
Features to be
implemented |
|
- Display an introduction each time that the game is run which provides
instructions for playing the game: 1 mark
|
|
- Display a conclusion each time that the game ends. The
conclusion must show the grade that was awarded to the student: 1 mark
|
|
- Display the game world in the same form as the sample
executable: 1 mark
|
|
- Displays a menu that shows the allowable directions that the
student can be moved which are mapped to the keypad on the keyboard.
The menu should show the 4 cardinal compass points (N = 8, W = 4, E
= 6, S = 2) as well as the inter-cardinal ones (NW = 7, NE = 9, SW
=1, SE = 3). It should be indicated in the menu that selecting 0
will allow the player to quit the game: 1
mark
|
|
- Move the student when the direction selected is 1-4 or 6-9. The
student will 'disappear' off the source square and 'reappear'
on the destination square: 6 marks
|
|
- End the game when direction selected is zero. The student will
be awarded an 'F' in the grade and the conclusion should be
displayed: 1 mark
|
|
- The student is prevented from moving into solid walls: 2 marks
|
|
- A grade is awarded when the student is moved onto a square
containing a 'B', 'C' or 'D'. When this occurs the conclusion should
be displayed and the program will end: 2 marks
|
|
- The game performs boundary checking. The game can determine when
the player attempts to move the student outside the bounds of the
array: above the first row, below the last row, left of the first
column or right of the last column. Your game will implement one
of the two approaches listed: 2 marks maximum
|
|
|
- First approach: implement a barrier. When the player tries to
move the student outside the bounds of the array the game will
display an error message and it will not move the student. (1
mark)
|
|
|
- Second approach: implement a wrap-around effect. When the player
tries to move the student outside the bounds of the array the game
will move the student to the opposite side of the world: when the
student is moved above the first row it will reappear at the same
column but at the last row, when the student is moved below the last
row it will reappear at the same column but at the first row, when
the student is moved left of the first column it will reappear in
the same row but in the last column and when the student is moved
right of the last column it will reappear on the same row but in the
first column. (2 marks)
|
|
- The oracle is activated. The password will be displayed when the
student moves onto this square (2 marks). If after this the
game reminds the player of the password each turn then an additional mark will be awarded: 3 marks
maximum for this feature
|
|
- The portal is activated. The portal will ask the player for the
password "nok nok" when the
student tries to enter this square. If the correct password is given
then the student may enter otherwise a refusal message is displayed
and the student cannot enter. Note the important part is that the
player must give the correct password and it does not necessarily
mean that the student actually visited the oracle first (e.g., the player knows
the password because he or she has played the game before): 2
marks
|
|
- The student can 'pick up' the key by entering the square where
the key resides. When this occurs the game should display an
appropriate message to the player (2 marks). If the game continues
to remind the player each turn that they have key then an extra mark will be
awarded: 3 marks maximum for this feature
|
|
- The 'A' is treated as a special case. The student can only enter
this square and be awarded an 'A' if the key was picked up
beforehand. Otherwise the student will not be able to enter this
square: 4 marks
|
|
- The game allows debugging messages to be displayed. The game
implements a hidden option for the directional menu. If the player
enters a negative value for the direction then the program will
toggle debugging messages on and off. The exact content
of the debugging messages is left to your discretion. As the name
implies they should be helpful for debugging your program or helping
to verify if it does what it is supposed to. Typical debugging
messages show the state of the program at different execution
points: a message appears as a particular module executes or the
contents of variables are displayed (e.g., as the student is moved,
the program shows current row/column coordinates of the student, the
direction to be moved and the row/column coordinates for the
destination). You can try running the sample executable to see
examples of debugging messages: 3 marks
|