Inspiration

Our inspiration came from the carnival games we played as children, specially, the well known arcade game Whac-a-Mole. We wanted to start from that game, because it is well known by many people, but adding some variations to the gameplay such as different objects or the possibility of competing directly with your friends.

What it does

Smash that Mole is an interactive game lens, inspired by the popular arcade game Whac-a-Mole. The lens uses the back-facing camera to detect the flat surface and place the holes. Each player will initially have 60 seconds to smash as many moles as possible. Each mole smashed will add 10 points to your scoreboard, but beware, bombs may appear and cause you to lose 15 points. To help you, timers may appear to increase the time of your game session by 5 seconds. Instead of the traditional mallet, players will interact with objects using their hands. The game ends when either player's time reaches 0.

How we built it

Smash that Mole was built using the power of Lens Studio to create the entire World AR experience. The main components used were:

  • Hand Tracking: to smash the objects.
  • Physics System: used to detect overlap between hands and the 3D objects.
  • Persistent Storage: to maintain the high score between the user sessions.
  • Device Tracker: we used the surface mode to adapt the objects position to the place where the user is playing.
  • Sounds.
  • Connected Lens: used to allow two players to compete in a real-time game session.

We tested the lens in multiple devices, including iPhone and Android phones.

Aditionally, we used Blender to create the 3D models for the mole, bomb, timer and the hole and Photoshop to create the 2D visuals.

Challenges we ran into

The first challenge we faced was to come up with an experience that would be fun using only the device's rear camera. The lenses we usually use are with the front camera and all of our initial gameplay ideas were heading that way.

Besides the idea, the main technical difficulties we faced were in three areas: placing the objects on the flat surface and not moving when hands were detected, achieving inter-device communication for multiplayer mode and debugging the lens to be able to test it on our devices.

Additionally, we had issues while importing the Connected Lens Component because by including it in the project the lens publishing process stops working properly.

Accomplishments that we're proud of

We are proud to have created a fun and interactive augmented reality experience between multiple players, extending the experience of a traditional game known around the world so that it can be played in a different way.

Also, even if the final solution does not use all the components that we tried, it was an accomplishment to understand how components like the ground segmentation or tweens work, while discarding them in order to get a simple and clean solution.

What we learned

We learned to develop interactive AR experiences with Lens Studio. It was the first time that we used that software and we tried to use the past knowledge with similar programs to decrease the learning curve for the hackathon.

In addition, participating in the Lensathon gave us the opportunity to delve deeper into real-time multiplayer experiences.

What's next for Smash that Mole

We have in mind two new features for Smash that Mole. The first one is to extend the multiplayer functionality to more than two players. Including this functionality adds a new challenge to display players' scores in a user-friendly way.

The second feature we would like to add is a multiplayer but collaborative game mode. In this case the points and accumulated time would be shared among all the players in the session and the purpose would be to collaborate with each other to reach the best possible team score.

Built With

Share this project:

Updates