News
You may download the assignment here.
You may download the game we developed in the last 4 lectures here. Please note: the code is still incomplete and some features do not work or work only partially. Also, many implementations are inefficient and not necessarily very elegant. Use the code to see how the things we discussed in the lectures can be implemented but also try to improve the code if you should use similar aspects in your own game. Finally, some sections of code / classes are taken from the books listed on the reading list as referenced in the lecture notes. NOTE: make sure that if you should use someone else's code in your assignment to reference it properly - otherwise you will be penalised for plagiarism.
Introduction
This course covers the fundamentals of games console programming with special emphasis on 3D games and Microsoft's XNA framework (XBox). All programming will be done in C#. It is a practical course with many code samples and exercises. A two-hour lecture is held every Thursday, followed by a two-hour lab every Friday where students will implement and extend the concepts covered in the lectures. The assessment consists of a progress test mid-term (10%), an assignment where students need to implement a 3D game (20%) and an exam in the summer period (70%).
This website will serve as the primary hub for information pertaining to the material covered throughout the course and will be updated contonusly throughout the term. In particular, lecture notes and code samples will be made available following each lecture and sample implementations will be made available following each lab.
Lectures
Lectures take place every Thursday at 2pm (2 hours) in room 3.008 (teaching rooms).
Lecture 1 @ 13/10/11: Introduction and XNA Basics
- Lecture slides | Lecture slides (4 up)
- Code samples: SquareChase | SpriteAnimation
Lecture 2 @ 20/10/11: A Complete 2D Game: Shooter
- Lecture slides | Lecture slides (4 up)
- Code samples: Game components | Inputs
Lecture 3 @ 27/10/11: From 2D to 3D - The Basics
- Lecture slides | Lecture slides (4 up)
- Code samples: Drawing primitives | World transforms
Lecture 4 @ 03/11/11: 3D Models, Spaces and Cameras
- Lecture slides | Lecture slides (4 up)
- Code samples: Demos from lecture (note: to run the demos, some code actually needs to be commented out etc.)
Note: There is a minor mistake in the construction of the cone. The number of unique vertices required (if including a base) is "numVertices = 3 + (numTrianglesSide - 2) + 1" and not "numVertices = 3 + (numTrianglesSide - 1) + 1". One needs to "wrap around" at the end to construct the final triangle (connecting with the first).
Lecture 5 @ 10/11/11: Cameras and 3D Animations
- Lecture slides | Lecture slides (4 up)
- Code samples: Boxes demo | Robotic Arm | More flexible Robotic Arm
Lecture 6 @ 17/11/11: Level Generation, Collision Detection and Game AI
Lecture 7 @ 24/11/11: Advanced Game AI
Lecture 8 @ 01/12/11: Effects, HLSL and Billboarding
Lecture 9 @ 08/12/11: Particles and Terrain
Lecture 10 @ 15/12/11: Multi-Player Games
- Lecture slides | Lecture slides (4 up)
- Code samples: Split-Screen | Networked Game | Networked Game (App Hub) | Networked Game (App Hub)
Labs
Labs take place every Friday at 9am / 12pm (2 hours) in CES Lab 5.
Students will be assigned to one of the time slots.
Lab 1 @ 14/10/11: C# and A Simple 2D Game
Lab 2 @ 21/10/11: A Complete 2D Game: Shooter
- Instructions | Assets | Alternative implementation (with slides)
- The original tutorial may be found here.
Lab 3 @ 28/10/11: From 2D to 3D
Lab 4 @ 04/11/11: Model Creation and 3D Worlds
Lab 5 @ 11/11/11: 3D World and Articulated Arm
Lab 6 @ 18/11/11: Level Generation, Collision Detection and Game AI
Lab 7 @ 25/11/11: Advanced Game AI
Lab 8 @ 02/12/11: Behaviour Trees
Labs 9 & 10 (09/12/11, 16/12/11): Assignment
- You should work on your assignments and ask any questions you might have.
Reading List
- Primary
- XNA Game Studio 4.0 Programming by Miller & Johnson
- Learning XNA 4.0 by Aaron Reed
- C# Pocket Reference by Albaharai & Albahari
- Artificial Intelligence for Games by Millington and Funge
- Secondary
- 3D Graphics with XNA Game Studio 4.0 by Sean James
- XNA 4.0 Game Development by Example by Kurt Jaegers
- Essential C# 4.0 by Mark Michaelis
- Game Artificial Intelligence by Ahlquist and Novak
Support Documents
Below you can find several documents describing various aspects of the course. This list will be updated throughout the term. These documents have been sourced from different web sites, including official ones by Microsoft as well as others. We cannot guarantee the correctness of the contents of these files. Please raise any questions you may have in the lectures and labs.- Game industry facts from ESA: here and here
- The game loop (Microsoft)
- Best Practices for Games (Microsoft)
- Introduction to C# (Microsoft)
- C# data structures (Microsoft) (cheat sheet)
- Information on vectors and matrices from Colardo University
- Coordinate spaces (Microsoft)
- 3D graphics eBook (from Wikipedia)
- Shaders and HLSL (Microsoft)
- Texturing
- Optimisation (Microsoft)
- Performance (Microsoft)
Web References
- XNA
- MSDN (Micosoft Developer Network)
- App Hub (development for XBox 360)
- Riemer's XNA tutorials (not all are XNA 4.0)
- 3D Graphics
- Nice tutorials for different aspects of XNA
- Great blog about 3D vectors, matrices and transforms
- Wikipedia book on 3D rendering
- Some information on texturing tools
- HLSL Shaders
- DCC
- C#
- Game AI
- Path-finding resources
- Path-finding benchmarks
- Influence maps
- Navigation Meshes
- Binary space partition trees applet
- Game Industry
- Other
Software Tools
Console game development is a complex process that involves numerous tools to create the individual aspects of the game, including textures, models and animations. The following is a list of free software tools for these purposes (we will cover them in lecture 4):Connect the Xbox
In order for you to deploy games to the Xbox, you need to create an App membership account and set up the connection between the PC and the Xbox. Find below the steps you will need to follow to connect the Xbox to the PC in the lab:- Create a free email account with Microsoft Live (formerly hotmail; https://login.live.com).
- Register at www.dreamspark.com.
- Verify your student status at DreamSpark through the university.
- Now you can join the App Hub at http://create.msdn.com. Sign in with your verified email address.
- Verify email address to activate the App Hub account.
- Start up an Xbox and then press the connect button; you will see a menu with options.
- Go to HOME and then RECOVER GAMERTAG.
- Enter your verified email address and password.
- Now you need to install XNA Game Studio Connect: go to the Game Marketplace and choose Explore Game Content.
- Go to Titles A-Z, choose X and then XNA Creators Club. Go to Extras and select XNA Game Studio Connect.
- Install the software.
- Go to your game librabry and select XNA Game Studio Connect. The screen should show a 5x5 code.
- On the PC, go to Start and select from All Programs, the folder called Microsoft XNA Game Studio 4.0
- There is a program called XNA Game Studio Device Center - select it.
- Here you can add a new device: choose Xbox, name it and enter the 5x5 code.
- If all goes well, the PC should detect the Xbox on the same network.
- To deploy a game: create a copy for Xbox (right click on the code project) and set the new project as active.
- Run the code and the files will be copied to the Xbox and the game will be executed.
Assessments
The final grade for CE318 consists of 30% coursework and 70% exam. The coursework includes an assignment worth 20% of the overall mark and a progress test worth 10% (week 6).
You may download the assignment here.
The assignment is due
Submission details will be posted here later in the term. The work will be assessed in a 2-hour lab session where you will have 10 minutes each to demonstrate your project to us. The lab will take place
You will be assigned a particular time slot; details will follow. In this session, we will have a look at the game and the code and will assess your understanding of the game mechanics. It is vital to attend all lab sessions and to follow up with the exercises from the lectures and labs as they often build on one another. Sample answers will always be provided following the second lab session.
Instructions for submission:- Assignments must be demonstrated in the lab
- Assignments must also be submitted to the online submission server
- You should submit a zip file with everything in by the deadline
- Include the entire assignment within a single VS2010 XNA solution
Finally, 70% of the mark is determined by a 2-hour exam that will take place in the summer examination period.
Past Papers
- The exam paper from last year may be found here.
People
- Lecturer: Dr. Philipp Rohlfshagen
- Labs: Mr. Diego Perez and Dr. Philipp Rohlfshagen
In case of urgent matters, we may be found in office 2.529.
