Foundations of Game Programming and Computer Graphics
The theory and practice of 3D graphics for computer games. Topics include: vectors and quaternions; hierarchical transformations; camera and perspective; hardware-accelerated real-time rendering; texture and texture mapping; illumination; and particle systems. Additional topics may include rigid-body motion, character animation, shadows, and screen-space special effects.
Study notes
Independent, AI-drafted study guide · Public sources linked below · Added November 5, 2026
Original guide aligned to the public Fall 2026 outline. The outline identifies course topics; explanations and exercises are independently written.
Vectors, coordinate frames, and orientation
A point identifies a location; a vector represents a displacement or direction. The dot product relates directions and supports projection, while the cross product produces an oriented perpendicular vector in three dimensions. Normalize when a formula assumes unit length, and handle the zero vector explicitly. Coordinates only have meaning relative to a frame. A direction expressed in object coordinates cannot be compared directly with a light direction expressed in world coordinates without a transformation.
References: Physically Based Rendering — geometry, transforms, cameras, textures
Transformations and hierarchy
Homogeneous coordinates express translation, rotation, and scale using matrices. Matrix multiplication is generally noncommutative, so the order of operations is part of the model. A child object's world transformation combines its local transformation with its parent's world transformation under the selected vector convention. Camera view transformations convert world coordinates into the camera frame; projection then maps visible geometry toward screen coordinates. Keep conventions explicit, including handedness, axis directions, multiplication order, and the meaning of depth.
References: Physically Based Rendering — geometry, transforms, cameras, textures
Worked hierarchical transformation
Using column vectors, let a child's local point be (1,0,0,1). Scale by two and then translate by three on x: T*S*p gives x=5. Reversing the order gives S*T*p with x=8 because the translation is also scaled. A robot arm exhibits the same issue: translating to a joint and rotating around it differs from rotating the whole arm around the world origin. Compute a simple point by hand to debug a complicated matrix chain.
References: Physically Based Rendering — geometry, transforms, cameras, textures
Meshes, normals, and texture coordinates
A triangle mesh represents a surface through vertices and connectivity. Vertex positions, normals, colors, and texture coordinates may require different values across seams even at a shared geometric location. A surface normal transforms with the inverse transpose of the linear transformation when nonuniform scaling is present. Texture coordinates map a surface to image samples; filtering and mipmaps reduce aliasing when many texels map to one pixel. A normal map changes local shading directions without adding the corresponding geometric silhouette.
References: Physically Based Rendering — geometry, transforms, cameras, textures
The graphics pipeline and illumination
A typical raster pipeline transforms vertices, assembles primitives, clips them, determines covered fragments, shades them, and applies depth and blending operations. Interpolation supplies fragment attributes, with perspective correction needed for quantities such as texture coordinates. Diffuse illumination depends on the angle between the surface normal and light direction; a specular term depends on viewing geometry and material assumptions. A shading model approximates appearance and should be evaluated under its assumptions rather than mistaken for a universal physical law.
References: Physically Based Rendering — geometry, transforms, cameras, textures
Quaternions, particles, and practical debugging
Unit quaternions represent orientations compactly and avoid some difficulties of Euler-angle parameterizations. Composition order still matters, and interpolation should respect orientation geometry. A particle system updates many simple entities with state such as position, velocity, lifetime, and color. Separate simulation time from rendering rate when frame variation would otherwise change motion. Debug graphics incrementally: verify coordinates, render simple colors, visualize normals, disable effects, and test one transform at a time before combining lighting, textures, animation, and shadows.
References: Physically Based Rendering — geometry, transforms, cameras, textures
Practice & worked answers
Original exercises for this guide.
1. Why can a sphere's lighting look wrong after scaling it differently along each axis?
Show worked answer
Applying the same scale matrix directly to normals no longer preserves their perpendicularity to the surface. Use the inverse-transpose normal transformation and renormalize. Ensure both the light direction and transformed normal are expressed in the same frame.
2. Does a detailed normal map make an object's outline more detailed?
Show worked answer
No. It perturbs shading normals but leaves the base surface and silhouette unchanged. Geometric detail or a technique that changes actual geometry is needed when the outline itself must change.
Public notes & references
Course sources establish the scope above. Reference materials support the explanations; linked lecture notes and books remain with their authors.
2026
Topics
- Mathematical foundations: vectors, dot and cross product, quaternions, Cartesian and polar
- coordinate systems
- Matrix transformations: translation, rotation, scale, orbit, hierarchical transformations, per
- spective transformations
- Geometry and texture: mesh representations, texture coordinates, bump and normal mapping
- Elementary graphics algorithms: visibility, interpolation, intersection
- Graphics Hardware: graphics pipeline, rasterization, pixel and vertex shaders
- Special effects: particle systems, screen-space shaders, shadows
Readings
- McGuire’s Graphics Codex, available at graphicscodex.com.
Prerequisites & course information
Prerequisite(s): COMP 2402 and ( COMP 2404 or SYSC 3010 or SYSC 3110 ). Lectures three hours a week.