Login using Name and Password at the top of the page to be able to download all the files.

Suggested video viewing order

Game Physics Engine Video Tutorials

A physics engine framework is created in this section and integration into a game engine is demonstrated. These VMK build on top of the 3D OpenGL Game Engine. Topics covered include game timing and motion, simulating gravity, wind, and friction.
40 Files11 hr 41 min
0

Introduction

Free
0
1.8
4 min
I give you a brief overview of what I have planned for the physics engine VMK series. The VMK's will be using the OpenGL Game Engine to build on top of, so if you haven't gone through those VMK's I would recommend you look at them first. If you want to skip over the OpenGL Game Engine VMK's and start right in with the Physics one, you can do so with the complete Game Engine source code found here
1a

Disable Vertical Synchronization

13.1 MB
13.1
13.1
27 min
I explain the inner workings of the vertical synchronization feature built into a computer's video card and monitor. I then show you how to disable it so that we can get the game engine running at more than the standard 60 fps.
You must login to
download this file
1b

VSync GUI Checkbox Part 1/2

18.0 MB
18.0
18.0
15 min
In this two part VMK, I demonstrate how to add a check box to the Options Menu that will allow you to turn vertical synchronization on and off, while the game engine is running.
You must login to
download this file
1c

VSync GUI Checkbox Part 2/2

13.6 MB
13.6
13.6
14 min
In this two part VMK, I demonstrate how to add a check box to the Options Menu that will allow you to turn vertical synchronization on and off, while the game engine is running.
You must login to
download this file
2a

Sphere Geometry Part 1/2

14.3 MB
14.3
14.3
30 min
This is part 1 of a two part VMK. I show you how to generate the vertices and normals for a general sphere shape. The sphere object builds on top of the existing game engine framework.
You must login to
download this file
2b

Sphere Geometry Part 2/2

19.6 MB
19.6
19.6
28 min
This is part 2 of a two part VMK. I show you how to generate the vertices and normals for a general sphere shape. The sphere object builds on top of the existing game engine framework.
You must login to
download this file
2c

Texturing Sphere Part 1/2

8.8 MB
8.8
8.8
20 min
This is part 1 of a two part VMK. I add texture coordinates to the GeometrySphere class so that we will be able to apply a texture over top of the shape.
You must login to
download this file
2d

Texturing Sphere Part 2/2

17.3 MB
17.3
17.3
16 min
This is part 2 of a two part VMK. Included with this VMK are two TGA file textures that I used to test the texture coordinates. I also show you how to update the lvl file parser so that we can add spheres to our game without having to go into the c++ code to do it. An updated pdf file containing the lvl file specification is also included
You must login to
download this file
3a

Position, Velocity, Acceleration Pt 1/2

4.2 MB
4.2
4.2
15 min
I goes through the process of showing how position, velocity and acceleration are related to one another. You will see how to use the derivative to get the velocity and acceleation from a position graph. I will also go backwards and integrate acceleration to get velocity and position.
You must login to
download this file
3b

Position, Velocity, Acceleration Pt 2/2

3.7 MB
3.7
3.7
13 min
I goes through the process of showing how position, velocity and acceleration are related to one another. You will see how to use the derivative to get the velocity and acceleation from a position graph. I will also go backwards and integrate acceleration to get velocity and position.
You must login to
download this file
4a

Cannon Control

25.8 MB
25.8
25.8
26 min
I add a cannon to the scene and assign some keyboard control keys to allow us to change the direction and pitch of the cannon. A bug fix in the texture manager is also shown.
You must login to
download this file
4b

Cannon Ball Part 1/2

9.3 MB
9.3
9.3
15 min
A cannon ball is added to the scene which we can load into the cannon, aim and fire! No gravity in the simulation .... that's coming next.
You must login to
download this file
4c

Cannon Ball Part 2/2

8.6 MB
8.6
8.6
12 min
A cannon ball is added to the scene which we can load into the cannon, aim and fire! No gravity in the simulation .... that's coming next.
You must login to
download this file
4d

Gravity

23.6 MB
23.6
23.6
21 min
I add gravity to the motion of the cannon ball so that it falls back down to the ground after we shoot it. I also show you how to implement simple collision detection with the ground.
You must login to
download this file
5a

Laws of Motion

7.7 MB
7.7
7.7
19 min
There are three laws of motion developed by Newton's that we take a look at in this VMK.
You must login to
download this file
5b

Types of Forces Part 1/2

7.1 MB
7.1
7.1
13 min
I describe how to calculate three types of forces in this VMK. Gravitational, Spring and Damper forces are covered.
You must login to
download this file
5c

Types of Forces Part 2/2

8.3 MB
8.3
8.3
14 min
Three more types of forces are described in this VMK. Friction, Buoyancy and Drag forces are covered.
You must login to
download this file
5d

Wind Force

11.7 MB
11.7
11.7
27 min
In this VMK I show you how to derive the equations of motion for the cannon ball when wind is blowing in our scene.
You must login to
download this file
5e

Wind Code Part 1/2

15.6 MB
15.6
15.6
17 min
A 3D model of a chicken is loaded into our scene to represent the direction of the wind and the cannon ball properties are all grouped into a separate class.
You must login to
download this file
5f

Wind Code Part 2/2

20.4 MB
20.4
20.4
19 min
Keyboard input from the number pad is added to allow us to change the direction of the wind, change the speed of the wind and the mass of the cannon ball. Finally the equations of motion are also implemented.
You must login to
download this file
5g

