CSci 1301: Project
Intermediate submission: Wednesday, October 28 at 10:20am by
e-mail (right after the class)
Final submission: Monday, November 2nd at 11:59pm.
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
choose an item from a drop-down menu, and another one creates a simple
text form to type in input. In the sample file there are examples of
using the forms.
Your game must have two phases: 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 if it makes sense for
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 input_form.ss. It has
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
- You will need to change the language to Intermediate
Student with lambda because of some features that the forms
functions use. The difference that you will see is in how lists are
displayed: instead of
cons
they will be displayed using
list
Requirements for a game
Features:
- You must have at least 5 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.
- Your projects will be posted for voting (just like the cartoons)
so please be respectful of your audience: no inappropriate language or
topics please.
Programming requirements:
- Lists must be used for storing collections of items. Using
structures in addition to lists is a bonus, but not required.
- You must write and use at least three recursive functions.
- 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.
Resources and background:
- Your main type of data is strings. Recall that strings are
collections of text in double-quotes. Some helpful string functions:
string=?
(or you may use equal?
),
string-append
that takes two or more strings and
combines them into one string (see the example input_form.ss).
If you need more, check out predefined
functions.
- You may use any of the predefined functions.
draw-solid-string
is a function that displays text on
canvas. Unfortunately there is no way to set the color or the font. If
you use dark background, place a lighter color rectangle in the area
of the canvas where you need to display the text.
Questions?
- During the class time professor Kristin Lamberty and Billy will be
in the lab for some time to answer your questions.
- There is a wiki page set up, feel free to post and answer
questions: http://wiki.umn.edu/view/ElenaUMMCsci/ProjectDiscussion1301
-
E-mail me your questions, I will get back to you as soon as I
can.
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 and style of code, your attendance during class
times, and the
extra credit based on other students' feedback.
CSci 1301
course web site.