The aim of this assignment is to implement a simple adventure game. The exercise will extend your programming experience further, introducing you to:

  • The decision-making process inherent in designing and building more complex object-oriented systems.
  • A bigger and less guided programming task than you experienced in Assignment 1.
  • The development of graphical user interfaces.
  • The idea of soliciting and analysing user feedback on your work.

Adventure games

Computer games have been around since the creation of the first computers. Adventure games place the player in an interactive story in an artificial world — possibly fantastical, possibly mundane. Usually there is an ultimate goal, ranging from traditional ones such as “escape” or “rescue the helpless prince from the scary dragon” to more surpring ones such as “die” or “don’t lose your mind”. There are often puzzles to solve and game characters to interact with: game characters have varying motivations — some are there to help you, others to get in your way, some just don’t seem to be there for any reason at all, and all of them might change their role according to your behaviour torward them. You might find the Wikipedia article on Adventure Games an interesting read, particularly since this assignment takes you back to the early days of computing, and such titles as Colossal Cave Adventure.


By the end of the exercise you will have written a simple adventure game with the following features:

  • The user can interact with the game through a series of pre-defined commands.
  • The user executes these commands through a graphical user interface.
  • The execution of commands causes the graphical interface to be updated.

Task 0: Game design

The first step in this assignment is to design the game scenario. You should decide on a theme for the game, where the action takes place, and a goal for the player. There are some ideas to help you on page 204 of Objects First with Java (Fourth Edition; page 192 of the Third Edition), but you’ll probably find it more rewarding to develop your own scenario. Write a design document describing the following components of the game:

  • Storyline/theme: What is the game about? Will the user take part in a story?
  • Setting: Where does the game take place? List and describe the locations. You may draw a map if you prefer (hand drawn sketches are fine). Find a picture to represent each location. You could draw your own picture, or use your own photos if you prefer.
  • Characters: Does the player encounter any characters during the game? What do they look like? What kind of people are they? You may choose to include your chat bot character from Assignment 1. Find or draw a picture to represent each character.
  • User Actions/Rules: What actions can the user take in the game world? The “go”, “help” and “quit” commands are the basic commands. Are there any other rules? Please specify at least three additional commands.
  • User interface design: The user interacts with the game world through a graphical user interface. Every location should be represented by an image. In rooms which have characters, a picture of the character should also appear. The user should be able to talk to the character. Sketch this interface, and indicate how the interface widgets relate to the actions and rules you have specified.

Task 1: Game Implementation

You will build on the adventure game from Chapter Seven of Objects First with Java in this exercise. You should make sure that you document your code using JavaDoc4comments. Credit will be given for use of good software engineering principles, including but not limited to high cohesion, low coupling, responsibility-driven design, commenting and documentation. You may find that you want to revise your design when you start to implement it. It’s OK to change your design, but you should note such changes in your documentation.

  • Implement the locations you chose for your game. Each location should contain an image which represents it visually. You may build on the Room class in the example code. Set up your locations in the GameEngine code.
  • Implement the actions for your game by augmenting the existing Command and CommandWords classes, and updating the GameEngine code.
  • Implement a class called Character to represent the characters in your game. One way to do this is to integrate your chat bot code from Assignment 1. Each character will be confined to a room. A room can contain only one character. The character should have a picture associated with it for display. If a player is in the room with a character, they can interact with the character by typing the command “talk X Y”, where X is the name of the character and Y is the remark the player wishes to make (or you may be able to design an easier way to start a conversation).
  • Implement the user interface which you designed in Task 0. The GUI code should be contained in a class called UserInterface. This class should interact with the GameEngine class in order to have commands executed.

To demonstrate the features of your game, you should submit several screen captures which show the different locations, and sample interactions. This will allow us to see the best features of your game, even if we can’t play it well enough to access all the locations! Alternatively, you may submit a short (max- imum 2 minutes) screen capture video which illustrates a typical interaction with your game. Submit these in a directory called ScreenCaptures.

There are no explicit marks for these files, but they will be used to assess the implementation, so you are likely to lose marks on the implementation if these are not present, or not clear.

Task 2: Evaluation

There’s no point in making a game if nobody plays it! User evaluation is an important part of game development and good software engineering. In this part of the assignment you will gather feedback about your game from three players, and reflect on their comments.

The course web page for the assignment5contains a PDF evaluation form. You should download this form and ask three different players to complete copies - you can choose anyone to evaluate your game, from any age group and any level of computer literacy. If possible, try to ask members of your target user group to evaluate the game. It should be possible to fill in the forms online, using most popular PDF viewers. If your evaluators are unable to complete the PDF forms themselves, then you may copy their comments on to the form yourself. But, please check that the submitted forms contain all of the information that you intend6.

You should submit the three completed forms, together with a a one page report summarizing the results of your evaluation. List the features which you would like to improve, and bugs which you would like to fix. Place the completed forms and your report in a directory called Evaluation. Please see the comments on the Wiki7about formats for submitted text documents.

Academic Honesty!
It is not our intention to break the school's academic policy. Projects posted are only used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly fill out the form. Please provide a valid email address and we'll get back to you in less than 24 hours. We will be sending an invoice through PayPal upon confirmation. We are a non profit organization however we need an amount to keep this organization running, and to be able to complete our research and development.