One of my personal goals in 2010 was to learn 3D programming and make a game. I enrolled in a part time graduate course at Concordia University on Wednesday evenings and learned graphics from ground zero. I think about 75% of the course was math – linear algebra, quaternions, yikes. Anyway, for the final project, we were tasked to create a 3D game, so this was my effort.
Update: I got top marks in the class for the term overall (A+) and 99.6% for this game. Here’s the report with the making of in more detail.
Teapot Master
The Walking Teapots have been stolen and scattered over CG land. Your job is to bring them back.
The user controls a ball using the keyboard. Using the ball, you can roll around a 3D environment. The walking teapots are scared of anything that goes near them, so you have to “herd” them in the direction you want.

Your goal is to herd the walking teapots into the Cornell Box.

The teapots are scared of you and will try to run away. When they are alarmed, an exclamation mark appears.
Teapot Master was a one man project produced in my spare time. I had the term to make the game, but pretty much all of the work came down to the last three weeks of evenings and weekends as I’m pretty busy with my day job. I wrote the game using C++ and OpenGL, developing my own scene graph, AI, collision detection and shaders. I had already developed the scene graph in a previous assignment, as well as an OBJ file loader. I also produced all the assets in Maya and did the global illumination & ambient occlusion bake to texture.
Inspiration
The idea for the game was a mashup of concepts. I like the walking teapots that Pixar gives away at SIGGRAPH. I also liked the game mechanics of Flock by Proper Games where you herd animals into a spaceship. When I thought about how I could combine the two, I remembered that Pixar has a toy ball from Luxo Jr, which is used frequently as an inside joke for research papers (along with teapots). I also liked the “rolling around” player mechanics from Marble Blast. So that was basically how I came up with the idea for the game.
For the level, I decided that since I was doing so much Pixar-inspired stuff, I’d model the room after Andy’s room in Toy Story.
As the goal for the teapots to run into, I still needed a box of some kind, so what better than a Cornell Box?
Content Creation
I modeled everything in Autodesk Maya using polygons. The models were then exported as OBJ’s which my scene graph could read.
Because I’m new to all this, and hadn’t touched GLSL before two weeks ago, I decided that in order to make the game look good, I’d attempt to bake global illumination and ambient occlusion to textures. I was able to do this with Maya.

All assets were modeled in Maya.

An early Global Illumination test using Mental Ray. The Buzz/Woody texture was removed in the game.

Global illumination was baked to texture. Here's the floor.

The walking teapot, with ambient occlusion baked to texture.
Technical
I developed Teapot Master in C++ and OpenGL. The application was built on Windows 7 and Mac OS X Snow Leopard.
The major software components that I developed were:
- Hierarchical scene graph
- OBJ loader
- Player control and dynamics
- Collision detection
- AI
- Blinn-Phong Shaders
I used these libraries:
Download Teapot Master
Windows 7 and Windows Vista
TeapotMasterInstaller.msi
Note: Apologies to OS X users. The game was developed on OS X in addition to Windows, but I wasn’t able to successfully test it on other machines, so I’m only making the Windows installer available.
Instructions
WASD keys: Roll the ball
Arrow keys: Orbit the camera
Escape: Quit the game
Herd the walking teapots into the Cornell Box.