CS 491 -- CS Skills for Simulation and Game Programming

Fall Quarter 2021


Course Syllabus and Resources Page

Handouts Classes Projects

This page was last updated: December 1, 2021

Welcome to CS 491! I am so glad to have you here. This class will be unlike any other CS class you have ever taken. We will look at a lot of techniques that make the art of creating simulations and games more automatic. I really enjoy this stuff! I think you will too.

Class and Covid: I respect your right to protect yourself and your loved ones from Covid. For anyone who is concerned about coming to campus, I have recorded the lectures and published them on this Resources Page. These won't be as good as coming to Live Class. Afterall, in Live Class, questions can be asked and discussions can be generated. But, I don't want anyone to have to choose between their safety and coming to class.

Important! Please go to this site and fill out the web form that you find there. It seeds a lot of the infrastructure that I need to run this course! Thanks.

Oregon State University Covid-19 Information

The latest update from OSU is:
Face coverings are now required, regardless of vaccination status, in all indoor settings at OSU. This includes but is not limited to public and private workplaces, businesses, indoor areas open to the public, building lobbies, common or shared spaces, classrooms, elevators, bathrooms, transportation services, dining centers, recreation centers and other indoor spaces where people may gather for any purpose. Masks are not required when individuals are in their personal offices and have their door closed. Face coverings are also required outdoors as per State of Oregon rule 333-019-1025 if physical distancing of at least 6 feet can’t be maintained.

Effective Sept. 15, Oregon State University requires employees and students who work, learn or engage with others in-person as part of their job duties to be fully vaccinated from COVID-19. OSU employees and students who are required to comply and who meet an exemption not to be vaccinated, will be required to test for COVID-19 weekly until further notice. To learn more and to complete the compliance process, go to https://covid.oregonstate.edu/vaccination-program-requirement

Stuff You Might Be Interested In:

What We Will Be Doing (and Not Doing) This Quarter

This is not a game-design course. It is also not a game-creation course. We will not be creating any games. Game and simulation programming is very much a data-, math-, and physics-intensive activity. A certain number of actions must be produced, and producing them by hand is hard. Also, producing them by hand often leads to sucky-looking content.

It's much easier, and produces better-looking results, if we can convince the computer to do the right things for us. But, it takes special knowledge to do that.

That's why you are here. This is a middleware CS course that will fill in many of those special knowledge missing pieces.

Even if you aren't looking for a job in one of these fields, you will likely find these varied topics useful and enjoyable anyway.

CS 491 topics include:

By the way, this is only a little bit a computer graphics course. We will not be writing graphics programs, but you will sometimes be given graphics program skeletons to test your coding. If you want computer graphics, either in addition to this course or instead of, CS 450 is the class you want.

If you need a place to do your programming assignments, you can get access to the Windows 10-based graphics systems in OSU's Computer Graphics Education Lab (CGEL) in Batcheller Hall 244.

Access to the CGEL is by your OSU ID card, which also acts as a card key. The first full week of classes, I will give the EECS Main Office a list of who is in this class, so that they can enable your cards for the CGEL.

Warning! Every so often, I reserve the CGEL for a grades 2-12 outreach activity. (Why? Because I want more "you"s in our major!) I will let you know when one of these is coming up.


Course Learning Outcomes

On completion of the course, students will have demonstrated the ability to:

  1. Manipulate geometry using vectors and transformation matrices
  2. Demonstrate the motion of Forward Kinematic systems
  3. Explain the solution for the motion of Inverse Kinematic systems
  4. Demonstrate constant-acceleration physics with bouncing
  5. Explain how Functional Animation can be used for collision avoidance
  6. Demonstrate a keyframed animation
  7. Demonstrate a 3D particle system
  8. Demonstrate physical systems modeled as a mesh of springs

Professor and TA

The class is being taught by Professor Mike Bailey.

Office: Kelley 2117 (2nd floor, south side)
E-mail: mjb@cs.oregonstate.edu
Phone: 541-737-2542
Zoom-room: Zoom

Prof. Bailey's Office Hours:

  See below:  
  or, anytime my office door is open  
  or, by appointment -- send email  


Our TA for this class is Jian Tang. He is a computer graphics graduate student and has a lot of experience with the innards of game engines. We are lucky to have him!

Combined Office Hours

In-office Office Hours
Jian will hold these in the Computer Graphics Education Lab (CGEL), Batcheller 244.
Prof. Bailey will hold these in his "office", in the big tent in front of the Kelley Engineering Center. (Dress warmly.)

All other colors indicate Zoom Office Hours.

  Jian Tang (JT) Prof. Bailey (PB)
Email tangjian mjb
Zoom-room Zoom Zoom
Mondays 2:00-3:00, 3:00-4:00
Tuesdays 10:00-11:00 4:00-5:00
Wednesdays 10:00-5:00
Thursdays 10:00-11:00 1:00-2:00, 2:00-3:00
Fridays 11:00-1:00, 4:00-6:00

  8:00 9:00 10:00 11:00 12:00 1:00 2:00 3:00 4:00 5:00
