Course CGP303
An introduction to Computer Game Programming using C++ and DirectX
An introduction to Computer Game Programming using C++ and DirectX
Intended Audience
This course is aimed at those who have a reasonably good understanding of C++ programming, and who wish to apply this knowledge to computer game programming on Microsoft Windows machines supporting DirectX.
The course will cover both the design and implementation of computer games. The exposition will be via a series of case studies and examples, with class exercises that extend the examples. Topics covered will include
- Principles of 2–D graphics, audio, and input
- Strategies for the design and creation of 2D games
- Networking and Computer Games
- DirectX Setup
- Patterns and Idioms for Multiplayer 2D Games
- Basic 3D Game Programming
- Rendering pipelines, shaders, lighting, transformations
- Generating and making use of terrains
- Basic Animation techniques
- Basic Third Person Shooter Games
Practical Work
About 50% of the course time will be allocated to practical exercises. The exercises will be built around a small number of case studies, and so will cover the entire process from design, to implementation, to application development.
Course Contents
Overview of DirectX
- Graphics Systems and Models
- Pixels and Frame Buffers, Input and Output devices
- Imaging Systems and the Synthetic Camera Model
- Programmer's Interfaces
- Graphics Architectures
- Programmable Pipelines
- History of and MOtivation behind DirectX
- Overview of the DirectX API
- 2D Drawing in a Direct3D Framework
Rapid Revision of C++ and Object Oriented Programming
- Value types
- Structures and Classes
- Class Diagrams
- Inheritance
- Polymorphism
- Interfaces
- Templates
- Error and Exception Handling
Overview of the Standard Template Library
- Containers and Container Classes
- Vectors, Deques and Lists
- Associative containers - Maps, Multimaps, Sets, Multisets
- Function pointers and Pointers to class member functions
- Function Objects
Exploring the DirectX API
- Creating the Game Window
- Creating the DirectX D3D Device
- Loading and Saving Games
- COM and DirectX
- DirectInput and Input Devices (Mouse, Joystick, Keyboard)
- Game Initialisation
- Game Main Loop
- Sprites and Fonts
- Audio
2D DirectX Programming
- 2D Sprites and Fonts
- 2D Textures
- 2D Geometry and Geometric Transformations
- Scaling Sprites
- Using Collection Classes
- User interaction - input and feedback
- Saving Game State
3D Games Programming
- Overview of 3D Geometry
- Rotations, Matrices and Transformations
- Lighting
- Camera View Points
- Reflections
- Terrains
- Collision Detection
Event Driven Programming
- Finite State Machines
- Hierarchical State Machines
- Statecharts
- C++ idioms for implementing State Machines and State Charts
Game Architecture Issues
- Game Architecture
- Game Logic
- Game Views
- Game Initialisation
- Game Main Loop
- Game Multithreading
- Input Devices and Input Handling
- Game User Interface Design
- Game Events and Event Handling
- Scenes and Scene Construction
- First Person Games
- Multiplayer Games
Game Analysis and Design
- Use Case Analysis
- Story Boarding
- Overview of Rule Based Programming approaches to computer games
- Overview of AI (Artificial Intelligence) approaches to computer games
