Inspiration

The inspiration for this came when we were trying to take a video of throwing a candy in the air and catching it with mouth. When we later saw the video in my phone's gallery, we immediately thought about turning this into an AR game !

What it does

It is a game, where a candy will fall from the top of your screen to the bottom, when the AR effect detects your face. Then all you have to do is open and close your mouth as soon as the candy is right in front of your mouth. The more candies you eat, more points you earn ! You can also tap on the screen to switch between candies.

How we built it

Luckily, Spark AR had everything we needed to convert this idea of catching candies, into a game. We used the patch editor in Spark AR to build most of the game. Only a few lines of scripts were written to convert score numbers into text, so that it can be displayed in the screen.

Challenges we ran into

The biggest challenge was to make the candies spawn above the player's head and detecting when the candy was right in front of player's mouth. The mouth must close at such a time, so that it looks like the candy has gone inside the mouth of the player. Then the scoring was another hassle since we didn't know numbers couldn't be converted to text so we had to learn scripting for that.

Accomplishments that we are proud of

We started from nothing, we didn't even know there was such a software called Spark AR almost a month ago until we got introduced to it at a meetup of Facebook Developer Circle : Kolkata, where we were told about this challenge. But since the software is so simple to understand and intuitive, we ended up making an entire game within just 4 weeks !

What we learned

Almost everything there is to learn about Spark AR, and a little bit about world space and camera space.

What's next for Candy Catcher

Add more candies ! Also we need to fine tune it to make it more accurate.

Share this project:

Updates