Game Design Lab 5
Practice with Motion and Gravity
Today's lab is intended to let you practice with movement in 3D environments, including motion and collision detection. It is (somewhat) more complicated that project 1, but with a similar nature.
A staircase has been set up in a teapot game derived world. Look in lab5 in the class examples area, and use lab5.cpp and Makefile. lab5.cpp has three items for you to complete:
- The stair_height function isn't completed. Finish this, and it will be possible to walk up the staircase.
- The "cycle" method of the GravBall class isn't completed. Finish this, and make balls roll/bounce down the stairs
- Add a thread that makes a new ball every second for 100 seconds. You can use sleep() to time the loop in this thread. This will give you a chance to try out c++ threads. An example has been included of a delayed start for a single ball.