CS 104: Introduction to Game Programming 2017

Fall 2017

Welcome to Introduction to Game Programming!

All the homework/labs/lectures will be distributed on Moodle.

We meet TR, 10 – 11:50 am, AEC 519.

Course Description

Course Description
This class is an introduction to computer science through game programming. Games are a growing part of the interactive entertainment industry, achieving $25.1 billion in revenue in 2010. Games are also a fun way to learn to program a computer. In this class, you will learn the basic tools and techniques for programming in Processing and Java, and create several computer games. This class also introduces you to computer science, a discipline that impacts our daily lives through a variety of technologies. By programming games, you will begin your exploration of the power of algorithms for solving problems in computer science.

This class is a studio class. Each class will involve a series of activities interwoven with lecture. You must bring your computer to every class. You will learn by doing computer programming; interacting with your professor, teaching assistant and other students; and engaging with your professor’s instruction as well as external media. Since your learning of the material is an integral part of the class process, it is essential that you attend class.

Game Components We Will Study
Game Organization and Control


Game Physics: Creating Physical Laws for Imagined Worlds




Interaction with People and Between Objects



Instructor Information(back up↑)

    • Instructor: Dr. Joann J. Ordille
    • Email: ordillej at lafaytte.edu
    • Office: 522 AEC
    • Office Phone: (610) 330-5416
    • Office Hours: T 1-2pm. W 11 am – 12 pm. F 1:30pm-3:30pm. Please email me if you would like to meet at any other time. Also, if my door is open, feel free to drop in.
    • Teaching Assistant: Allie Mullan
    • Email: mullana at lafaytte.edu

Useful Links

Useful Links and Resources(back up↑)

  • cs.getHelp()
    More senior computer science students are available Tuesday and Thursday 7-9 pm, and Saturday 1-3 pm in AEC 519 to help you with your programming labs or other questions you might have.  Stop in and talk CS with someone more experienced!
  • Download Processing
    Here you can download the processing IDE to your personal computer.
  • Instructions for installing Processing
    Here are some instructions for installing processing. Chapter 2 of Shiffmann covers this as well.
  • Processing Reference Website
    You should use this page often as a reference when using new functions.
  • Processing examples
    Head on here to see some examples of what can be done with processing.
  • The Learning Processing Website (website for your textbook)
    The book’s website, including the code from the book, solutions, and video tutorials. The tutorials are getting good reviews from your classmates.
  • Java documentation
    Once we transition into JAVA, this will be where you will go for a reference.

Course Information

Course Information(back up↑)

  • Web Page:http://sites.lafayette.edu/ordillej/cs-104-game-programming-syllabus-fall-2017/
  • Textbooks:
    • learningprocessingbigdigitalworldbig
    • Learning Processing : A Beginner’s Guide to Programming Images, Animation, and Interaction, 2nd Edition, by Daniel Shiffman. ISBN 9780123944436, Morgan Kaufmann.
    • and
    • Understanding the Digital World: What You Need to Know about Computers, the Internet, Privacy, and Security, by Brian W. Kernighan. ISBN: 9780691176543, Princeton University Press.
  • Prerequisite: No previous programming experience necessary. If you have a lot of programming experience, set up a meeting with me to discuss new areas you would like to explore in class.

Course Goals and Outcomes

Course Goals and Outcomes(back up↑)
Course Goals:  The goals of this course are to convey:

  • How to develop algorithms. When we create an algorithm in computer science, we transform a problem statement into a set of steps that can be executed by a computer.
  • How to write code to implement these algorithms using the Processing and Java languages.
  • How to program games and useful game algorithms.