Monday PB PB
Tuesday JT PB
Wednesday JT JT JT JT JT JT JT
Thursday JT PB PB
Friday PB PB PB PB
(The links point to the Zoom-Rooms.)


There is no purchased textbook for this class. Instead, the material will consist of notes and web pages.

Warning! Warning! Warning! Just because you have notes doesn't mean you can skip class! The notes are just enough so that you can listen and discuss more, and write less. They are not meant to be complete. We will add to them in class! Tests will include material not written in the notes, but covered in class.

Every year, some people get an embarassingly bad grade in this class because they don't come to class. That is especially sad for those who envision a career in the gaming world, as this is our only CS class with the actual word "Game" in the title.

Class Note Handouts and Recorded Videos

Most notes are given in one, two, four, or six slides per page formats. This is so that you can make the readability vs. print-pages trade-off yourself.

LV = Lecture Video
DV = Demonstration Video

Week # Noteset
  2016 Game Career Guide PDF      
0 Introduction to CS 491 1pp 2pp 4pp 6pp LV
0 CS 491 Project Notes 1pp 2pp 4pp 6pp LV
0 Parametric Lines 1pp 2pp 4pp 6pp LV
1 Vectors 1pp 2pp 4pp 6pp LV
1 Efficient Ray-Triangle Intersections 1pp 2pp 4pp 6pp LV
1 GLM 1pp 2pp 4pp 6pp LV
1 A short GLM Primer Here      
2 Matrices 1pp 2pp 4pp 6pp LV
2 Transformations 1pp 2pp 4pp 6pp LV
2 Quaternions 1pp 2pp 4pp 6pp LV
3 Forward Kinematics 1pp 2pp 4pp 6pp LV   DV
3 Inverse Kinematics 1pp 2pp 4pp 6pp LV   DV
4 Kinematic Physics 1pp 2pp 4pp 6pp LV
4 Newton's Method 1pp 2pp 4pp 6pp LV
4 Test #1 Review HTML
5 Particle Systems 1pp 2pp 4pp 6pp LV
6 Dynamic Physics 1pp 2pp 4pp 6pp LV-1 LV-2
6 Circular Motion 1pp 2pp 4pp 6pp LV
7 Keyframe Animation 1pp 2pp 4pp 6pp LV
7 Functional Animation (Collision Avoidance) 1pp 2pp 4pp 6pp LV   DV
8 Meshes of Springs 1pp 2pp 4pp 6pp LV   DV
9 Collision Detection 1pp 2pp 4pp 6pp LV
10 Collision Physics 1pp 2pp 4pp 6pp LV
10 Physics of Space Travel 1pp 2pp 4pp 6pp LV
10 More Information PDF       LV
10 Test #2 Review HTML        
  Making a Kaltura Video Here      

Guest Speaker Links

Bryan Pawlowski, Timberline Studios: "Indie Game Dev Life"
Software tools and email
Live Q&A: October 18

Brian Apgar, Zynga-Eugene: "How Running a Live Game Impacts Your Code"
Live Q&A: October 25

Dan White, Pipeworks: "Engineering at a Games Company: What do we do?"
Live Q&A: November 3

Class Schedule

For on-campus students, face-to-face class time is: Monday and Wednesday, 8:00 - 9:30 (AM). (I had nothing to do with this choice of times...)
Unless otherwise specified, all classes will be held in Weniger Hall, room 153.

Cancelled dates: Oct 6, Nov 24

Note: this schedule is my best guess on where we'll be -- it is only approximate.

Week #Start DateTopics
0 Sept 22 Introductions
Discussion of class objectives and how we will go about it.
Project Notes
The parametric line equation: what it is, what you can do with it in a 3D world
Registration for Networking Night opens October 1.
1 Sept 27 Vectors and how easy they make certain geometric operations
Efficient ray-triangle intersection, and why you care
Project #1
GLM: C++ classes to handle useful geometric and computer graphics operations
Here is a short GLM primer
2 Oct 4 Matrices and what geometric operations you can do with them
Transformation matrices: the basis for every dynamic-motion game you have ever played
Quaternions: weird name, cool concept
Hierarchical transformations
Project #2
Prof. Bailey will be out of the Office on October 6, 7, 8.
3 Oct 11 Forward Kinematics
Generalizing the hierarchical transformations (now you know how to make a Transformers movie!)
Kinematic acceleration physics
Projectile motion: remember all those tank-shooting games?
Networking Night is October 13.
4 Oct 18 Bryan Pawlowski, Timberline Studios, who spoke (via video earlier) on: "Indie Game Dev Life" will appear on October 18, 8:00 AM, for a live Q&A session.
Here is the Zoom-room.

Inverse Kinematics (IK): the Cyclic Coordinate Descent (CCD) algorithm
Project #4
Test #1 review.
Solving nonlinear equations: Newton's Method

5 Oct 25 Brian Apgar, Zynga-Eugene, who spoke (via video earlier) on: "How Running a Live Game Impacts Your Code" will appear on October 25, 8:00 AM, for a live Q&A session.
Here is the Zoom-room.

Particle systems: what they are, what they do, how to create your own

