CSci 1301: Lab 7
Due: Wednesday, November 8th at 11:59pm by e-mail
What to submit
The lab is done in groups of 2. In the beginning of
each file please
write (in comments) the names fo all group members.
At the end of the lab please send me and your group
partner(s) all your Racket files as e-mail
attachments. My e-mail is elenam at
morris.umn.edu. The subject of your e-mail must be "1301
Lab 7" followed by "Final" or "Not final", depending on whether this
is a final submission or you are still working on it. If you need to
finish it, make sure to set up a time with your group partner(s) to
finish the lab.
Also for this lab please submit your screen recording (as specified
below) and a short (at least half a page on google docs) reflection
on what you have learned about your workflow from watching this
recording.
Task 1: balloon problem (30 points)
Start with the balloon
exercise and implement the world functionality.
Specifically:
- Start with a fixed list of balloons as the world state.
- Add a function
show
that draws all balloons in the list on the canvas. Your on-tick function can just be do-nothing
at this point.
- Once you get it to work, change the initial state to a function call that generates a list of balloons at random positions at the bottom of the screen with a random size (i.e. the
scaling factor) between 0.5 and 1.5 and of a random color (use your own colors; you may want to change the color chooser to randomly choosing from a list of colors).
- Change the function that you call on tick to move all the balloons up by a fixed distance.
- Further change it so that when a balloon disappears from the screen, it is removed from the list. You should write a predicate
is-visible?
that checks if a balloon is still visible on the canvas. This feature is very important for writing games: if you don't remove invisible objects, you get too many of them and your game starts slowing down.
- Further change the function that you call on every tick, to add a new ballloon at the bottom of the canvas on every clock tick.
- Change your solution by adding an additional feature (you may
change your solution to the previous question; comment out the old
code, but don't delete it. You can add features such as: adding a
new balloon with some probability rather than on every clock tick
(to avoid filling up the screen too quickly). You
can add "wind" that makes balloons shift horizontally, in addition
to vertically. You can have a balloon pop at random, or when it hits
a tree branch.
Avoid solutions that require a change to the world state.
Especially interesting solutions may get an extra credit.
Clearly document the features that you are adding. Make sure that your
functions have good names and signatures and descriptions.
Task 2 (at the same time as working on Task 1), 5 points
The purpose of this task is to help you understand how you work on
getting your programs to work correctly. You may volunteer to allow
your screen recording be used for a research study on beginner
programmers use of error messages, but it's not required.
The rest of the steps are required for everyone in the class.
The recording is not a camera, it only records what's happening on the screen.
It doesn't record you or any of the sounds around or on the computer,
or any contents of files on the computer,
or any keys that you are pressing.
Task 3, reflection on screen recording (10 points)
This is an individual part of the lab! You probably would be doing it
outside of the lab time.
Watch the screen recording of your lab. Write a short (about half a
page in google docs or equivalent) reflection on this process:
- What specific goals were you trying to accomplish?
- What kinds of things you tried? Did tehy get you closer to the
solution or farther?
- Watching the recording, would you say that there were some cues
that you were overlooking? What were they, if any?
- What kinds of things would you need to be paying more attention to?
- Were there any things that you were trying to accomplish that
were particularly confusing? What helped, or would've helped, to deal
with the confusion?
- Was your code good quality? What did you do to make it readable and
understandable? Should you be doing more in this direction? If yes, what?
- What was the most surprising thing in watching your recording?
- Did you find it overall useful to watch a recording of your workflow? Why,
or why not?
CSci 1301
course web site.