Inspiration

We were inspired by the social experiments. Like, imagine a simple question: **"Can a community keep a digital life alive if one or some of them are secretly traitors? The life of a certain Tamagotchi is on the stake, only the players can keep it alive.

What it does

Tamanogotchi is a persistent, massive multiplayer pet simulator that lives entirely inside a Reddit post.

  • Persistent Life: The pet ages, gets hungry, and evolves in real-time, 24/7. Even when no one is looking, the server calculates decay.
  • The Battery System: To prevent bot spam, the community shares a limited resource. Every click costs Energy. If the community runs dry, they can only watch helplessly as the pet suffers.
  • Occasionally, a random player is "possessed" by the Void.
    • The Boss: Sees a unique Purple UI and gains a secret destroy button to deal massive damage.
    • The Community: Must identify that a Boss is active and coordinate to click BANISH before the pet dies.
  • Roguelike Legacy: Death is permanent. If the pet dies, it becomes a Ghost. Reviving it starts another generation. We track the history of fallen generations. By the time you read this, we probably have lost more than 20 generations. You got to save the Tamagotchi.

How we built it

  • Database: We use Redis (KV Store) to maintain the persistent global state. We implemented atomic locking strategies to handle race conditions when hundreds of users click Feed simultaneously.
  • Frontend: A responsive React app bundled with Vite.
  • Backend: Built on Reddit's Developer Platform, Devvit. Most awesome place to be honestly.
  • State Management: We utilized Optimistic UI Updates to make the game feel instant (0ms latency) while the server processes the logic in the background.
  • Visuals: We used a custom Parallax Engine (WorldEngine.tsx) that shifts the CSS background perspective based on mouse movement, giving a 2.5D depth effect without the heavy load of Three.js. Which I was planning to use initially. Will do next time.
  • Assets: Pixel art assets were generated via Leonardo.ai and integrated via a custom sprite logic handler.

Challenges we ran into

In as much as I enjoyed building this. I have some tea problems.

  • *We searched a lot, and I mean, a lot, of the cure of a bug. I quote the bug [I always quote like this so here it is], [You must be logged in to upload a new app version]. I issued a message to the mods, but I am still hoping, they will reply. But please fix that.

Accomplishments that we're proud of

The whole goddamn thing

What we learned

  • UI re-renders

What's next for Tamanogotchi

  • More legendary levels, for instance, we were thinking, we would want users to upgrade to masters of the space. And hopefully, other awesome characters we have in store. We have a lot. Like, rainy theme.
  • Backgrounds. Think Mortal Kombat. The characters fight in different backgrounds, chosen by the community.
  • Sick characters. I mean sick, like sick sick I guess I should say, pun not intended. Sick characters, speedy characters

  • gifs!

  • More awesome stuff to reveal. puts "clickheretorevealawesomestuffnopleasedontiamtestingthisfeature"

Built With

Share this project:

Updates