CSci 1301: Problem Set 10 (Project: Designing a game)
Total: 50 points + possible extra credit based on voting
Intermediate submission: Friday, December 3rd at 6pm by
e-mail
Final submission: Tuesday, December 7th at 11:59pm by e-mail.
As always, please include a contract and a purpose for
each function. Functions that are not graphical also require
examples and tests.
Work in groups of 2 or 3. You may not put more than 10 hours
(including in-class time) into this project.
Designing a small game
Your task is to design a small game (or a "create your own adventure"
story) that gives the user choices and creates a story based on these
choices. There are two forms provided for you, one that allows a user
to choose an item from a drop-down menu, and another one creates a simple
text form to type in input. The sample file has examples of
using the forms.
Your game must have two phases: an accumulation phase in which a
character acquires some items or properties that can be used
later. Those might be treasures, weapons, powers - whatever is
appropriate for your game. They must be stored as a list or lists. You
may represent individual items as structures or strings or numbers:
whatever works better with your game.
The second phase uses the items. The items may be taken off the list
or transformed or their quantities reduced, i.e. the list(s) must be
modified somehow.
Throughout the game you will use the canvas to tell the story. The
canvas will display text and/or drawings. You don't need to draw every
step of the game, but the pictures should be sufficient to illustrate
key points. Be creative.
Important notes
- Start by copying the file project_start.rkt. It has the
predefined functions for forms (that you can just use, you don't need
to understand the code) and a sample of using these functions. Please
study the sample code carefully, read all the comments.
- The two functions provided are
get-choice
and
get-answer
. Read their contract and purpose
carefully.
- You will need teachpacks gui.ss and draw.ss
- The language is Advanced
Student
Requirements for a game
Features:
- You must have at least 3 rounds in the accumulating stage of the
game and at least 3 in the stage that uses the accumulated
items.
- The canvas must be updated at least 10 times throughout the game. At
least 5 of these updates must be drawings.
- You must use user input at least three times.
- You may use randomness if you want.
- Be creative.
Programming requirements:
- Lists must be used for storing collections of items. Using
structures in addition to lists is a bonus, but not required.
- You may use predefined list functions (map, build-list, etc.)
and/or write your own recursive functions. At least 5 uses of
recursion (direct or via predefined functions) are required.
- You will be modifying existing lists using
set!
or
its variations. At least one function that uses a variable in-place
update is required.
- Complexity of your game will be graded. Satisfying just the
minimum requirements may not give you full credit. You should use
extra features, as appropriate for your game. They may include:
structures, more recursive functions (direct or indirect), extra
drawings or memory
updates, randomness, etc. Make sure to document the extra features
that you are using for your final submission.
- Your program has to be well written and easy to read. Avoid code
duplication: if you find yourself writing very similar code several
times, you probably need a function for that functionality.
Grading criteria
The work will be graded based on satisfying the requirements above,
the quality and level of your work (more challenging projects will get
more credit), creativity and originality of your project,
clarity, style, and documentation of your code, your attendance during
project lab
time, and the
extra credit based on voting.
CSci 1301
course web site.