Test #1 will be taken on Canvas in a 60-minute interval of your own choosing during October 27-31.
It will open at 12:00 noon on Wednesday, October 27 and will close at 23:59 on Sunday, October 31.

6 Nov 1 Mechanical Dynamics: numerically integrating equations of motion

Dan White, Pipeworks, who spoke (via video earlier) on: "Engineering at a Games Company: What do we do?" will appear on November 3, 8:00 AM, for a live Q&A session.
Here is the Zoom-room.

Project #5
Circular Motion

7 Nov 8 Keyframe Animation
Functional Animation: getting actors to want to move correctly
8 Nov 15

Project #6
Meshes of Springs: simulating chains, cloth, etc.

9 Nov 22

Project #7
Collision Detection
No class November 24! Enjoy an extra day of Thanksgiving.

10 Nov 29 Collision Physics: this might help you in jury duty sometime
Physics of Space Travel: so that's how the Kerbal Space Program really works!
More Information document
T2 Dec 8-11 Test #2 will be taken on Canvas in a 60-minute interval of your own choosing during December 8-11.
It will open at 12:00 noon on Wednesday, December 8 and will close at 23:59 on Saturday, December 11.


LV = Lecture Video

Project # Points Title Due Date LV
1 60 Using GLM to manipulate 3D Vectors October 4 LV
2 80 Using GLM to Manipulate Matrices and Transformations October 11 LV
3 100 Forward Kinematics October 20 LV
4 100 Collisions and Bouncing November 1 (=October 32) LV
5 100 Particle system November 12 LV
6 100 Keytime Animation November 26 LV
7 100 Mesh of Springs December 7, 23:59:59 -- No Bonus Days LV

Projects are due at 23:59:59 on the listed due date.


Project Turn-In Procedures


Scores will be posted through Canvas. CS 491 will be graded on a fill-the-bucket basis. There will be 7 projects, 10 quizzes (weeks 0-8, 10), and two tests. You get to keep all the points you earn.
The quizzes will be done via Canvas. They will open each Friday morning at 10:00 AM and close Sunday night at 23:59:00. Canvas is very unforgiving about due times -- don't push it.

But, weeks #0 and #9 are different:

Your final grade will be based on your overall class point total. Based on an available point total of 940 grade cutoffs will be no higher than:

Points Grade
890 A- 
870 B+
830 B- 
810 C+
770 C-
750 D+
710 D- 

You will notice that these cut-offs are not 90-80-70-... This is because I am going to do a "soft-grade" on your programming projects, i.e., if it works, you get full credit. A "hard-grade" would look at your programming style, etc., which would allow more of a traditional grading scale.

Bonus Days and Late Assignments

"I love deadlines. I like the whooshing sound they make when they fly by."
-- Douglas Adams

Each of you has been granted five Bonus Days, which are no-questions-asked one-day extensions which may be applied to any project, subject to the following rules:

  1. Up to 2 Bonus Days may be applied to any one project
  2. Bonus Days cannot be applied to tests
  3. Bonus Days cannot be applied such that they extend a project past the start of Test #2 during Finals Week

To use one or more Bonus Days on a given project:

Class Rules

Students With Disabilities

Accommodations for students with disabilities are determined and approved by Disability Access Services (DAS). If you, as a student, believe you are eligible for accommodations but have not obtained approval please contact DAS immediately at 541-737-4098 or at http://ds.oregonstate.edu. DAS notifies students and faculty members of approved academic accommodations and coordinates implementation of those accommodations. While not required, students and faculty members are encouraged to discuss details of the implementation of individual accommodations.

Religious Holidays

Oregon State University strives to respect all religious practices. If you have religious holidays that are in conflict with any of the requirements of this class, please see me immediately so that we can make alternative arrangements.

Life Events

As {John Lennon? Allen Saunders?} has said: "Life is what happens to you while you're busy making other plans". I care about you as a person. When life happens to you, send me an email and come see me. I might be able to help, I might not. But I surely can listen. You are not alone.

Reach Out for Success

University students encounter setbacks from time to time. If you encounter difficulties and need assistance, it's important to reach out. Consider discussing the situation with me or an academic advisor. Learn about resources that assist with wellness and academic success at http://oregonstate.edu/ReachOut. If you are in immediate crisis, please contact the Crisis Text Line by texting OREGON to 741-741 or call the National Suicide Prevention Lifeline at 1-800-273-TALK (8255)

Basic Needs

Any student who has difficulty affording groceries or accessing sufficient food to eat every day, or who lacks a safe and stable place to live, is urged to contact the Human Services Resource Center (HSRC) for support: hsrc@oregonstate.edu, 541-737-3747. The HSRC has a food pantry, a textbook lending program, and other resources to help. Furthermore, if you are comfortable doing so, please come talk with me. I will do everything I can do to help you.

Other Useful URLs Related to Simulation and Game Development:

Other Notes You Might Find Useful!

University Classes
Computer Graphics Shaders
Scientific Visualization
Parallel Programming
CS Skills for Simulation and Game Programming

Grades 2-12 Outreach