Chris Pollett >
Old Classes >

   ( Print View )

Enrollment info

Course Info:

Homework Assignments:
Practice Exams: PIC:

Spring 2001 PIC 197 Home Page/Syllabus

Computer Game Programming

Instructor: Chris Pollett
Office: 6183 Math Sciences
Phone Number: (310) 825-2814
Office Hours: MWF 2-3pm

Class Meets:
     MWF 10-10:50pm in Dodd170
Sec 1a TA: John Donald
Office: MS 2344

1a: T 10-10:50 in MS5117


To take this class you must have taken PIC10B.

Texts and Links

Available on Reserve at Powell Library

Required Text: Learn Computer Game Programming with DirectX 7.0, by Ian Parberry.
Optional Text: Game Programming Gems, by Mark DeLoura.
Online References
& Other Links:
SGI's STL page .
Microsoft's DirectX page .


This class will cover the basic design principles and algorithms used in programming 2D video games for the Windows platform. We will discuss basic Windows programming and the DirectX API. We will cover various animation techniques for incorporating animation into games such as page flipping, sprites, image clipping, and parallax scrolling. We will discuss how to incorporate sound and external devices such as joysticks into a game. We will talk how to build a game shell for one's games. Along the way, we will consider some algorithms useful in random scenery generation, modelling flocking behaviors of screen animals, as well as getting on-screen creatures to have "intelligent" behaviours. The latter will involve covering both rule-based AI, as well as AI algorithms such as the A* algorithm. We will also talk about some simple game theory which is useful in modeling how interesting/playable a game will be.

Below is a tentative time table for when we'll do things this quarter:

