CS 70

Homework 3: Make Your First Asciimation

It's time to make your first movie! In this step, we will fill in the makeOurMovie function in our-movie.cpp so that it can do the following:

  • Create an Asciimation object that contains a Sprite generated from spriteImages/mystery1.txt, with its initial position in row 10, column 30.
  • Play the movie

Viewers of the movie should be able to exit by pressing q.

Your Task

Fill in the makeOurMovie function to

  1. Create an Asciimation object using the sprite file spriteImages/mystery1.txt.
  2. Set the initial sprite position to row 10, column 30.
  3. Call the play() function to run the animation.

Helpful Hints

  • LHS Cow speaking

    Here are some tips for running your first animation!

Running on the Course Server

When you run your animation,

  1. Make sure your terminal window is large enough (at least 80 columns by 40 rows).
  2. Run the program from the terminal with ./our-movie.
  3. The animation will take over your terminal window.
  4. Press q to quit the animation.

Terminal Size Matters

If your terminal is too small, the animation may look garbled or parts may be cut off. You can resize your terminal window by dragging its edges in VS Code, or by using your terminal emulator's settings if connecting via SSH. (Most modern terminal applications will automatically set the terminal size for you when you resize the window on your machine.)

Testing 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 display a message.

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.)