Drag Force

13.3 MB
13.3
13.3
28 min
I show you how to derive the equations of motion when the forces due to gravity, wind and drag are acting on the cannon ball.
You must login to
download this file
5h

Drag Code

20.9 MB
20.9
20.9
26 min
The equations of motion for the cannon ball are implemented in C++. We can now see how Gravity, Wind and Drag forces can cause the cannon ball to change direction.
You must login to
download this file
6a

Integrator Equations

9.6 MB
9.6
9.6
22 min
We will be implementing a numerical integrator into the physics engine so that we do not have to calculate the double integration of acceleration ourselves. The equations for the Euler and Improved Euler integrator are shown in this VMK.
You must login to
download this file
6b

Comparing Integrators

13.8 MB
13.8
13.8
22 min
The Euler and Improved Euler Integrators are compared using Microsoft Excel. Use the attached spreadsheet to become familiar with how the integrator works.
You must login to
download this file
6c

Using Euler Integrator Part 1/3

10.4 MB
10.4
10.4
12 min
I clean up the code by removing the cannon and I add a new Particle class to the Scene.
You must login to
download this file
6d

Using Euler Integrator Part 2/3

8.1 MB
8.1
8.1
12 min
The Euler Integration equations are added to the Particle class to cause each particle to move independently under the influence of gravity and wind.
You must login to
download this file
6e

Using Euler Integrator Part 3/3

8.4 MB
8.4
8.4
12 min
I show you how to add a few more effects to the Particle class to cause the particles to bounce off the ground and randomly shoot out in different directions.
You must login to
download this file
7a

Preparation Work Part 1/2

10.7 MB
10.7
10.7
12 min
This video explains the inner workings of the physics engine that I'll be adding to the game engine. Near the end of VMK 7B I clean up some code to get ready to implement the new algorithm in C++.
You must login to
download this file
7b

Preparation Work Part 2/2

12.5 MB
12.5
12.5
13 min
This video explains the inner workings of the physics engine that I'll be adding to the game engine. Near the end of VMK 7B I clean up some code to get ready to implement the new algorithm in C++.
You must login to
download this file
8a

Render Ship Part 1/2

13.2 MB
13.2
13.2
12 min
I will be using the physics engine to control a space ship on the screen. In this video the game engine is updated to house the new physics engine algorithm. This VMK is broken into parts 1 and 2. This is the first part.
You must login to
download this file
8b

Render Ship Part 2/2

17.1 MB
17.1
17.1
13 min
I will be using the physics engine to control a space ship on the screen. In this video the game engine is updated to house the new physics engine algorithm. This VMK is broken into parts 1 and 2. This is the second part.
You must login to
download this file
9a

Space Ship Motion Part 1/2

18.3 MB
18.3
18.3
20 min
In this two part video I show how to use keyboard input to control the space ship's motion. Pressing the up and down arrow keys will activate the engines to move forward and back, and pressing the left and right arrow keys will steer the ship left and right.
You must login to
download this file
9b

Space Ship Motion Part 2/2

16.3 MB
16.3
16.3
10 min
In this two part video I show how to use keyboard input to control the space ship's motion. Pressing the up and down arrow keys will activate the engines to move forward and back, and pressing the left and right arrow keys will steer the ship left and right.
You must login to
download this file
10

Tuning Space Ship

39.2 MB
39.2
39.2
18 min
Three things are modified in this video to make the space ship fly better. 1)Angle of space ship is limited to be between +/- 360 degrees. 2)Space ship is constrained to always be in the confinds of the window. 3)Limit the maximum speed of the ship
You must login to
download this file
11

Integrator Classes

11.3 MB
11.3
11.3
13 min
In this VMK I develop two new classes called Integrator1 and Integrator2. These classes will be used to integrate all our 1D and 2D variables in the videos to come.
You must login to
download this file
12

Improved Space Ship Class

15.9 MB
15.9
15.9
18 min
Using the newly created integrator classes from the previous VMK we can now create a better Space Ship class. The new Space Ship class is inherited from ObjectDynamic2D. All objects moving in 2D will be derived from this new class.
You must login to
download this file
13a

Interpolation Part 1/2

12.5 MB
12.5
12.5
16 min
In this video I explain why we need to use interpolation with the physics engine. I then go into the code to implement the technique described and show how you can test the effectiveness of the interpolation. You'll need to do this on your own computer to see the results, since the frame rate of the video is only 10fps which is too slow to really notice the difference.
You must login to
download this file
13b

Interpolation Part 2/2

18.5 MB
18.5
18.5
9 min
In this video I explain why we need to use interpolation with the physics engine. I then go into the code to implement the technique described and show how you can test the effectiveness of the interpolation. You'll need to do this on your own computer to see the results, since the frame rate of the video is only 10fps which is too slow to really notice the difference.
You must login to
download this file
14a

Bullets Part 1/2

15.2 MB
15.2
15.2
18 min
This VMK is broken up into two parts. In the first part I show how to construct the SpaceShipBullet class which is used to control all the bullets that the ship fires. Each bullet is rendered as a red triangle on the screen. To rotate each bullet to face the correct direction a generic Matrix2 class is created.
You must login to
download this file
14b

Bullets Part 2/2

28.0 MB
28.0
28.0
16 min
This VMK is broken up into two parts. In the second part I take the new SpaceShipBullet class and integrate it with the SpaceShip class. If you press the spacebar you will shoot one bullet. If you hold down the spacebar, then a row of bullets will be fired.
You must login to
download this file