Tamacord - The New Gen Tamagotchi Simulator
A Discord Tamagotchi whose hunger, hygiene, and happiness decay in real time - each stat computed live from actual elapsed seconds, persisted as a CSV in Google Cloud Storage.
Why it exists
Built at RU Hacks 2022 by a team of four who grew up on real Tamagotchis, Tamacord brings the same pet back as a Discord bot - partly nostalgia, partly a first real project in Python and the Nextcord API.
Three needs, decaying in real time
Nothing ticks on a timer loop - every stat is recalculated from real elapsed time the moment you run $check, straight from the actual formulas:
HungerFeed button: +30, resets the timer
πππππππ
hunger -= 10 * (secondsSinceFed // 30)
hits 0 -> Dead (starved)
HygieneWash button: +30, resets the timer
πΏπΏπΏπΏ
hygiene -= 10 * (secondsSinceWashed // 45)
hits 0 -> Sick
HappinessPet button: +30, resets the timer
πππππππππ
happy -= 10 * (secondsSincePet // 60)
hits 0 -> Away (fled)
Age climbs the same way - elapsed time since birth, divided by 70 - so a pet left alone doesn't just stay put, it visibly gets older while it's starving.
A pet that can actually die
Any stat bottoming out flips the pet into a terminal state, and picStatus() swaps in one of eight hand-drawn sprites to match - Baby, Happy, Hungry, Sad, Dirty, Sick, Dead, or Fled:
Alive - hunger reaches 0 -> Dead
Alive - hygiene reaches 0 -> Sick
Alive - happiness reaches 0 -> Away
One real quirk in the source: the sickness check in botMain.py compares against a lowercase 'sick', while Stats.py sets the state to a capitalized 'Sick' - so in practice it's the hygiene stat hitting zero, not the state flag, that actually ends the pet's life.
"Cloud storage," one CSV at a time
There's no real database behind it - every pet is a single row written to a local CSV, uploaded to a Google Cloud Storage bucket keyed by Discord user ID, then deleted locally. Checking on your pet downloads that same file back down, reads the one row, and removes it again.
Built in Python with the Nextcord API over a hackathon weekend by a team of four with little prior experience in either - a stalled view.wait() call and a misbehaving button flow were the two hardest bugs to run down before the pet worked end to end.