Inspiration

I'm so excited to share my submission for this Lensathon. I've been working on creating a fun and interactive blocks puzzle game that you and your friends can play using Augment Reality on Snapchat. With the help of Snapchat's Lens Studio Physics and connected lens capability, I wanted to bring the classic Jenga game to life and create a real-life experience for all of you to enjoy!

What it does

Since this game is a connected lens experience, you will have to invite your friends first and once they join, you can start the game. Once the game is started, the block tower will appear in front of you in the camera preview.

Instructions for playing the game

  1. Take turns removing a block from the tower. As soon as you remove the block, it will disappear automatically.
  2. Don't cause the tower to fall.
  3. The game will continue until the tower falls.
  4. The person who causes the tower to fall loses the game.

Also, to keep the gameplay more exciting, each user has to finish their turn in the given time.

How we built it

The lens is developed using the Connected Lens Experience & the Physics of the Lens Studio. The blocks in the Block Tower are individually a Prefab and have their own physics attached to them. During a user's turn, I am enabling the touch interaction for the specific block. Due to this, when one user is making their move, another user can't make any changes to the tower. There are four tower-long planes placed nearby on each side of the block tower. When a block is removed and if it causes the tower to fall on either of the four planes, it will trigger the Game Over event.

Challenges we ran into

The major challenge was to implement the player's turn-by-turn logic in which only a single player can interact with the block tower at a time. In order to overcome this, I stored all the user IDs in the sync entity and sorted them so that the playing sequence of all the players remains the same.

Accomplishments that we're proud of

I am proud of the fact that I was able to replicate Jenga's gameplay using the Connected Lens feature. For me, this was a relatively complex undertaking.

What we learned

The webinars on the lens studio that were presented during the Lensathon were very helpful and now I have a very good understanding of the Connected Lenses and how to use them to design something complex.

What's next for Blocks Game

I plan to keep improving the gameplay for the Blocks Game. I have plans to implement features like the ability for the player to undo their moves as well as provide useful hints during the gameplay.

Share this project:

Updates