- Displays an introduction at the beginning of the game just after
it starts. The introduction should explain the rules to the player.
|
|
- Displays a conclusion when the game ends. In the full version of
the game it should display the game state: lost (Bilbo slain),
exited (Bilbo reaches exit) and how much treasure (if any) was
collected by the player.
|
|
- The game world 'Erebor'
consists of a 2D list of single characters. The list is initialized
with the start positions of all the entities in Erebor. (Your
program must use the starting positions as the code in the A5
directory - which if properly cited can be used in your submission).
|
|
- The program should display the game world using a numbered grid
so that columns and rows can be clearly identified.
|
|
- As Erebor is displayed, information about Bilbo's current hit
point level and gold collected is also shown (see top, Figure 2).
|
|
- Displays the main (move) menu to the player. The 4 cardinal
directions (N, S, E, W) and inter-cardinal directions (NW, NE, SW,
SE) are mapped to positions on the computer keypad (1 = SW, 2 = S, 3
= SE, 4 = W, 5 = No move, 6 = E, 7 = NW, 8 = N, 9 = NE).
|
|
- If the player selects a hidden option (any negative number)
at the main menu then the cheat menu will be displayed. Cheat
options: (d)ebug
mode toggle
(i)nvulnerability
mode toggle. This feature
requires that the program displays the cheat menu and gets the user's selection. Entering
any value at the cheat menu except the two valid options just
returns the game back to the main menu (time advances to the next turn).
|
|
- Player can quit the game by entering '0' at the
main menu.
|
|
- Getting input for the main menu: as well as getting valid input
the program can handle an invalid input type (i.e., it won't 'crash'
if the player enters a non-numeric value) via an exception handling
mechanism.
|
|
- Game tracks the following attributes for Bilbo:
Hit points (starts at 20), gold (starts
at 0). Bilbo's hit points will
go down as he comes into contact with dragon fire and his gold
score increases as he picks up treasure. (JT's suggested
approach: there will likely be several pieces of information you
want to track about Bilbo (his health, wealth and likely his current
location). It might be easier to pass this information in a list
rather than track individual variables. If you do this then make sure you
define some named constants to make it clear what information is
being accessed e.g., BILBO_HIT_POINTS = 0, bibloInfo = [20,0,0,0] #
HP=20, gold =0, row = 0, column = 0,
if accessing hit points then using the named constant:
print(bilboInfo[BILBO_HIT_POINTS]) is
clearer than an unnamed constant: print(bilboInfo[0])
|
|
- Debug mode implemented: To get credit for this feature the
player can toggle debugging messages on/off at the cheat menu (debugging messages will be displayed during the 'on'
state). In order to get credit for features listed below and
labeled "Debug must show feature working" debug mode must show
enough information so that the marker can quickly determine if the
feature has been implemented correctly. You can check with your marker for the
specifics on this but generally you are should show the value of
different variables to demonstrate that the feature works e.g., when
Bilbo is invulnerable show him getting hit with dragon fire but a
message is displayed indicating that he won't take damage, when
invulnerability is turned off show him taking damage (hit points
before, damage inflicted, hit points afterwards).
|
|
- Invulnerability mode (no damage from dragon fire) implemented.
To get credit for this feature the player can toggle invulnerability
on/off at the cheat menu. The mode
(on/off) must be displayed as Bilbo's stats are displayed. Debug
must show feature working (different from just showing status,
it must somehow show that Bilbo would actually incur some damage
during a turn but doesn't because invulnerability is enabled.
|
|
- Bilbo can move onto any location (except for walls). You will
progressively receive more credit as you implement more of the
sub-features listed below (a) - (c). Debug must show feature
working.
|
|
|
- Bilbo can move from one square to another (except into walls).
|
|
|
- Bilbo will take 4 points of damage if he's moved onto a square
that contains dragon fire '*'
|
|
|
- Bilbo will pick up 3 pieces of gold from squares that contain
treasure 't'. The treasure is
gone after Bilbo has picked it up and won't appear after he leaves
the square.
|
|
- Mode 2 implemented: from when Bilbo enters the main hall until
he leaves it, Smaug
will breath fire into that location. Each turn some randomly determined
locations will contain dragon fire. Locations that previously
contained fire can either contain fire again or the fire may die out
if Smaug doesn't breath into the same location. Any
empty square (or the one containing Bilbo) in the main hall can be
hit with the fire. You will progressively receive more credit as you
implement more of the sub-features listed below (a) - (d). Debug
must show feature working.
|
|
|
- Each square has a 10% chance of getting blasted with fire.
Squares that were hit previously (but not hit again this turn) will
appear empty (treasure and walls appear to get 'wiped out' by this
partially completed version).
|
|
|
- Dragon fire only appears in empty squares (or the one containing
Bilbo).
|
|
|
- If the fire appears in the same square as Bilbo then he sustains
4 points of damage.
|
|
- Mode 3 implemented: When the player re-enters the tunnel (from
the main hall: location (13,E) then the fires
in the main hall will die out (the squares will be cleared) and a
message will indicate that Smaug is now moving towards the
tunnel. When the player moves off this square (up or down - although
the latter wouldn't be a good idea for the player because Bilbo is
now trapped by the flame...in this latter case the program stays in
mode 3 and doesn't revert back to mode 2) fire will appear at
(13,E). 50% of
the time Smaug's fire will travel zero squares, 25% of the time it
will move up one square while the remainder of the time it will move
up two squares. The fire is progressive, once it appears in the
tunnel it won't die out and will travel 0 - 2 squares each turn.
Debug must show feature working.
|
|
- Program can detect the lose game condition (Bilbo's hit points
reaches zero or less). At this point the world
should be displayed one last time and the game should end with an appropriate status message. The player is not eligible for
a high score (feature #18). Debug must show feature working.
|
|
- Program can determine when the exit has been reached by Bilbo
(he re-enters (0,E) - re-enter means
that the square must first be exited). At this point the game should end and a status
message should appear that indicates that Bilbo has escaped as well
as the amount of treasure that he managed to get (this is the
player's 'score'). Bilbo can exit Erebor without moving past
(1,E), no
treasure has been collected so it's a little pointless but still
possible.
|
|
- The program tracks high scores in a file called "scores.txt".
When Bilbo exits Erebor the program will read the high scores from the file.
The file has two lines: an integer to signify the largest amount of
gold stolen and another to indicate the hit points of Bilbo
matched to the game in which the amount of gold was stolen (not
the maximum hit points ever retained when the game ended). For
example if Bilbo's current gold is 9 and hit points are 20 but
the file's current score is 12 gold and 10 hit points, because the file has a
higher gold value, the current value of 20 hit points are not
recorded into the file. If the file doesn't exist then the
program should create a new file and then record Bilbo's current two
stats. If the file does exist then it will only update the two lines
if the amount of gold in the current game exceeds the gold score
recorded in the file. High scores are recorded only if Bilbo is
still alive: if the file exists when he dies then it remains
unchanged, if it didn't exist and Bilbo dies then a new one won't be
created.
|
|
- Extra bonus feature: instead a text-based game, a graphical library is used (e.g., "tkinter").
The interface itself can still be console based (i.e., select a menu
option via keyboard input) only the output need be graphical. Your
graphics don't have to be fancy (e.g., you can use different
shapes, color and/or labels to distinguish the objects) but the
graphical version must be understandable (e.g., don't use rectangles of the same size
and appearance for Bilbo, the treasure, the walls and the dragon
fire). You won't get a lot of extra marks for implementing this
feature (because graphics isn't a key feature of this program). But
I did include this feature in case you wanted to spice up your
program and/or you wanted to increase the probability that your
assignment received a higher grade. (Or perhaps because you were
bored because you found the existing assignment far too easy).
|
|