What: A digital slingshot game that uses a real slingshot and motion tracking.
How: A leap motion provides the motion tracking, while a SlingShot outfitted with a stretch sensor connected to an Arduino Uno initiates shots.
The last time I posted about this project I was proposing it as my ICM final project after initially developing it as my PComp midterm. It has come a long way from those humble beginnings.
For one, I teamed up with my affable colleague Michael Kripchak, who is even more into video games than I am. He also has some experience coding games.
While I had initially planned to use a single potentiometer to exclusively track movement along the X axis, Mike suggested using the Leap Motion to track the Slingshots position in relation to the game screen. We conducted a few play tests with just the Leap and were blown away by its tracking capabilities. It was exactly what we needed.
We ran into some trouble with tracking a hand while it was grasping the SlingShot. The Leap Motion tracks the joints of a hand and can get confused when a hand is in a fist, pulling all the joint points on top of each other. When an outside object (such as a SlingShot) is thrown in, it gets even more confused.
That’s not to say it didn’t work, it just wasn’t super precise. To solve the problem, we experimented with cutting a hand model our of cardboard to attach to the bottom of the SlingShot. It would act as a stand-in for a real hand.
This approach worked, but was obviously kind of wonky. That said, when we presented our work to our class, Allison said that it was “very ITP”. I’ll take that as a complement.
In the iteration we presented to our class, the game included moving targets, a timer for speed rounds, and an end screen that gave the user feedback on their performance. The user holds the hand with the SlingShot over the leap motion and pulls back the sling to fire at the targets. Check out our Github page for the project files. Because we were experiencing issues uploading images to both the web and desktop P5 editors, we wrote the game scripts in Sublime Text. To test and preview our work, we set up a local server.
Here’s a quick video of it in action. For the purpose of this video, Mike was controlling the cursor while I fire the SlingShot.
You can see that the Leap Motion is tracking the hand in the background and creating a cursor that moves across the screen with the hand. The SlingShot fires blue splats onto the background and targets when the stretch sensor (the sling) is pulled back and released.