next up previous
Next: About this document ...

Assignment #1
Bridging the gap from 2D to 3D
CpSc 481: 3D Game Engine Development
Andrew Duchowski & Brian Malloy
Computer Science Department
Clemson University
January 24, 2006



In order to receive credit for this assignment, your solution must be submitted, using the handin command, by 8AM on Tuesday, Februray 7th, 2006. 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.

The purpose of this assignment is to help you to bridge the gap from 2D animation to 3D animation using the Simple Directmedia Layer (SDL) and OpenGL.

Figure 1: 2D SDL animation. This figure illustrates a crow on a background.
Image flyingcrow

During the lectures, we have presented the basics of the Simple Directmedia Layer (SDL) and some basics about the C $\mkern-2mu\raise.50ex\hbox{{\tiny +}}\mkern-1mu\raise.50ex\hbox{\tiny +}$ Language. To illustrate SDL and C $\mkern-2mu\raise.50ex\hbox{{\tiny +}}\mkern-1mu\raise.50ex\hbox{\tiny +}$, we have also presented a 2D SDL animation that includes a background and a crow moving across the background; an illustration of this animation is shown in Figure 1, and the source code can be found at: 2D SDL Crow Animation

We will also present this same animation using SDL and OpenGL, which you can use as starting point code for this first assignment. You can find the starting point code at: SDL/OpenGL Crow Animation

Your assignment is to modify the starting point code, which implements the OpenGL version of the animation, as follows:

  1. Refactor1 the starting point code to include an Object class that encapsulates the data attributes, and operatons on the data attributes, for the crow object.
  2. Extend the starting point code so that the wings of the crow flap.
  3. Extend the starting point code so that your program intercepts a key, r, which causes the crow to rotate 360 degrees.
  4. Incorporate a vector of Objects into your program. This vector of Objects should allow you to animate lots of crows and each crow should move independently of other crows, different speed and different start location. We added a vector of Sprites in our SDL example: Vector of crows

    When the user types $r$, try to make the crow closest to the middle of the screen rotate!

We will leverage SDL to manage some of the tedious aspects of game development such as reading images, managing a game clock, and intercepting key strokes from the user. We will leverage OpenGL to implement additional functionality not included in SDL and to incorporate 3D into our game development. For example, SDL does does not include functionality to rotate sprites.

You should study the example code that we have provided to make sure that you understand how it works. You should feel free to modify the starting point code to suit your unique solution to the problem. Your solution must be writen in the C++ language. You can find OpenGL compatible images for your animation at: OpenGL images

Here is the handin command:

        handin.481.1 1 *




next up previous
Next: About this document ...
Brian Malloy 2006-01-24