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 aSprite
generated fromspriteImages/mystery1.txt
, with its initial position in row10
, column30
. - Play the movie
Viewers of the movie should be able to exit by pressing q.
Your Task
Fill in the makeOurMovie
function to
- Create an
Asciimation
object using the sprite filespriteImages/mystery1.txt
. - Set the initial sprite position to row 10, column 30.
- Call the
play()
function to run the animation.
Helpful Hints
Here are some tips for running your first animation!
Running on the Course Server
When you run your animation,
- Make sure your terminal window is large enough (at least 80 columns by 40 rows).
- Run the program from the terminal with
./our-movie
. - The animation will take over your terminal window.
- 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.
(When logged in, completion status appears here.)