Inspiration

Inspired by classic simulation games like The Sims and Tamagotchi, I wanted to create a persistent world that respects the player's time. Most Snapchat Lenses reset completely when you close them. My goal was to build a "living" environment where our tiny version in a form of Bitmoji continues to live, work, and sleep in real-time — even when the app is closed.

What it does

"Tiny Life 3D" is a complex life simulation game. You manage 6 dynamic stats: Hunger, Energy, Hygiene, Fun, Bladder, and Social.

  • Real-Time Career: You go to work to earn money and get promoted.
  • Offline Progression: You can send your character to sleep for 8 hours, close Snapchat, and the character will actually rest. When you return, the game knows exactly how long you were gone.
  • Visual Progression: As you get promoted from Intern to CEO, the apartment automatically fills with new furniture and decorations.

How I built it

I built this using Lens Studio and complex JavaScript. I used AI to help generate the core logic and math for the script, while I handled the entire scene composition, 3D asset management, UI design, logic integration, and testing.

The core technology is the Persistent Storage System. Instead of just saving a score, I save the exact Unix Timestamp of the user's last action. When the Lens is opened again, the script calculates the precise time difference (delta time) between "Now" and the "Last Save."

To handle the complexity, I created a massive script controller. Here is a look at the input structure I designed to manage the game:

🛠️ Game System Structure:

  • 🔊 AUDIO & SYSTEM SFX
  • ⚙️ SYSTEM & UI SCREENS
  • 🕹️ PLAYER & SPAWN POINTS
  • 📊 STATS (UI)
  • 🕒 TIME & ATMOSPHERE
  • 📍 INTERACTION ZONES
  • 🎭 ACTION PROPS
  • 💼 CAREER & UNLOCKS

Challenges I ran into

The biggest challenge was configuring the correct state preservation. It was difficult to handle the logic when a user returns after a long time — specifically ensuring a smooth "offline decay." If a player sends the character to work but comes back 12 hours later, the game has to instantly calculate the salary for the work time and the starvation damage for the remaining idle time without breaking the game loop.

Accomplishments that I'm proud of

I am very proud to have completed such a complex game for the first time. It feels magical to put the Bitmoji to sleep, close the app, and come back later to see a message like "Woke up 2 hours ago!" with the energy bar fully restored. I managed to create a fully functioning economy and career ladder within a single Lens.

What I learned

I learned a huge amount about Lens Studio's capabilities. specifically:

  • How to implement Persistent Storage for complex data.
  • How to utilize the Character Controller and Camera Controller for third-person movement.
  • How to manage a very saturated script with dozens of inputs and dependencies.
  • How to integrate AI-assisted code into a manual workflow effectively.

What's next for Tiny Life 3D

I plan to improve the graphics, add playable mini-games and more customization options for the furniture.

Built With

Share this project:

Updates