Course Outcomes: After successfully completing this course, students will be able to:

  • Apply knowledge of computing and mathematics appropriate to the discipline.
    • Understand programming language constructs.
    • Design, implement and debug programs.
    • Reason logically about program execution, e.g. where might the program error be?
  • Employ the fundamental elements of the scientific method in the physical and natural world.
    • Identify and/or formulate a testable scientific hypothesis.
    • Generate and evaluate evidence necessary to test and/or revise a hypothesis.
  • Create, interpret, and evaluate descriptions and representations of scientific data including graphs, tables, and/or models.
    • Interpret the results from testing the hypotheses for a computer program.
    • Measure and evaluate a computer program.
  • Understand how scientific uncertainty informs the evaluation of hypotheses.
    • Understand how the evaluation of the program hypothesis is inherently incomplete and why testing may not uncover all errors.
    • Understand why testing may not identify the source of error.
    • Understand the iterative process for refining tests to isolate errors.
  • Understand how different types of games are used to address real world problems.
  • Develop algorithms for different types of games.
  • Write Processing programs to implement these algorithms.
  • Extend coding skills to Java.
  • Learn other programming languages on their own.

Assignment Types

(back up↑)Assignment Types

Class Attendance:  Since your learning of the material occurs as an integral part of the studio class process, it is essential that you attend class. For every unexcused absence, you will lose 0.5 points from your final grade up to a total of 3 points.  If you have a dean’s excuse or a coach’s letter for a particular day, you will be excused from class.

Class Participation: Class participation includes asking or answering questions, expressing an opinion about a topic of discussion, meeting with me during office hours, and reporting on activities in a group project, a reading group, or other group activity. All sincere efforts to participate are admired, so don’t worry, just speak up. You are even welcome to express an opinion different than mine. All types of participation count except participation that shows you failed to prepare for class. For example, asking: “Who is Ada Lovelace?” when the assignment was to read the Countess of Lovelace’s biography would not count as class participation.

Group Presentation (part of your Class Participation Grade): During our first class, you will be asked to form a team with one other student. Your group will be responsible for presenting one chapter from Understanding the Digital World to the class (10 minutes).  As part of your presentation, you can, if you wish, lead a class discussion about interesting parts of the chapter.  The chapters of Understanding the Digital World are short and will give you an overview of many facets of computing. You may also want to meet with your teammate to read and discuss each chapter before it is covered in class, and to study for exams.

Quizzes: The material in this class is cumulative, so it is essential to stay current in the class. To help you stay current, there will be unannounced quizzes.  Part of the quiz will test your knowledge of the previous week.  The intention here is to encourage you to review the material each week in preparation for the next week.  Another part of quiz will test whether you completed the assigned reading for the week in Understanding the Digital World.  The intention in this case is to encourage you to prepare for class and participate in our discussions.

Homework: Learning computer programming is much like learning to play a sport or musical instrument, or speak another language. Practice is important. The homework as well as the labs and projects are meant to help you practice and gain proficiency. Homework includes completing assigned problems in Shiffman. These are skill building problems, and the answers are mostly available online on the Learning Processing Website. Homework also includes assignments that will be distributed occasionally through Moodle, or assigned on the website http://codingbat.com/.  These will be small assignments which will help you prepare for the written exams. Homework will not be graded, but will be marked if submitted or not. Notice that you will be able to grade many of the homework problems on your own, through the Learning Processing Website or running your solution on the computer. However, it’s best to simulate the exam environment by doing the questions first without a computer and then testing your results later.

Labs: Labs are the hands-on side of our class. In them you will get to implement the tools we discuss in class and see how they really work. Lab assignments will be given weekly, and some of our class time will be dedicated to working on these assignments. We will discuss common issues or interesting observations from work on the lab. Notice that class time will often not be enough to actually complete the lab. This means that you should plan on working on them outside of class. Do not wait until the last day.

Final Project: There is a final project in this class to build a working game of your choice or one from a list that I will provide. This project will require you to propose the game to be written, design the game, and then implement and test it.  It will be similar to our labs but will involve extensive design, and demand developing your own algorithms using the tools taught during class. You will have approximately three weeks for the final project.  During the last class, you will be asked to demonstrate your game.

