CPSC 427 Video Game Programming
Fall 2021

This course provides an introduction to video game programming.

The course material will cover game programming techniques and technologies, including rendering, data structures, memory management, real-time software development for games, start-to-finish simple video game design and implementation, project management, teamwork and team management.

Students will learn to plan, manage and implement from scratch a video game over the course term. They will learn to apply theoretical knowledge in a practical, real-life setting and acquire hands-on problem solving skills.

 You should be able to take the course if you satisfy the following pre-reqs: One of MATH 200, MATH 217, MATH 226, MATH 253 and one of MATH 152, MATH 221, MATH 223 and CPSC 221. Please see the official UBC course description for the prerequisite specifics.

Note that a second section of this course will be given in Jan 2022 by Alla Sheffer.

Staff and Communication

Instructor: Helge Rhodin.

TAs: Tim Straubinger, Andrew Evans, and Camilo Talero.
Please contact TAs via Piazza for technical questions (public post).

TA and Instructor Office Hours: will be announced on Piazza.

Contact: We will use Piazza for all announcements and questions and Slack for direct communication among students. Note: If students have privacy concerns about the use of Slack or Piazza, let me (instructor) know and we will consider an alternative. Slack and Piazza are hosted outside Canada, thus if you use the current setup we will proceed on the assumption that you do not object to Slack and Piazza potentially identifying you personally, and that you are consenting to the storage of personal information on servers outside Canada.

All communication platforms will be linked on Canvas

Course Work

This is a hands-on, project-based course. As such the course has no exams or finals and  most of the grade is based on student contribution to a team video game project.

Mark distribution (tentative): Team video game project (77%), individual programming assignments (16%), other (7%).  Note: The project grade is designed to reflect both the team effort and the individual contribution of each team member.

For more details see the course policies.

Course Syllabus/Overview

Health. We are, sadly, still in the midst of the pandemic that requires a hybrid teaching form that is flexible to changing circumstances. We will have

  • A mask mandate. Please wear a non-medical or medical mask (medical ones have a better protection). Some may not be able to wear a mask; you can get approval (Centre for Accessibility, info.accessibility@ubc.ca) but you need to keep a physical distance in class.
  • In-person lectures, tutorials, and office hours, unless the instructor (TA or me) has respiratory symptoms or health orders change. In any case, we will stream the session on zoom and/or record to make them accessible to everybody.
  • Virtual face-to-face grading on Zoom, perhaps with the option to choose between in-person and virtual (project grading is in groups of 6, roughly every second week in the tutorial slots).
  • Virtual cross-play sessions, touching each other's laptops one after another seams unreasonable (cross-play sessions are three times during lecture/tutorial time, including the day of the 'exam').

Why? Video games and game development represent a billion dollar industry, and there is a high demand for programmers at all levels of experience in this profession. Vancouver is a major game industry hub with both major studios (Electronic Arts, Activision, Microsoft Research) and smaller groups (Blackbird Interactive, Capcom Vancouver, East Side Games).

In addition to being a relatable and exciting software domain, game implementation can provide valuable portfolio pieces for new graduates seeking jobs. Game development combines programming problems from areas such as artificial intelligence and computer graphics with the opportunity for creative and imaginative endeavors.

Simply put, it's FUN!!

What? An opportunity for students to gain experience developing a video game from start to finish, and to acquire basic knowledge on core elements of video game development.

How? During the span of the course, students will work in teams of 6 to create a fully finished small to medium-sized 2D video game (prior experience with computer graphics is a plus but is not required). The games will be implemented from scratch: You will be provided with a minimal starting template and will be expected to write most, if not all the rest of the code yourself. Later in the course you will be able to add external libraries for "bells and whistles" as long as these do not replace coding of key milestones. We will not rely on high-level game engines in the development of the key features, to allow students to implement those themselves and better understand core game components. 

Students completing the course will learn about and implement basic methodologies across areas of computer science that are involved in the programming of a video game - computer graphics, artificial intelligence, path planning, user interaction, and software design. They will become familiar with software development elements such as entity component system data-structures, memory management, "bare metal" hardware programming, and real-time algorithm implementation.  In addition to integrating these elements into their teams video game, students will complete small individual assignments that require implementing some key game elements (rendering, AI, animation, and collision detection).

Students will also be familiarized with standard software engineering tools such as debuggers, profilers, and multi-user revision control. The final project for this course will be a completed video game that students can take home and exhibit to friends, family, and potential employers.

Objective/Learning Goals

- to expose students to the fundamental technologies, tools, methods and algorithms used in commercial video game development.
- to provide students with additional hands-on experience working on a complete software project, start to finish, from design to implementation.
- to immerse students in a typical team project environment, and demonstrate best communication and collaboration practices.
- to enable students to experience first-hand the pitfalls and challenges of working on a real-time software platform using C++ as a programming language.
- to provide students with a unique, creative portfolio piece that can be shown to potential employers.


