Here we provide some tutorials to help you start with game programming. There are several areas that we try to cover here. One is pure programming like a the simple application or reading the keyboard. Some others are more algorithm oriented such as collision detection and random number generation. And some are more physics tutorials like the car physics series.
This is the basic concept behind our work. Visit this page regularly to see what's new. This is list of the tutorials so far.
34. Some programming required
Some programming tips to make the game code easier to manage.
33. The joy of flight
Here is how to use a joystick to fly our airplane.
32. Learning to fly
Create a simple flight simulator.
31. Using vertex buffers to speed up drawing
Let the GPU handle geometry data.
Learn how to encode 3D geometry information in an image.
29. Create a moving camera
A really cool feature in video games is a camera that follows the action. Something like a movie camera following the actors around in the film, looking at the car from a short distance.
28. Moving around in a virtual city
So far we have developed several techniques that we can use to make our games look interesting. Move around in a virtual city using quaternions to handle view.
27. Stencil Buffer
Clip drawing using an arbitrary shape, not a rectangle. It is not very hard to do using stencil buffers.
Have you ever wanted to draw the horizon in your game? Here is how.
25. Fog, transparency and scissors
Some simple effects that can make our games impressive.
24. GLSL shaders, an introduction
Using shaders to enhance visual realism in your games.
23. Collision and Response
Continue adding realism in your games with the simulation of the collision between two spheres.
What happens when you throw a ball? What path does a canonball follow? Read this introductory physics article and start developing some more realistic games.
21. Text display
Learn the basics on how to display 3D and 2D text in 3D environments.
In the year 1843 the Irish mathematician Sir William Rowan Hamilton published his work on Quaternions.
19. Casting shadows
Have you ever wondered what shadows are? Well we all know that shadows are the indication that the light from a source has hit an obstacle...
18. Accelerate with Draw Lists
It is time now to speed up our drawing a little bit. Improving the drawing speed is crucial for applications that draw complicated scenes, especially games...
17. Adding textures
Realistic 3D environments, especially in games, are based on illusions. Illusions generated by images. These are the textures applied on surfaces...
16. Lights please
In real world we see because there is light. Let's add some light to our virtual world to make it look real...
15. Into the 3rd dimension
What is happening when we draw in three dimensions? How can we control the perspective and view of 3D environments? Read this introduction and stay tuned...
14. Polygon triangulation
Our Computational Geometry journey continues with this polygon triangulation algorithm. Desintagrate your polygons into triangles for accurate rendering in OpenGL.
13. Our first game
In this tutorial we ignite the fire of real game programming. We put all the other tutorials together to create our first game. A small car that drives in the streets of a small town. Collision detection, geometry of steering, timers, user input is all here.
12. Point in polygon
Suppose you are writing some 2D drawing application and you want to check weather the user has clicked inside or outside some arbitrary polygon. Knowing the coordinates of the mouse and the vertices of the polygon can you tell? Well read on and you will.
11. Line segment intersection
How can we tell if two 2D objects intersect? We have to check all their edges. The algorithm in this tutorial shows how you can find the intersection between two line segments.
10. Steering your car
In this tutorial we address the mathematics (geometry) of steering and turning. How can we calculate the path our car follows when we turn the wheel? It is not that hard to calculate the exact line the car follows and even compensate for some sliding with the applications of simple physics laws.
9. Collision detection
Collision detection is essential in a game, unless we are playing cards or chess.
Putting the torque on he road. Read on and find out...
5. Speed and acceleration
One of the first things we realize in nature is speed. How fast things are happening or the objects are moving. As we grow we start to feel the acceleration of objects. The are moving faster or they slow down and stop...
4. Reading the Keyboard
Getting input from the keyboard under Windows is easy. The system notifies the application via the WM_KEYDOWN and WM_KEYUP messages. All we have to do is respond to these messages. We will insert some code in the window procedure and get the key that was pressed or released.
3. Keeping track of time
Our perception of the world and events has to do with time. Everything happens at some speed and that is what we need. A car covers some distance at a specific time interval while a free falling object accelerates at a standard rate. Another thing is the processing speed of different computer systems...
2. Simple OpenGL program
Create a simple application to use a basis for the rest of the tutorials.
1. Random numbers
Create your own random number sequence. Read the simple tutorial and get on with it...