Exams: We will have two midterms. One will be a written exam in class. The second will be a lab exam, which will happen during one or two class periods with the use of your computer.  This exam requires you to code your answers and test them. The final exam will be a comprehensive written exam. Exam absences will receive a score of zero for the exam (unless a dean’s excuse is given).


(back up↑)Submission

For labs and projects:

  • All tasks are individual.
  • All submissions should be made on the Moodle Website.
  • You should zip (compress) the project’s folder and submit the zipped results.
  • Labs assignments are usually due the following Sunday at 11:55pm.
  • If your lab does not work as described in the assignment you are required to hand in an additional text
    document which specifies what does not work.
  • Submit your labs and project on time. Late submissions will be subject to a penalty of 5% of the grade per day.  Again, all submissions should be via Moodle.  Submissions made in other ways (for example, via email) will not be graded. If you cannot finish before the deadline, please make sure to submit what you have before the deadline (with the required written description of what works and what doesn’t work).

Intellectual Honesty:

What is cheating?

  • Sharing code: copying, retyping, looking at, supplying file.
  • Describing code: verbal description of code from one person to another.
  • Helping write code line by line.
  • Searching the web for solutions.

What is not cheating?

  • Talking about general concepts or high level design.

Statement: All students are expected to adhere to the college policy on academic honesty as listed in the Student Handbook.

“To maintain the scholarly standards of the College and, equally important, the personal ethical standards of our students, it is essential that written assignments be a student’s own work, just as is expected in examinations and class participation. A student who commits academic dishonesty is subject to a range of penalties, including suspension or expulsion. Finally, the underlying principle is one of intellectual honesty. If a person is to have self-respect and the respect of others, all work must be his/her own.”

Discussion of concepts with others is encouraged, but all assignments must be done by yourself or your own team as specified in the requirements for each assignment. If you use any source other than the Shiffman book, reference it/him/her, whether it is a person, a book, a solution set, a web page or whatever. You MUST write up the solutions in your own words.


(back up↑)Grading

Graded Material:
The course grade is based on the materials listed below graded on a 100 point scale, with each item contributing a specified percentage to the overall score. As specified in the student handbook, A will reflect excellent work, B will reflect good work, C will reflect acceptable work, and D will reflect passing work.

Class Attendance 3%
Class Participation 3%
Quizzes 3%
Homework 3%
Labs (averaged) 17%
Lab Exam 17%
Final Project 14%
Mid-Term 15%
Final Exam 25%

Grading Scale:
Typically, grades are assigned as follows from your final numerical grade:

A: 93-100 B+: 87-89 C+: 77-79 D+: 67-69 F: 0-59
A-: 90-92 B: 83-86 C: 73-76 D: 63-66
B-: 80-82 C-: 70-72 D-: 60-62

Assignment Grading:
Your submitted programs (for labs, the final project, and exams) would be graded based on:

  • Correctness: Correctness is an objective criterion, which means that the program behaves according to the requirements explained in the assignment in all possible cases.
  • Good Style: Good style refers to the way the program text looks. This includes commenting and correct indentation. We will discuss different aspects of good programming style as we learn how to program.
  • Good Design: Good design is a harder criterion to describe. It affects both the execution of the program and its readability. Characteristics of a good design will be illustrated throughout the course.

Tentative Schedule

(back up↑)Tentative Schedule*


Wk. Dy. Date Topic

