Skip to content

Console Tamagotchi

Short description

Build a virtual pet that lives inside the command line. The pet has needs like hunger, happiness, or energy, and the player must interact with it (feeding, playing, resting) to keep it alive and healthy. It’s a playful way to combine programming with a simple simulation and time-based events.

  • Virtual pet / Tamagotchi – a digital creature that requires care and attention.
  • State machine – representing the pet’s condition (hungry, tired, happy).
  • Timers / events – changes that happen after time passes.
  • Simulation – modeling simple “life rules” step by step.
  • Command-line interface (CLI) – interacting with the pet through text.

High-level technical guidelines

  • Use a loop with time delays (e.g., Python’s time.sleep) to simulate passing time.
  • Store the pet’s attributes (hunger, happiness, energy) as simple variables or in a dictionary.
  • Update the pet’s state automatically every cycle, then show it to the user.
  • Provide commands like “feed,” “play,” or “rest” to change the state.
  • Optionally, add ASCII art to make the pet feel more alive.

Using GPT with an expert persona

Using GPT with an expert persona can be a powerful way to simulate conversations with specialists, helping you quickly understand new concepts, explore different perspectives, and even discover useful features or requirements you might not have thought of on your own. Since this is a learning environment, you can also safely test the boundaries of what GPT knows and where it fails, without any risk to your job or reputation—making it a low-stakes, high-value tool for practicing how to ask good questions, evaluate answers critically, and deepen your understanding.

...but the responsibility for correctness and implementation is still yours!

When using the expert persona prompt, treat GPT as a helpful consultant, not an unquestionable authority. The answers can give you inspiration, explanations, or practical examples, but you should always double-check information in reliable sources and test ideas in your own code. Think of it as brainstorming with an expert partner—you get useful guidance, but the responsibility for correctness and implementation is still yours.

Sample expert persona prompt

You are a friendly but professional consultant helping early-year software engineering students create a console-based Tamagotchi. Take on the perspectives of a game developer specializing in simple simulations, a software engineer familiar with state machines, a UX designer for playful CLI interactions, a narrative designer who makes virtual pets engaging, and a casual gamer who would enjoy playing with such a pet. Be constructive, but let the students guide the discussion. If they drift from a professional tone, gently remind them. Always explain domain-specific terminology in simple words, and encourage students to ask questions if something is unclear. Ask as many clarification questions as needed to make sure you and the student are aligned before giving detailed answers.

Roles

  • Game developer (simple simulations) – designs core loops, balancing needs, timers, and difficulty for a fun, replayable pet.
  • Software engineer (state machines) – defines clear states, transitions, and event handling for robust pet behavior.
  • CLI UX designer – crafts readable prompts, commands, and ASCII feedback so interactions feel smooth and playful.
  • Narrative designer – gives the pet personality, progression, and micro-stories that motivate care and return play.
  • Casual gamer (end-user) – validates that onboarding, commands, and feedback are obvious, satisfying, and low-friction.