Examination – Tuesday, 25 May 2010

May 24, 2010 – 7:29 am

Date & Time: Tuesday, 25 May 2010, 9:30 - 11:30 a.m.

Venue: Kings Centre, Coppard Gardens, KT9 2GZ Chessington
You can take a 71, 465, K2 or K4 bus from Kingston.

Find out more information about the venue.

This is a 2 hour OPEN BOOK written examination, to assess the practical skills in problem solving. The examination will comprise:

  • 10 multiple choice questions covering programming, mathematics and physics (5 marks each) 
  • 1 practical task to be chosen out of 2 proposed, including physical model analysis and a draft version of a program (50 marks).

The Exam ID is 798

Downloads:  2007 Exam PDF file | 2007 Exam with ANSWERS | List of Topics

Announcement: How to Submit the Source Code and the Final Report

May 18, 2010 – 11:23 pm

The source code and the final report are due on Monday 24 May.

The source code should be sent by e-mail directly to me: jarek (@) kingston.ac.uk. Before sending, please go through the following check list:

  • Please remove all the Debug folders with their entire content. They are enormous and completely useless – we will re-compile every project and these folders will be created by the compiler from scratch.
  • Please notice there are two Debug folders – remove both of them.
  • Remove the file with ncb extension – in the root of your project directory structure.
  • Use zip, 7zip or rar to pack the files. Do not send uncompressed files!
  • Send the project as an attachment, in an e-mail message.

If you do everything correctly, your zip file should not be larger than 200kb, including bitmaps. Be warned: any attachments larger than 1MB will be deleted without reading!

In unlikely case your submission must really take more than 1MB, please contact me and explain in a separate e-mail.

The Final Report should be published in the same Submissions site as usually. Please include:

  • any changes since initial / interim report
  • quick index applied mathematics / physics /programming based techniques
  • how to play, unless obvious
  • anything else we should now before marking

Please try to keep within 25 lines of text plus 1-2 images.

Submissions of the source code will be accepted all day, until late in the night. If the code is sent in time, I will accept slight delays in sending the reports – up to 24 hours.

Announcement: Project Demos

May 18, 2010 – 11:21 pm

The Project Demo session on Monday was very successful. There were many decent games on show, and those more modest were also appreciated. So much in fact, that everyone who attended this session will automatically pass the assignment (with at least 40% mark).

GFC 1.3 – with Animated Sprites and Pixel Hit Test!

May 10, 2010 – 7:36 am

The new version of GFC library is now available with all planned functions:

  • sprite properties,
  • animated sprites,
  • bitmap-mask based collision detection.

This is a beta version!

The new GFC 1.3 library can be loaded here:

There is no documentation yet, but Mario is well commented and the new functionality is easy to use.

Workshop 8: Revision

April 20, 2010 – 11:59 pm

In this revision session I will bring some of the exam papers from the previous years and we’ll have some practice on them. So, this time, paper and pens are needed…

You are also welcome to bring your projects to get advice or simply to show your progress. This is not mandatory.

Lecture 8: The Wheels on a Bus Go Round and Round

April 20, 2010 – 11:59 pm

