CSC133: Object-Oriented Computer Graphics
Shankar N Swamy
About the course:
This course is an introductory, hands-on exploration of object-oriented software design & data-oriented architecture with a focus on practical application in Java. The course emphasizes learning by doing via "practice first and formalize next" philosophy followed throughout the course. Concepts are introduced in the context of concrete coding exercises.
The prime goal of this course is to train engineers to take up positions as software engineers in the industry by developing some of the skills needed to take a concept and develop it into a quality software. The focus will be predominantly on engineering software using OpenGL which includes games & engineering simulations.
Following concepts will be particularly emphasized throughout the course
Fundamental Object-Oriented Software Principles:
- Encapsulated Variables Principle (EVP)
- Single Responsibility Principle (SRP)
- Liskov Substitution Principle (LSP)
- Is-A and Has-A Relationships
- Open-Close Principle
- Interface Segregation Principle
- Dependency Inversion Principle
Data-Oriented Design:
This approach is particularly relevant for graphics and high-performance software commonly found in engineering systems - which include computer games and simulations. Students will learn to use a data-driver objects to manage data flow between components and organize classes into packages for efficient communication and maintainability.
Java Programming Concepts:
Students in this course are expected to have exposure to a first course in Java Programming. This is not the first course in Java Programming. To supplement the knowledge from the first course in Java, the following concepts which are essential for the course will be covered:
- Scope and lifetimes of variables
- Parameter passing and object assignment in Java (including pass-by-value and the box model of references)
- Distinctions between primitives and objects
- Arrays and their behavior as parameters
- The null object and its significance
- Stack frame, heap, and object creation
- Copy vs. clone operations
- Deep copy vs. shallow copy
OpenGL and Graphics Programming:
- Using LWJGL (a Java library for OpenGL) - compared to other OpenGL libraries available in Java, this is the most recent & advanced implementation of OpenGL in Java, has the best performance and scales well to Kotlin.
- Creating an OpenGL Context
- Working with GLFW for window management
- Understanding GPUs as streaming devices
- Implementing basic rendering tasks, like drawing triangles and circles
- Concepts of NDC coordinates and OpenGL window coordinates
- Rendering primitives using trigonometric specifications
- Texture mapping
- Shader programs (vertex and fragment shaders only)
- Uniform variables in shaders
- Creating a Camera object (an abstraction not directly present in OpenGL)
Design Patterns:
General discussion of design patterns in OOP and their applications. Following patterns in the context of the relevant programming assignments:
- Singleton (and discussions of potential anti-patterns)
- Factory Method
- State
- Observer
Game Development Concepts:
Through a series of assignments focused on games & graphics, students will gain hands-on experience with practical applications of OOP principles. We will be focused on grid-based games and emphasize rendering grid of textured polygons, camera manipulations, simple animation using camera movements etc.
We will cover structures & concepts such as Ping-Pong Arrays, Shared-Buffer updates, Asynchronous Updates, Shuffles vs Randomization etc which are relevant to 2D games.
Development Tools and Practices:
Keeping with the current industrial practices, we will allow and encourage use of AI tools in the course including in the programming assignments. We will particularly emphasize following tools and practices for development:
- Using Git for version control.
- IntelliJ IDEA as the development environment.
- Introduction to Agile methodologies, particularly Kanban, for managing software development tasks.
Performance Considerations:
- Latency vs. Bandwidth
- Framebuffers and the glfwSwapBuffers() function
- Threads and Processes
- Garbage Collection and its impact on performance
The course assignments provide practical experience in applying the concepts to real-world scenarios. It is impossible to find textbooks for a course of this nature and none is required. However, throughout the course, I will be providing references to all the topics covered.
Students are encouraged to use external resources like the LWJGL documentation, Stack Overflow, and khronos.org, khronos.org/opengl to supplement their learning.
This is not a course in Java programming; you are expected to be able to write programs in Java.
We only support Windows 11 and Linux in the course. The instructor uses Linux and Windows. OpenGL is used in the assignments and OpenGL on Apple systems runs simulated on top of Metal API. Though students have used Apple systems for this course, instructor is unable to commit to it.
- Each section is run independently. If you have to switch sections, you have to do it through the departmental procedure, at the beginning of the semester.
- Quizzes, tests, and finals will be different for each section. Some assignments may be similar.
This is a project-oriented, hands-on course, which means it will involve significant software development.
We will make every attempt to cover the material that is most relevant to the industry as of today, and as such there is no single book or a small number of books that cover the material we cover and hence there is no textbook. Lectures cover what is needed for the assignments. Quizzes, tests, and finals will cover lectures and assignments. If you do all assignments yourself and understand the solutions, understand the material covered in the lectures, you are fully prepared for the quizzes, tests and the finals.
- All lectures, office hours are face to face only. There will be no recording of the lectures. Audio/video recording of the lectures with your cellphones, taking pictures without prior permission, are not allowed.
- All assignments are to be done individually. Assignments turned in form part of your grades and as such should be your own work. Turning in work done by others - ether paid for or obtained as gratis, either from fellow students or from outside sources - is considered cheating. You are expected to use the lectures, office hours and Canvas discussions to get the needed help to do the assignments.
All quizzes, Tests, Finals are open to handwritten notes. That is, handwritten notes. Not text books or computer printouts. Please do not ask for exemptions. If you take your notes on a tablet or in some digital format, you will have to transfer them to handwritten format to use them in the quizzes and tests.
We won't be covering graphics to the depth where you will need deep mathematics background such as projective geometry, monte carlo computations nor deep physics knowledge such as BRDF, Radiance or Photorealism. Whatever graphics/mathematical tools are needed will be covered from ground up, on a need driven basis.
This is an applied-engineering course. The overall emphasis will be on hands-on programming and engineering assignments to learn creating quality software and to learn graphics programming.
Development Environment, syllabus, etc will be covered on the Canvas platforms for the course.
Grading:
We will have multiple TESTS and a final. All TESTS and the final are closed to books, cellphones, computers etc. However, they are all open to handwritten notes. You can bring any amount of notes, notebooks etc. But they all have to be handwritten. No computer Printouts.
Quizzes are usually given at the end of the lecture, will cover the material from that lecture and previous lectures.
The grades for the course will be based on a curve.
Written parts of the grading - tests, finals, and the programming assignments are graded separately and your course grade is the average of the two grades. To pass the course, you have to get a grade better than a D+ in both parts separately. Otherwise you course grade will be the lower of the two grades you get.