Inspiration


Gravity is the ultimate opponent. We’ve all felt that instinctive tension when trying to balance a stack of books or a tray of drinks; it's a universal human experience that requires total focus and physical poise. I wanted to capture that "hold-your-breath" intensity and translate it into a digital challenge. By leveraging Snap’s advanced Face Tracking, I aimed to turn the player’s own posture into the game controller, creating a "Play Everywhere" experience that turns any space into a high-stakes arena of stability.

What it does


Wobbly Boxes is a physics-driven AR survival game where your head is the platform.

  • The Core Mechanic: Using precise Head Tracking, a tower of digital boxes is anchored to the user. These aren't static assets; they are active physical objects that react to every micro-movement of your neck and shoulders.

  • The 10-Second Sweat: The objective is simple but grueling keep the stack balanced for 10 consecutive seconds. The timer only counts down when the stack is upright.

  • Dynamic Stability: A real-time stability algorithm monitors the tilt angle. If the center of mass shifts too far, the physics engine takes over, and the boxes tumble realistically in 3D space, leading to a "Total Spill" game-over state.

  • Visual Tension: A custom UI overlay features a "Stability Meter" and a high-pressure countdown to keep the player’s adrenaline pumping.

How we built it


The project was engineered from the ground up in Lens Studio, focusing on the marriage of computer vision and rigid-body physics.

  • Snap Physics Engine: I implemented a hierarchy of Rigid Bodies and Box Colliders. Each box in the stack has its own mass, friction, and bounciness properties to ensure the "wobble" feels authentic and dangerous.

  • Advanced Head Binding: Instead of a simple attachment, the base box uses a smoothed head-binding constraint. This allows the stack to follow the user's movements while still being susceptible to centrifugal force and inertia.

  • TypeScript Logic: I wrote a custom game manager in TypeScript to handle the complex state machine: detecting the "Balanced" vs. "Falling" states, managing the high-precision timer, and triggering the physics-based collapse.

  • UX/UI Design: The interface was designed to be "Snap-native," using clean, glowing overlays that don't distract from the physical challenge.

Challenges we ran into


The primary technical hurdle was "Sensor Noise." Raw head-tracking data can be jittery, which initially caused the boxes to vibrate unnaturally. To solve this, I developed a Low-Pass Filter to smooth out the tracking input. This allowed for a fair gameplay experience where the boxes only wobble when the player moves, not because of camera jitter.

Another challenge was fine-tuning the Friction Coefficients. If the boxes were too "sticky," the game was too easy; if they were too "slippery," it was impossible. I conducted dozens of playtests to find the perfect "sweet spot" for a 10-second survival window.

Accomplishments that we're proud of


  • Visceral Physics: I’m incredibly proud of how "heavy" the boxes feel. Players instinctively hold their breath while playing that physical reaction is the ultimate proof of an immersive AR experience.

  • High-Performance Simulation: Achieving stable, 60 FPS physics simulations on a mobile device while simultaneously running Face Tracking and World Rendering.

  • Fail-Forward Fun: Creating a game where losing is just as entertaining as winning. The chaotic physics of the boxes falling makes for perfect shareable "fail" content for Snap Stories.

What we learned


  1. This project was a deep dive into the nuances of AR UX. I learned that in a physical game, visual feedback (like the stability meter) is crucial because players can't "feel" the weight of digital objects. I also mastered the use of Physics Constraints in Lens Studio, learning how to balance realistic simulation with fun, arcade-style gameplay.

What's next for Wobbly Boxes


  • Adaptive Difficulty: Introducing "Wind Gusts" or different box shapes (like spheres or triangles) to increase the challenge.

  • Skins & Customization: Allowing users to unlock different box designs like Ice , Slime etc. for different balancing levels

  • Social Leaderboards: Integrating Snap’s social stack so friends can compete globally for the title of "Steadiest Head."

  • Multiplayer Duel: A real-time mode where two players must balance their stacks simultaneously while "distractions" appear on their screens.

Built With

Share this project:

Updates