dongbu / opengl-painter Goto Github PK
View Code? Open in Web Editor NEWThis project forked from pankajkgupta/opengl-painter
OpenGL-Painter is a Augmented Reality game. It is a real-time vision system that uses camera and Wii Remote (referred as Wiimote henceforth) as input to a game-play. Assignment mandates use of a camera and an inertial input device (like Wiimote). Instead of using an existing game (and plugging-in the inputs from my vision system) I preferred writing my own game because I wanted to handle the interaction in game-play. Vision system takes live stream from camera, orientation and button click from Wiimote. Camera live stream is handled using Opensource OpenCV library to detect a human face using Haar classifier cascade features and the live stream forms the background of the game screen. Orientation and button click input from Wiimote is handled using Opensource WiiYourself! Library and represents orientation of a play-tool ( a cannon in the game) and fire event of the cannon respectively. The game is a two player 3D game ( 2D was minimum required as per assignment requirements) with one player(A) using Wiimote to fire cannon on the face of other player(B). So the game represents “Fire and Dodge” behavior. Player A is supposed to fire the cannon on face of player B and aim of player B is to avoid the cannon falling on his/her face. 3D perspective of the game view changes according to the head position of player B and a red flash appears when the cannon fire hits the face.