CS 70

Homework 3: Make Your First Asciimation

It’s time to make your movie! In this step, you will fill in the makeExampleMovie function in our-movie.cpp so that it will

  1. Create an Asciimation object that contains a Sprite generated from sprite-images/mystery1.txt.

    • Recall that the first two arguments are the number of rows and columns. You’ll want a movie that is bigger than your Sprite; the values 20,80 are a good place to start.
    • The second two arguments are the rowHeight and colWidth. You should have your rowHeight be twice the value of colWidth; the values 30,15 are a good place to start
  2. Call generateMovie and write the animation to example-movie.mp4 with 25 frames per second.

Helpful Hints

Run the Executable from the Command Line

Don’t try to run the our-movie executable by double-clicking. Instead, run it in the Docker image with the terminal command ./our-movie.

Test Your Code

When you think you have everything implemented for this step, you should recompile and run your our-movie program. If everything is working right, your asciimation program should create a file called example-movie.mp4 that holds a secret message.

If the Video Won't Play

  • Check to make sure that you're actually adding frames to the video. A video with zero frames won't play!
  • Check to make sure that the dimensions of your movie and frame are correct and that your coordinates for placing characters are correct. If things don't match up, the movie file might not play.

If There Are Weird Characters in Your Movie

  • LHS Cow speaking

    Hire a better screenwriter.

  • RHS Cow speaking

    Just kidding.

  • Jo speaking

    Sometimes they just need more coffee!!

If the characters in your movie aren't right, check the following (e.g., using print statements):

  • Is the filename you're using correct? Is the file where you said it would be?
  • Are the characters being streamed in correctly?
  • Are the streamed characters going to the right places in the array?
  • Are the correct coordinates being passed into getCharAt?
  • Does getCharAt access the correct location in the array for the coordinates it is given?
  • Does addFrame use the characters it gets properly when creating the image?

To Complete This Part of the Assignment

You'll know you're done with this part of the assignment when you've done all of the following:

(When logged in, completion status appears here.)