Lectures are scheduled on Monday 15:00-17:00 and Wednesday 15:00-16:00 in DMP 301 and on zoom.
Tutorials are scheduled on  Wednesday 16:00-17:00 in DMP 301 and on zoom (Note, we will sometimes use this tutorial as lecture time) and Friday 15:00-16:00 in DMP 101 and on zoom.
The Assignment and milestone deadlines are marked in the schedule below.

01 - Intro and Logistics[PDF]
01 - Entity Component System (ECS)[PDF]
02 - ECS continued [PDF]
02 - Guest Lecture 1 - ECS, Databases, and [PDF] (NEW)
03 - HCI and User Experience[PDF]
04 - Rendering Basics[PDF]
05 - The OpenGL Pipeline[PDF]
06 - Advanced OpenGL[PDF]
07 - Collisions and Simple Physics[PDF]
08 - IO and Observer[PDF]
09 - AI with states[PDF]
10 - AI with strategy[PDF] [btree example code]
Guest Lecture II - Particle Systems[PDF]
11 - AI two players / Simulation[part 1 PDF] [part 2 PDF]
12 - Simulation continued[PDF]
13a - Debugging[PDF]
14 - Animation[PDF]
15 - Transformations and Skeleton Animation[PDF]
16 - Game Balancing[PDF]
17 - History and Future of Gaming [PDF]
Tutorial - C++ (Part 1 & 2)[PDF] (updated with part 2)

Check the lecture schedule for planned activities and due dates.

All lectures and corss-play sessions are also listed in this calendar (.ical here), embedded below:

Lecture time will include regular lectures,  industry expert lectures, cross-play sessions, and team status update presentations.  Tutorials will be largely dedicated to team meetings with the instructor or TAs, as well as face to face marking sessions for team milestones. You have to make sure that your entire team fo 6 can come to the same tutorial slot for grading.

Lecture materials will appear here as we proceed with no guarantee we'll post everything, so do come to the lectures!  

After each milestone deadline we will hold progress-update presentations (normally on Wednesday) and cross-play sessions (normally on Monday).

Teams can meet with the TAs for help during tutorials and office hours.

Assignment/Milestone Deadlines

Assignment links will show up here as the assignments become available.

Use Handin to submit your assignments. Make sure to include a README detailing all the features you implemented.

Links to milestone descriptions will show up here as the course progresses.

Assignments and milestones are due 23:59 pm on the day specified on the schedule page. No late submissions accepted, except for grace days.

Grace days: Each team may use up to 3 grace days per term for the group game milestones. Use these as you wish to help manage your time, but use them wisely. You can use all three on one milestone, or one day for each of three milestones.

Each student may use up to 3 grace days per term for the individual assignments. Use these as you wish to help manage your time, but use them wisely. You can use all three on one assignment, or one day for each of three assignments.

We will keep track of your grace days, but do check with us to make sure our grace day count matches yours. Grace days are counted as integers, i.e. if you are one hour late, that counts as one grace day. Weekends (Sat/Sun) and the term break do not count (so submitting a milestone, or assignment on Monday instead of Friday counts as one day). Once your grace days are all used, late submissions will receive a grade of zero.

Grading: We will use "face-to-face" grading for assignments and milestones. A description of the process and expected prep is detailed here. ALL team members are expected to attend each milestone grading sessions and should be able to pinpoint their contributions for each individual marked milestone. You will be required to demonstrate that you understand why your program works. You must be able to explain every single line you wrote!

More details on grading are provided here

Resources and Prior Offerings

Previous offerings: Spring 2018, Spring 2019, Fall 2019. Spring 2021. Examples of games written by previous students can be found here.

Links to other useful webpages will be added here as the course progresses:

Note, the course has no textbook.


Waitlist: The waitlist will be frozen a week into the term (Monday morning of the second week). No more individuals will be admitted from the waitlist after that. Only complete teams (5-7 students, all from the waitlist), that together submit (e-mail to rhodin@cs.ubc.ca, with full names and UBC e-mail of all teammates) a written pitch (see milestones files) can still be admitted. Submission of a pitch is not a guarantee. When there are too few seats in the course for all teams with sufficiently good pitches, priority will be given to teams with better attendance on Zoom for the first lectures (since waitlisted students are not allowed to attend in-person). That means, if you are eager to join, self-organize a team (via Slack channel), prepare your written pitch and submit as detailed above. Note, the team should be formed with others on the waitlist.

Plagiarism: Shortly, don't cheat. What's considered cheating in CPSC 427, here. What the department does with cheaters, here.

Grading:Policy here

Missed work: Policy here.

Dropping: Because of the high demand for this course, the drop deadlines will be strictly enforced. No drop forms will be signed by the instructor after the first drop deadline. After that date, you will not be given permission to drop, and you will either have to complete the course or receive an "F" for the course at the end of the term. This policy has been adopted to encourage students to make a serious commitment to the course or to drop it early so that other students waiting to get into the course can register for it.

Template by Iron Summit Media Strategies, LLC.