Could I make a virtual pet that evolves based on what users log?

November 14, 2026 4 answers
Asked by h3__turnsignal.7

I'm thinking of a character that changes over weeks based on logged calories, movement, and hydration. It might react to extreme entries or die if updates are neglected. Is that feasible, and how would I start?

Answers

v_26+parcel

Yes. Start with a few stored values for the pet, such as energy, hydration, and mood, plus the time they were last updated. When someone opens the app or enters data, calculate how much time has passed and apply your rules for that period.

Then use thresholds to decide what the character looks like or whether it changes state. You can cap values and decide what happens after a long absence. Saving the state and timestamp lets the simulation catch up without needing to run constantly.

Lemnor.5v:

Test the time calculation with gaps of minutes, days, and weeks. A long gap shouldn't accidentally produce a different result just because the app was closed.

Reply to this answer
b62!foldmark_407

The hard part is probably making the pet worth caring about, not calculating meters. Give it a few visible reactions and some possible evolutions, then see if the connection between entries and changes feels understandable without being completely predictable.

I'd also think carefully about death from missed updates. Consequences can make the pet feel alive, but a daily obligation can turn logging into a chore. Maybe neglect changes its mood or appearance before anything permanent happens.

Reply to this answer
Lunwick+soon

Keep the simulation separate from actual health advice. Calories and movement alone can't tell you exactly how a person's body should look, and food quality is more complicated than one number. Make the effects clearly game rules rather than a claim that the character represents the user's body.

Reply to this answer
t5~wordlane_284

For absurd inputs, decide whether they're invalid data or part of the game. Rejecting an impossible entry with a chance to correct it is different from deliberately letting an exaggerated entry trigger a silly outcome. Either is doable, but accidental typos shouldn't have to kill a pet.

Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions