Skip to content

Latest commit

 

History

History
55 lines (33 loc) · 2.36 KB

README.md

File metadata and controls

55 lines (33 loc) · 2.36 KB

AR-Labyrinth

AR Labyrinth is a modern take on the classic game Labyrinth. Users can draw their own maze and then scan it into the game. To provide a tactile input similar to the original game, the player can hold the physical map under a webcam and tilt it to control the virtual ball. AR Labyrinth uses OpenCV's feature detection to compute homographs that track the tilt of the map in the webcam stream, and Panda3D as a 3D physics engine to generate user-created maps and run the game. A video demo of the game may be found here.

This project won first place in the advanced division of the Fall 2016 5C Hackathon.

Setting up the Game

The OpenCV and Panda3D modules will be required to play this game. OpenCV will need to be run in Anaconda Python 2.7 version, which can be installed here. Panda3D will need to be installed by installing Panda3D's own package of Python, which can be installed here.

Setting up OpenCV

Install Anaconda Python 2.7 version through the website. If you had previously installed Anaconda Python 3.5 version or would like to install the newer version instead for future use, you may switch to the 2.7 version with the command

source activate python2

If you would like to switch back to Python 3.5, you may use the command

source deactivate

To install OpenCV in Anaconda, use the command

conda install -c menpo opencv3=3.1.0

Setting up Panda3D

Install the Panda3D SDK from the website. A version of Python 3.5 called ppython is installed with the SDK and will be required for the game to work.

Playing the Game

Start by running the following command.

python2 scan_maze.py

A live webcam feed will show up in a new window. Position the map so it is on the screen and press c to capture a still frame of the map. Crop the image so that the map fills up the entire window. Press q to make the live webcam feed return.

Then, run the following command.

ppython run_game.py

A new window will show up containing the maze generated by the map. Tilting the map results in the virtual ball moving around the virtual labyrinth.


AR-Labyrinth was created by Jacky Lee, Cole Kurashige, and Owen Gillespie