everything.study
COMP 2501

Computer Game Design and Development

0.5 credit · Undergraduate

Introduction to the practical development of computer games and engine architecture. Topics include: vector and matrix operations; coordinate systems and transformations; physical simulation; collision detection; AI; path planning; hardware-accelerated real-time rendering. Special attention is given to implementation of real-time rendering in a low-level language.

Study notes

Independent, AI-drafted study guide · Public sources linked below · Added November 5, 2026

Independent guide aligned with the 2026–27 calendar description only. Godot’s primary engine documentation supplies supplementary explanations of general mathematics and simulation concepts; this does not claim that the course uses Godot.

Game loops, state, and time

A real-time game repeatedly gathers input, advances simulation, and renders the resulting world. Simulation time and presentation time need not advance in identical increments. A variable timestep can make numerical behavior depend on frame rate; a fixed simulation step makes many interactions easier to reason about. Rendering can interpolate between completed simulation states for smooth presentation. Keep units explicit: position += velocity * dt uses elapsed time rather than assuming every frame lasts the same duration. A long frame may require several simulation steps, but bound catch-up work to avoid an escalating backlog.

References: Carleton Undergraduate Calendar — COMP 2501 · Godot Engine — Math tutorials

Coordinate spaces and the transformation pipeline

Geometry begins in a model’s local space and moves through world, camera/view, and projection transforms before reaching screen coordinates. Keep the meaning of each position and direction explicit; subtracting a world-space point from a local-space point is meaningless until one is transformed. Matrix composition order depends on the vector convention. Perspective projection makes distant objects smaller and requires division by a homogeneous coordinate. Clipping removes geometry outside the viewing volume. Depth testing resolves many visibility relationships, while transparency usually requires additional ordering or another blending strategy.

References: Carleton Undergraduate Calendar — COMP 2501 · Godot Engine — Math tutorials

Forces, integration, and a worked motion example

Velocity is the rate of position change; acceleration is the rate of velocity change. A simple semi-implicit Euler step first updates velocity and then updates position using the new velocity. Starting at position 0 with velocity 2, acceleration 3, and dt = 0.1 gives velocity 2.3 and position 0.23. This is a numerical approximation, not the exact continuous trajectory. Smaller steps generally reduce some integration errors but increase work. Discontinuous events such as impacts require a separate collision response rather than simply allowing bodies to pass through each other.

References: Carleton Undergraduate Calendar — COMP 2501 · Godot Engine — Physics introduction

Collision detection, bounds, and response

Use a broad phase to find plausible pairs and a narrow phase to evaluate their geometry more accurately. Axis-aligned boxes are inexpensive to compare but may fit rotated objects loosely. A collision test asks whether shapes overlap; response determines how the simulation changes afterward. Penetration correction, velocity changes, friction, and restitution serve different purposes. Fast objects may cross obstacles between discrete samples, motivating swept tests or continuous collision detection. A collision normal must have a consistent direction so that response separates objects instead of pushing them farther together.

References: Carleton Undergraduate Calendar — COMP 2501 · Godot Engine — Physics introduction

Game AI, state machines, and path planning

A finite state machine maps the current state and observations to transitions and actions. For an enemy, patrol, investigate, chase, and retreat can have explicit entry conditions and exit rules. Path planning operates on a graph or navigation representation rather than directly deciding every animation. Dijkstra’s algorithm finds least-cost routes with nonnegative edge costs; A* adds a heuristic that estimates remaining cost. An admissible heuristic does not overestimate, supporting optimality under the algorithm’s appropriate conditions. Replanning frequency is a tradeoff between responsiveness and computational cost.

References: Carleton Undergraduate Calendar — COMP 2501 · Godot Engine — Math tutorials

Engine architecture, rendering cost, and verification

Separate simulation data from rendering details so that the same world can be tested without drawing every frame. Resource managers coordinate loading and lifetime; scene or entity structures organize objects and their behavior. Hardware-accelerated rendering benefits from reducing unnecessary state changes and work, but optimization should follow measured bottlenecks. Track frame time and its variation, not only average frame rate. Reproduce bugs with recorded inputs and controlled random seeds when practical. Test unusual timesteps, empty scenes, repeated spawning and removal, and transitions between levels to expose lifetime and state-reset errors.

References: Carleton Undergraduate Calendar — COMP 2501 · Godot Engine — Math tutorials

Practice & worked answers

Original exercises for this guide.

1. A game moves an object by 5 units every rendered frame. What changes at a higher frame rate?

Show worked answer

It moves farther per second because more frames occur. Express velocity in units per second and multiply by elapsed simulation time to make the intended speed independent of rendering frequency.

2. Why can broad-phase boxes report collisions that are not real?

Show worked answer

Bounding shapes deliberately enclose the detailed geometry, so their overlap establishes only a possible collision. The narrow phase evaluates the actual shapes before applying a physical response.

3. What happens if an A* heuristic overestimates remaining cost?

Show worked answer

The usual optimal-path guarantee may no longer hold. The search can prioritize a seemingly cheap route and finish with a path that is not globally least-cost.

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

  • a wealth of books, websites, and online tutorials that provide information; a few
  • Sanjay Madhav’s Game Amazon, used CAD $187 (new paperback from
  • Programming: Algorithms Amazon), CAD $73 (Kindle
  • and Techniques (optional) edition)
  • Topics Covered
  • Game architecture: MVC design pattern, game object management
  • Mathematical foundations: vector operations, coordinate systems, and transformations
  • Physical simulation and collision detection
  • Game AI and path planning

Readings

  • Sanjay Madhav’s Game Amazon, used CAD $187 (new paperback from Programming: Algorithms Amazon), CAD $73 (Kindle and Techniques (optional) edition)

Prerequisites & course information

Prerequisite(s): COMP 2401 with a minimum grade of C- , and ( MATH 1104 or MATH 1107 ). Lectures three hours a week, tutorial one and a half hours a week.

Sources