wheelToday we have two PowerPoints presentations:

  • Collisions Revisited (PPT | (PDF)
  • Physics of Rotations (PPT | PDF)

We will revisit the topic of throwing things (see the “Roll and Fall” lecture)  and of collisions to provide the proper procedure for bouncing. However, if the shape we use is anything more advanced than just a ball, bouncing it will involve a spin! We will therefore have a closer look to the rotational movements so that to be able to control the angle and other physical parameters of a rectangle bouncing from the floor.

Today’s sample software is:

Easter Holidays

March 26, 2010 – 2:30 pm

7easter3

See you back on 23rd of April! Have a nice break and don’t forget there is a deadline for your interim reports on 16/04!

Announcement: On Friday we start at 1:30 pm

March 24, 2010 – 7:53 pm

sorethroatJarek is off sick until the end of this week.

Vasilis will replace him and deliver a lecture on Air Resistance and Mechanics of Cars. There will also be a workshop session, but staffing will be limited (we won’t have Michal on the day as well – so Vasilis will be alone) and you can consider taking this task as your homework…

The lecture will start a bit later than usually. Vasilis is teaching until 1p.m. but he declared 30 minutes is enough for him to have some lunch and he’ll start at 1:30.

Workshop 7: Get a Programmer’s Driving License

March 24, 2010 – 2:30 pm

To drive a car you will not to be a licence holder today, but what you will have to do is to show high skills as a programmer, in this programming challenge today.

Download the Workshop Handouts and the start-up Cars source code.

Please notice that the source code above is a limited workshop version, prepared for you to finish. For the full version check the Resources tab (subject to availability).

Lecture 7: Air Resistance and Mechanics of Cars

March 19, 2010 – 11:59 pm


Download PDF Handouts or PowerPoint slides.
Sample source code will be made available in the workshop.

Have you ever thought what happens when you drive a car? Or if someone else drives, if you don’t have a driving licence? When you press the gas pedal the car accelerates. It’s normal: there is an engine drive force that pushes the car forward, and according to the Newton’s second rule (a=F/m) this should cause an accelerated motion. But why, according to that law, you cannot accelerate your speed constantly ad infinitum? Why cars have their maximum speed beyond which there is no more any acceleration, even if the engine is working with its full power? What makes the Newton’s law cease to work?

At today’s lecture we will look closely at the air resistance, or the drag, as well as other types of mechanical resistances. We will analyse strongly how they affect the motion of cars. When the speed is low the resistance is also relatively small, so you can easily accelerate. But when the car moves faster, the resistance increases even faster than the speed: that’s why you cant’t accelerate indefinitely. At the car’s maximum speed the engine’s drive force is fully balanced with all the resistances. That’s why installing a spoiler can significantly impact your maximum speed!

Drive safely!

Announcement: Lara Croft this Friday

March 16, 2010 – 8:22 pm

Friday 19th March 4.00pm Hope Caton, scriptwriter for Tomb Raider 4, will talk about her experiences and working with games programmers

Announcement: The Intermediate Report

March 16, 2010 – 8:14 pm

The intermediate reports due date, originally on this Fiday, has been generously extended until the end of the reading week, which is the 16 April!

This period mostly covers your Easter holidays and reading week, so if you don’t want to work over that time you can submit before the holidays…

As I’ve already told in the class, there will be no intermediate in-class demo. Instead, there will be a project review sessions, just after Easter (23 April) intended to provide you some support with your projects. If you wish, you can also bring them next week, for the last workshop session before the holidays.

Please notice that there is no space for any date changes for the final submission – so the final demos are due on the 7th of May and no later!

The module guide is not yet updated and shows different dates, but this announcement is of higher priority.

Lecture & Workshop 6: Physics Engine, or on the way to the Moon

March 12, 2010 – 11:59 pm

moon.jpg

Today we are flying off to the Moon… First, a robust physical model must be constructed, including fuel consumprion and two different gravity forces (from the Moon and from the Earth). Before we start, click on the image and play to know what is it about…

Read more…

The paper linked above contains some strong maths. Don’t worry – its conclusion is that it gets much much easier when you use it within a game engine. The trick is that updating the game state in every animation frame you effectively execute numerical integration procedure, which is capable to automatically calculate highly complex stuff in an easy way.

If you want to do some practice (notice: there is no in-class workshop this week!) you can use the page 6 of this document and also download the workshop version of the Rocket program.

Otherwise, download the full version of the Rocket program.

Workshop 5: The Marble, or more and more physics…

March 5, 2010 – 2:00 pm

marbleAnother programming challenge is the Marble game, which contains elements of accelerated motion and collisions.

Download the initial version of the  the Marble source code. You can compile and run it as a full version of the game – but some crucial parts of the source code are hidden. One of the lines in the MarbleGame.cpp file is marked to be deleted to get your limited workshop version.

Your task, traditionally, is to finish programming the game. You will find all the hints in the form of comments in the source code.

Additional resources: Implementation remarks - check the Lecture Note just below…

Announcement: Project Proposal Submissions

March 5, 2010 – 11:33 am

Thank you very much for almost 60 project submissions. By now I should have given some feedback to everyone – if you have none, please let me know. Feedback was given using the comments – so check below your original submission.

Please read the General Feedback – that’s addressed to everyone (however it may be less applicable to your proposal anyway).

Announcement: Friday 5th March

February 28, 2010 – 9:45 pm

On this  Friday, we have a normal lecture from 1 to about 2:45 p.m. The workshop scheduled for this session is moved to the following week (12th March). Instead, you are welcome to an industrial lecture by Jon Robinson (Codemasters), entitled Games Programming Skills (JG 0001, 5th March, 3-4 pm).

After the presentation, around 4 p.m. there will be a special ‘catch-up’ session in our usual lab (SB127). This is only for those students who need additional support with their programming. There will be no new material in this session, so if you are up-to-date with the workshop tasks so far, you can start to enjoy your weekend earlier.

Lecture 5: Collisions, Momentum and Energy

February 27, 2010 – 12:00 am

billiard.jpg

Teaching materials for today:

Today we will start with something really simple. We will check how basic types of motion can be modelled using sprites, and then we will play with a small ball – throwing it and bouncing it a bit.

Then we will follow with more complex stuff. Starting with rather elementary maths, like vector calculations, we will slowly move towards a topic that is good physics with a lot of maths – modelling of the collisions. The physics behind a so called elastic collision is not yet complex, but in general case the geometry makes the calculations rather far from trivial. Besides the elastic ones, there are also ‘perfect inelastic collisions’, where colliding objects just concatenate like made of plasticine, and obviously a whole continuum of in-between states. To describe them accurately we need some more physical stuff: generally, the collisions are ruled by what we call ‘conservation rules’: conservation of momentum and conservation of energy. Details in the handouts and slides.

The demo program for today is a billiard game simulator. The collisions are not very complex from the point of view of physics, as these are almost ideally elastic collisions of two objects of almost exactly the same mass. But the geometry of the billiard game may be quite challenging…

The program is a working simulator, however it is not yet completed as a game and is not very playable at the moment.

Workshop 4: Unguided Programming

February 26, 2010 – 2:30 pm

cannons

Your task is a bit different today and you may find it a bit more difficult. Anyway, fewer lines of code to write than the last week!

Pleased download the source code of the Cannons game.

Compile and run it. It is not a working version yet! For the full version check the Resources tab (subject to availability).

Your task is to finish the game. This time we will tell you what to do, but not how. In theMyGame.cpp file, OnUpdate function, you will find a series of comments starting with TODO. They mark the places where you have something to do, and also tell you what to do.

Your games already has a lot of functionality: you will not have to create sprites, they are all already in-place. The user interaction is all done: the player can move the cannon (right mouse button) and aim and shoot (left mouse button) but — there are no collisions checked, so the game never knows if you hit a wall, and if the game is over (a cannon destroyed). More importantly, there is no gravity, so your balls travel along straight lines, which is rather not very enjoyable.

A couple of hints for you, but only read this if you are lost:

  • You can use ball.HitTest(p) to check for collisions. In case of cannons, use cannon[0] or cannon[1] for the left and the right one, or cannon[which] for your current turn, or cannon[1-which] for the opponent.
  • To check the collisions with the castle, check the loop in OnDraw function used for drawing the castle. Your collision test loop will be pretty much similar.
  • What to do when a cannon is hit? That’s simple – just call a function: GameOver();
  • What do do when the castle is hit? Simply set the value bHit = true;
  • How to model the gravitation? Think about a following call:
    ball.SetMotion(ball.GetXVelocity(), ball.GetYVelocity());
    This code will NOT change anything, but it gives you a lot of opportunities. The motion of ther ball is here decomposed into horizontal and vertical (or: X and Y) velocities, and then combine again to set the motion. Isn’t it exciting?

There is no separate workshop sheet.

If you have a working game, you can now award yourself with Paper Cannon XP, a nice heavily physics-based web game. Enjoy!

Announcement: Games Industry Speakers (UPDATED)

February 25, 2010 – 2:40 pm

This semester we have a number of industry speakers. I hope you will find this programme interesting, relevant and motivating. Here is the schedule:

  • 5th March, 3-4 pm, JG 0001: Jon Robinson (Codemasters), Games Programming Skills.
  • 12th March, 3-4 pm, JG 0001: Kostas Vlahavas (Rare, Project Natal) Games Tools, Editors and Assests.
  • 19th March, 4-5 pm, JG 0001: Hope Caton (designer of  Tomb Raider 4):  Killing Lara Croft – Working with Games Designers.

We will attend these events during our normal teaching time.

Lecture 4: Roll & Fall, or Playing with the Laws of Motion

February 25, 2010 – 12:15 pm

rollandfall.jpg

Download PDF Handouts or PowerPoint slides.

Please download the Roll and Fall source code.

Roll and Fall is our first physics-based game. It illustrates following phenomena:

  • Laws of motion, formulated by great British physicist and philosopher Sir Isaac Newton,
  • Motion of objects on an inclined plane,
  • Horizontal and vertical components of a force and a motion,
  • Friction force,
  • Gravitational force,
  • Free fall,
  • Physics of falling and throwing.

This topic may be essential for your Assignment 2, which has been revealed today. One idea could be to create a next level for the Fall and Roll game.

Workshop 3: Guided Programming

February 19, 2010 – 2:20 pm

You are supposed today to write your own, simple but complete game – all by yourself. This is an exercise in so called Guided Programming – so you will get a recipe showing in 12 steps how to achieve it.

Download your Guided Programming instruction.

By the way, you will need this image of an enemy spacecraft:

enemy

Some time after the workshop the full source code of your Space Battle game will be made available – please check the Resources Tab. There are even two versions of the game there!

Project Submissions Site is open!

February 19, 2010 – 1:05 am

You can now find the link to the Project Submissions site above. The Initial Report submissions will be due by Friday 26th February (one week extension).

a-MAZE-ing new version

February 18, 2010 – 10:23 pm

Thank you to all programmers who contributed the amazing new version of The Maze 2010: Laurence Atkinson, Stephen Davies, Rob Dupre, Dan Fewell, William Haywood, Russell Kentish, Andrew Jarrett, Pedro Ramos, David Simmans, Elliott Walden and special thanks to Maciej Dudzinski, who also contributed to the game engine and made cheating no more possible!

Download the source code

Careers in Games Industry

February 18, 2010 – 2:18 pm

See a presentation from Aaardvark!

Lecture 3: Maths!

February 18, 2010 – 12:32 pm

In this lecture we will talk about linear functions and how they can be used to show motion – both linear and accelerated. Other topics include: trigonometry, collision detection, Thales theorem and even some aspects of 3D perspective and 3D imagery.

Download Basic Maths (PPT | PDF)