Week 1: April 2, 4, 6 Parberry Ch 1 & 2
Week 2: April 9, 11, 13 Parberry Ch 3 & 4
Week 3: April 16 (hw1 due), 18, 20 (Progress Report 1) Parberry Ch 5 (if have DeLoura 1.0, 1.1, 1.4)
Week 4: April 23, 25 (Midterm), 27 Parberry Ch 6 (if have DeLoura 3.0, 3.1)
Week 5: April 30, (hw2 due May 1), May 2, 4 Parberry Ch 7 (if have DeLoura 3.3-3.5)
Week 6: May 7, 9, 11 Parberry Ch 8 (if have DeLoura 3.7)
Week 7: May 14, (15, hw3 due) 16, 18 (Progress Report 2) Parberry Ch 9 & 10 (if have DeLoura 4.16, 4.17)
Week 8: May 21, 22(Lecture), 23, 25 (hw4 due) Parberry Ch 11-13
Week 9: May 28 (Memorial Day), 30 (Discussion), June 1(Sub Lecture) Parberry Ch 14, 15
Week 10: June 4(Discussion), 5 (Lecture), 6, 8 (Project demo's)
Week 11 Final Monday, June 14 8am-11am

Please note: May 28--June 4 I will be away in Russia. So as to only miss one day of lecture, I will give lectures during the discussion times on May 22 and June 5. On June 1, I will get someone to substitute for me. The May 22 discussion section will occur on May 30 during the usual lecture time. The June 5 discussion will occur on June 4 during the usual lecture time.

Grade Breakdown / Grading Policy

Homeworks       20% 
Midterm         20%
Project         25%
Final           35%

When I assign grades the high score has an opportunity to receive an A+. I do curve grades and my curving will be in line with previous times this class has been taught.


There will be a whole term project for this course where you get to develop a 2D game of your choosing. As mentioned above this will count for 25% of your grade: 5% Progress Report 1, 5% Progress Report 2, 15% Finished Project. Writing a game takes a considerable amount of time and effort. To ensure that you are making progress on this project throughout the quarter, you must give two progress reports on your project. The first progress report should be a two-four page specification of what your game will be and how you intend to get everything finished by the end of the quarter. If your project seems too complicated I will make suggestions on how to cut down its size/scope. The second progress report will involve coming to my office and showing me the state of your code so far. The last day of class will be a demo day where everyone gets to show off his or her projects to everyone else and me.

Homework Info

General Info

Links to the current list of assignments can be found on the left hand side of the class homepage. After an assignment has been returned a links to its solution will be placed off the assignment page. Each homework will consist of a reading part and a programming part. Material from the reading part of an assignment may appear on midterms and finals. All homeworks are due at 9:30am of the due date. Late homeworks will not be accepted; however, your low homework score will be dropped.

Submitting Programming Assignments

To keep things simple the files you submit for a homework assignment will follow the naming convention p197hw+number+file+number+.extension. For example: p197hw1file1.cpp for the first file in HW1. To submit an assignment, simply copy the required files to your \SUBMIT directory. Then leave them there for the rest of the quarter, even after they have been collected and graded. You may be able to submit files remotely with ftp, but it is best to make sure your submission works in the Lab before you submit. If you wish, you may overwrite a previous submission with a new version at any time before the due time on the due date.

Please do not store any files in your submit directory other than those that are to be or have been collected.

To confirm that you have submitted correctly, run the checksubmit program. This check generally requires a trip to the PIC Lab.


Your grades will be available through The comment field for an assignment will say where you lost any points. Please check your account each week to verify your grades. This is very important; it is the only way to know for sure that you actually received credit for your assignment. Your my.ucla account also will have assignment due date and links to assignment homepages. You can also compare the score you received relative to everyone else.

If you believe an error was made in the grading of your program or exam, you may request in person a regrade from me, Professor Pollett, during my office hours. I do not accept e-mail requests for regrades. Such e-mails will not be responded to. A request for a regrade must be made no more than a week after the homework is returned. No requests for regrades will be considered unless they meet this deadlines. Be forewarned that the whole piece of work will be regraded, so the grade may go down rather than up.

Required Formatting

Since some of the grading process will be automated, it is important that your program follow the specifications in the assignment exactly. In particular, make sure submitted filenames are correct and data items in your program are inputted and outputted in the proper sequence and format. If you put files in your submit folder with an incorrect name so that it ends up not being collected, you will received a 0 for your homework and not be entitled to a regrade. To receive any points on your homework you must include the following items in the header of every file you submit:

  • Your Full Name (and nickname, if different)
  • Your Student ID
  • Your PIC 197 Login ID
  • Your Preferred E-mail Address
  • Your Discussion Section Identifier and Meeting Time
  • The Assignment Number and Description,
  • Your Honesty Pledge
  • A List of Known Bugs in your Solution.

Your code should be as easy to read as possible. Use indentation carefully and consistently to delineate levels of nesting. Disjoint blocks should be well separated by concise and informative comments. This will be worth at least 1 point of every assignment. Although you are allowed a fair amount of choice in style, please try to conform to the conventions used in lecture and in the text.

Academic Honesty

You are both allowed and encouraged to discuss general algorithms and approaches to programming problems with your classmates. But these discussions must remain at a high level and not involve actual code being exchanged. In particular, THE CODE YOU SUBMIT AS SOLUTIONS TO PROGRAMMING ASSIGNMENTS MUST BE YOUR OWN INDEPENDENT WORK. DO NOT SHARE CODE.

You are required to include the following Academic Honesty Pledge at the top of each program you submit:

Honesty Pledge:

I, (insert your name here), pledge that this is my own independent work, which conforms to the guidelines of academic honesty as described in the course syllabus.

The pledge must be worded precisely as above, with your own name inserted. Be aware that any detected activity even bordering on an infringement of these academic honesty guidelines will be forwarded to the Dean of Students for full investigation. The penalties may be severe, in several recent cases, students have been suspended and have had the incident permanently recorded. If you witness any cheating by classmates, please report it to Professor Pollett as soon as possible.


As shown above in the grade breakdown there will be both a midterm and final in this course. Both of these are closed book, closed notes. You will be allowed only the test and your pen or pencil on your desk during these exams. Beeper or cell-phone interruptions will result in immediate excusal from the test. The midterm will be in class on April. 25. The final will be on Thursday, June 14 from 8:00am-11:00am. A photo ID will be required to take these tests. The final will cover material from the whole quarter although there will be an emphasis on material after the midterm. No make up exams will be given. The final exam may be scaled to replace the midterm if the midterm was missed under provably legitimate circumstances. These exams will test whether or not you have mastered the material both presented in class or assigned as homework during the quarter. I will try to avoid tricky and ambiguous questions. The week before each exam I will give out a list of problems representative of the level of difficulty of problems the student will be expected to answer on the exam. Any disputes concerning grades on exams should be directed to me, Professor Pollett.