Inspired by having played the classic Crowther and Woods Adventure
interactive fiction game as a teenager many years ago (a web-based
version of the game is available), the adventure game has always been one of my favorite assignments. For this
assignment, the student has to write a program that will simulate an adventurer traveling through an environment.
When executed, the program presents situations and the user types in a simple English phrase as to what action
the adventurer should next perform.

What is so great about this assignment?

For the student, it requires the use of many concepts together instead of a single idea and task, in a way that
allows for more creativity and latitude for personalization on the part of the student. It has been described as
the "longest, hardest, most interesting" program when students were surveyed
one year after having performed the assignment, but many appreciated the challenge presented as well as the reward
of a greater sense of accomplishment as the program "actually did something." A major factor in making
this nifty for the student is the availability of extra credit. You'll be amazed as to what lengths students will
go to for extra points... and I'm willing to give it to them if it motivates them to learn more about programming.
Some examples of extra credit can be found in the Escape to Pokagon program.

For the instructor, this assignment is nifty as there is great latitude in how one can present this assignment.
Normally, a minimum set of operations (such as movement and object manipulation) and rooms are specified. From
this basis point one can present a skeletal program specifying both the data structures and function prototypes,
and ask for the implementation of the functions that manipulate the structures; provide detailed map and room descriptions
as a framework and ask that it be implemented; or just specify a theme and some sample interactions and leave the
students to their own designs.

Another reason why this is nifty is because this site has plenty of resources available for your use, so you're
not having to re-invent the wheel should you decide to adopt this assignment for your course. An example
of the typical assignment I use is "Escape to Pokagon," where the students
must simulate the exploration of at least a portion of Pokagon
State Park in Indiana. This example contains (hopefully!) everything you'll need to adopt an adventure game
assignment: handouts describing the game and outlining opportunities for extra credit, sample code in C++ for both
test programs and a full text-based implementation (header files and documentation available on site, source code
available only by faculty request), sample data files for describing rooms and items, and even a surprise or two
from students having done this program. The program is in the format of an adventure game engine, so by just changing
the data files you'll change the entire "window dressing" of the assignment but leave the contents untouched.
As illustration, another assignment, "In the Middle, a Cauldron Boiling,"
based (very loosely) on the play "Macbeth" by William Shakespeare, is presented here.

What does it teach?

This assignment, more than anything else, teaches a student how to handle the development of a (relatively) large
program. It serves as a capstone to the course experience, tying together many of the concepts explored during
the tenure of the course. It rewards those students who take a modular approach to program design.

How hard is it?

When surveyed, several students wrote that the assignment was hard, primarily as it called
upon them to use the knowledge acquired over a course instead of focusing on just the latest topic currently being
discussed in lecture. Some of the statistical results of this survey would lead one to believe that the assignment
is not as bad as some were to make it out. For the question, "The adventure game was technically difficult
to write," the average response was 2.80, which indicates that the assignment pushed the students a bit, but
did not overwhelm. It should be pointed out that in the survey students were asked both whether the adventure game
was interesting to write and whether it was fun to write. The students found the problem to be very interesting
(a 4.24 average with only 2 students indicating any sort of disagreement), but not nearly as much fun (a response
of 3.64, which is still solidly in agreement).

How long does it take?

Students are given two to three weeks following the distribution of the assignment to complete the project. One
class period is used to discuss the assignment, explain a bit about the adventure game format for those who are
unfamiliar with the concept, and survey some of the various design issues that need to be dealt with when implementing
the solution.

What niche is it suited for?

This is suitable for CS1/CS2 and - surprisingly - assembly language. I have used it in assembly language as a vehicle
for "getting under the hood" as you'll need to play with arrays, records, pointers, and strings in order
to get things to work.

What does it depend on?

Knowing the basic forms of data representation (e.g. records/classes, arrays/vectors, and strings) and how to access,
relate, and manipulate such data using pointers/references. Highly suited for OOP, but can be implemented in any
language.

What are its strengths and weaknesses?

Strengths: students like the challenge of a "large" assignment such as this. They realize that one must
have a good grasp of all of the concepts covered in class in order to accomplish this task; accordingly, there
is a great deal of satisfaction when the assignment is completed. Students also enjoy having the freedom to be
creative with their implementation, which is an effective motivational tool. The availability of extra credit is
also a strength, as there are many avenues for improving upon the basic design. Students choosing to pursue the
extra credit option have to make design decisions, submit a written proposal, and often study some aspect of computer
science that has not been covered in the course lecture.

Weaknesses: some students consider the assignment tedious due to the amount of descriptive text that can be entered;
it is also tedious to implement in assembly language. As it serves as a course capstone, if a student does not
grasp one component of the course it is entirely possible that that student will not be able to complete the assignment.

Are there any lessons on assignment craft in general that can be drawn from the assignment?

Treat the crafting of an assignment as an exercise in marketing; how you package the product does makes a difference
when you ask your students to buy into the concept. It is similar to buying cereal at the grocery store - many
of the products are similar on the inside, so what makes one cereal favored over another? The display on the outside...

Make the result of the assignment something tangible, at least as much as it is possible to do so. This could
be something that the student would like to play with (such as an adventure game) or can see that there is a legitimate
purpose that the program can be applied towards.

Extra credit is a great motivational tool; at the very least, its presence in an assignment gives students
a feeling of ownership as there are now some design choices that they get to make. The best programs I've seen
from students have been those written with pursuit of extra credit points in mind.

Web page created 9 February 2002 by John K. Estell, ECCS Department, Ohio Northern University.
Last site update: 11 February 2002