Readings (S:Shiffman)
1 T 8/29
Introduction to Games and Processing
S: 1,2
Lab 1: Drawing
R 8/31
Interaction, Variables
S: 3
2 T 9/5
More Variables
S: 4
Lab 2: Maze Game
R 9/7
S: 5, 11
3 T 9/12
Conditionals, Animation
K: Intro, Part I, 1
R 9/14
Conditionals, Game Control
K: 2
4 T 9/19
Functions, Game Physics: Collisions
S: 7
K: 3
Lab 3: Pong
R 9/21
Game Physics: Rebounding, Loops
S: 6
5 T 9/26
Loops, Arrays
S: 9-2 to 9-6
R 9/28
Scope, Review
K: Part II, 4
6 T 10/3
Written Midterm
Lab 4: Word or Tile Game
R 10/5
7 T 10/10
Fall Break.  No Class.
R 10/12
Nested loops
S: 10, 13-12 to Ex. 13-11
Lab 5: Battleship
8 T 10/17
Classes and Objects
S: 8, 9-1, 9-7 to 9-10, 13-12
R 10/19
S: 12, 20
9 T 10/24
Data Input / Output
S: 18
K: 6
Lab 5: Shooting Game
R 10/26
Images, Game Organization
10 T 10/31
K: 7, Wrapup
Lab 6: Maze Based Role Playing Game
R 11/2
Testing, Review
11 T 11/7
Lab Exam Problem 1
R 11/9
Lab Exam Problem 2
12 T 11/14
Inheritance, Polymorphism
S: 22
K: Part III, 8
R 11/16
Inheritance, Poly, Recur
S: 13-11
Project 2: Final Project Proposal
13 T 11/21
K: 9
Final Project: Design
R 11/23
Happy Thanksgiving! No class.
14 T 11/28
Full Java, Java I/O
S: 23
K: 10
Final Project: Implementation and Testing
R 11/30
Java I/O
15 T 12/5
K: 11, 12, 13
R 12/7
Final Project Presentation

*Tentative schedule, subject to change. Check Moodle for the most up to date information.

**No travel arrangements should be made until the final exam schedule has been issued


Additional Information

(back up↑)Additional Information

Respect for classmates, colleagues and team members: All students are expected to show respect and courtesy to each other. Mutual respect is a high ideal in academic, business, and personal life. It is central to learning well together. Disagreements over ideas or constructive criticism of someone’s work is in keeping with this ideal. Attacking or disparaging someone is not, and will not be tolerated. In group projects, mutual respect also includes reliably contributing to the project and keeping your commitments to the group.

We follow the College Diversity Statement which says in part:

All members of the College community share a responsibility for creating, maintaining, and developing a learning environment in which difference is valued, equity is sought, and inclusiveness is practiced.

To learn more about how these principles are followed in the computing industry, view the Google video:

Diversity at Google (https://youtu.be/_3RoQRN65AI)

and the eBay video:

Diversity Workshop at eBay, Europe (https://player.vimeo.com/video/159767606)

Privacy: Moodle contains student information that is protected by the Family Educational Right to Privacy Act (FERPA). Disclosure to unauthorized parties violates federal privacy laws. Courses using Moodle will make student information visible to other students in this class. Please remember that this information is protected by these federal privacy laws and must not be shared with anyone outside the class. Questions can be referred to the Registrar’s Office.

Equal Access: In compliance with Lafayette College policy and equal access laws, I am available to discuss appropriate academic accommodations that you may require as a student with a disability. Requests for academic accommodations need to be made during the first two weeks of the semester, except for unusual circumstances, so arrangements can be made. Students must register with the Office of the Dean of the College for disability verification and for determination of reasonable academic accommodations.

Important Dates:

  • Normal Add/Drop deadline: September 8th
  • Last day to Withdraw (WD): November 14th
  • Classes end: December 8th
  • Final Exams: December 12th – 18th

Federal credit hour statement: The student work in this course is in full compliance with the federal definition of a four [two or one as appropriate for half and quarter unit courses] credit hour course. Please see the Registrars Office Website (http://registrar.lafayette.edu/additional-resources/cep-course-proposal/) for the full policy and practice statement.

Credits: Some sections adapted from the CS 105 Syllabus by Professor Sadovnik. In the Organization Section, the rogue maze image is courtesy of Artoftransformation under the Creative Commons license.  In the Interaction Section, the flappy bird video is a capture of the execution of the program available at https://github.com/sidonath/processing-flappy-bird-clone.  Photo of Learning Processing Textbook Copyright © Morgan Kaufmann.  Photo of Understanding the Digital World Textbook Copyright © Princeton University Press.