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:

  1. Start with a fixed list of balloons as the world state.
  2. 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.
  3. 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).
  4. Change the function that you call on tick to move all the balloons up by a fixed distance.
  5. 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.
  6. 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.
  7. 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:

CSci 1301 course web site.