Tamagotchi — Virtual Pet Game

A browser-based Tamagotchi-style game where users take care of a virtual pet by managing its core needs: hunger, happiness, and energy.

JavaScript HTML5 CSS3 Game Development
Play Game View on GitHub

Context

A personal project exploring how simple mechanics and feedback loops can create an engaging and emotional user experience.

Concept

Players maintain balance by feeding, playing with, and resting their pet. Each action affects multiple stats, requiring strategic decisions.

Focus

Building a clear game loop and state system using only vanilla JavaScript, with no external frameworks or dependencies.

Outcome

A fully playable browser game featuring pet evolution, random events, and a game-over system.

Key Features

Stat Management

Balance hunger, happiness, and energy to keep your pet alive.

Pet Evolution

Watch your pet grow through 5 stages from Egg to Adult.

Random Events

Surprise events that influence your pet's stats dynamically.

Game Over System

Challenge mode — if any stat reaches zero, game ends.

Visual Feedback

Animations and state indicators reinforce interactions.

Zero Dependencies

Lightweight, framework-free implementation.

How to Play

  • Feed — Increases hunger, decreases energy slightly
  • Play — Increases happiness, decreases energy and hunger
  • Sleep — Toggle sleep mode to restore energy (other stats decrease slowly)
  • Keep all stats above zero to survive
  • Watch for random events that give bonus stats!

Tech Stack

JavaScript HTML5 CSS3 CSS Animations

What I Learned

This project helped me better understand:

  • Managing state and logic in interactive applications
  • Designing feedback systems that guide user behavior
  • Structuring small-scale games without frameworks
  • Building a clear game loop and state system in JavaScript
← Back to Portfolio