Duncan Boehle – FaceOSC

by duncan @ 6:27 am 24 January 2012

[youtube=http://www.youtube.com/watch?v=MIyjMMm55Xo]

 

For this project, I adapted a previously-existing game (a couple friends and I made it during a 24-hour game jam) to handle controls using FaceOSC.

The game is based around manipulating gravity in order to jump on platforms and push blocks to reach the end of each puzzle room. The character is controlled using the arrow keys, and if the player wants to change the direction of gravity, he/she must first pause the game, then select the direction with an arrow key. In order to prevent the second use of arrow keys and the delay, I use FaceOSC to detect the orientation of the player’s face in order to determine what direction they want gravity to pull.

Unfortunately, there are some puzzles that require precise timing, and rotating the head can easily lose FaceOSC’s tracking, which can only be reacquired if the face isn’t rotated. I found that during testing, it did help players to have the pause feature so they could avoid rapidly tilting their head, so in keeping with the FaceOSC theme, I pause gravity if the player raises his/her eyebrows. FaceOSC tracks eyebrows surprisingly quickly and accurately, so this gives the player much more precise control.

The game works fairly well with the face tracking, but unfortunately Flash cannot directly communicate with FaceOSC. Because Flash doesn’t accept the UDP traffic that OSC is based on, I needed to set up an intermediate server (in Java: http://benchun.net/flosc/) to receive the UDP packets from FaceOSC and send them along to Flash via TCP on an XMLSocket. This ultimately means that I would need to distribute both FaceOSC and the Java server to players, make sure their Flash networking security settings are correct, and make sure they can run the command line Java server. For the moment, it remains mostly experimental, but a project trying to achieve this mechanic with a better distribution model would be better off statically linking with OpenCV’s face detection.

Go here to play the original version of the game (without face tracking).

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.
(c) 2024 Interactive Art and Computational Design, Spring 2012 | powered by WordPress with Barecity