next up previous
Next: About this document ...

September 5, 2005

Assignment #1
CpSc 481: 2D Game Engine Construction
Computer Science Department
Clemson University
Animation with SDL
Brian Malloy, PhD
September 5, 2005



In order to receive credit for this assignment, your solution must be submitted, using the handin command, by 8AM Tuesday, September 20th, 2005. I will zip your files and move them to my directory at that time. You may submit your solution before the deadline as many times as you like; only your final submission will be considered. However, for multiple submissions, it's best to use the same names for files, since only those will be overwritten by your submission.

The purpose of this assignment is to help you to become familiar with animation using the Simple Directmedia Layer, SDL. I have placed code on my webpage, written in C or C++, illustrating some sample animations. Your assignment is to build a simple animation using the SDL API. Your animation should have at least 2 sprites that move and an appropriate background. You can receive at least 90% of the points by building an animation similar to the one illustrated in Figure 1 and demontrated in class. To obtain 100%, you should try to do a bit more. For example, Figure 2 illustrates an animation with a crow flying across the screen, wings a flappin'!

Figure 1: Simple animation. Your solution can be similar to this.
\includegraphics[width=0.30\textwidth]{figures/simpleanimation}

Figure 2: More involved animation. This animation contains a crow, flapping its wings, as it moves across the screen.
\includegraphics[width=0.30\textwidth]{figures/crow}

You should study the examples on my web page, which include code demonstrations of how to blit and move a sprite, how to set the transparency bit in SDL, and other important illustrations. Another thing to keep in mind is that the next few assignments will likely be extensions of this assignment. Thus, you may want to write your code as clearly and as modularly as possible. For example, adding a second or third sprite should entail a simple instantiation of a class and a few invocations of methods of the newly instantiated object.

You may write your solution in either C or C++. I have provided some animations in C++ on my webpage.

Here is the handin command:

        handin.481.1 1 *




next up previous
Next: About this document ...
Brian Malloy 2005-09-05