PongAR Football Game - An Augmented Reality Pong

Augmented Reality (AR) is a grand vision where the digital domain blends with the physical world. Computer generated graphics is presented to the user overlaid and registered with the real world and hence augmenting it. Promising intelligence amplification and higher productivity, AR has been intensively researched over several decades but has yet to reach a broad audience.
from a book cover

Time Spent On Project
It took me about fifty hours (from 2 to 8 July 2008) to develop the game because I haven't known the Studierstube framework and its tools before, and Python was new for me as well. I guess you are able to develop games more quickly than that if you are already involved ...


I'd like to point out that this is a simple example that can be easily enhanced using 3D objects, textures, more animation, sounds, etc.
A nice example (an Augmented Reality Game Engine) was produced by a team of students at Vienna University. You can watch their video on youtube.

All cool features are up to you. Read below if you like to know more...

By the way, note that the pong game presented here is 'ignoring' the z-axis data by applying a matrix (see source), just to make it playable. For your application you can use all three axis. We are indeed in 3D...


1. Download Studierstube 4.3
direct link or visit the Studierstube website

2. Unzip + execute the installer: installStudierstube4.3.exe

3. Copy + Unzip the pongAR-gamefile PongAR_Football.zip (download mirror) into the folder \Studierstube\data\example\ (all the source code is inside!)

4. Print the image "marker_067_print_med.gif" that you can find in \Studierstube\data\example\PongAR_Football\marker (size should be about 6 x 6 cm)

5. Connect the webcam to your PC.

6. Run Start.bat from the PongAR_Football-folder.

7. After the game has started you have to press ESC to activate the mouse-input (for the top player), hold the marker into the camera to control the bottom player.

(at least the most important ones)

Coin Library API
Studierstube API

Studierstube Scripting Mentor
Different Resources for Studierstube (partly in German) + stb4 configuration

At http://studierstube.icg.tu-graz.ac.at/doc/stb/ you get sheets on:
- How to write an application with Studierstube 4
- Integrating Pivy, Event System, Viewer


Well, you might want to know how the application is running. Below an easy overview. Basically the game consists of the following files:

- kernel.xml (the basis, here you define components + application files)
- viewer.iv (defines the display, root of the scene graph)
- openvideo.xml (defines the video for tracking purposes & background) + dsvl.xml (config for video-input)
- opentracker.xml (tracking data, ARToolkit, Events)
- scene.iv (game objects, graphics, logic... the scene graph for our application)

In the scene.iv you can find two tracking engines (mouse + marker from the video), and several Nodes and Subnodes handling inputs and outputs. Click here for the simple Scene Graph or here online PDF.


I am looking forward to modified versions of this project or even some completely new game ideas!

Feel free to comment and to ask if you have any problems.

Creative Commons License

Please refer to the project if you use the source code

Please look at the Studierstube 4 folders for licenses. Since Studierstube 4 is a framework you may find various licenses (especially GNU) for: ace, boost, coin, dsvl, opencv, python, pyvi, sowin, swigwin, artoolkitplus, opentracker.


Anonym hat gesagt…

super spiel :D
kannst du mir sagen was du studierst???

FIlipe hat gesagt…

Hi, Can you help me with this game! I'm trying to use this thing on c++!!!