Tomagotchi Lab
Last updated
Was this helpful?
Last updated
Was this helpful?
Let's use our front-end web development skills to create a "living" pet! We'll use HTML, CSS, and JavaScript/jQuery to interact with our pet.
Create a repo for your tomagotchi pet
make a commit after you finish each one of the following
Create a Class (JS Class, look at your notes if your forget) for your tomagotchi
Instatiate your Tomagotchi
Display a character of your choice on the screen to represent your pet
Display the following metrics for your pet: (in chrome console)
Hunger (1-10 scale)
Sleepiness (1-10 scale)
Boredom (1-10 scale)
Age
Add functions to the screen to feed your pet, turn off the lights, and play with your pet.
(i.e. be able to call feed()
in chrome console and then log the pet to see the values change)
Add the ability to name your pet.
Style the page.
Increase your pet's age every x minutes
Increase your pet's Hunger, Sleepiness, and Bored metrics on an interval of your choosing.
You pet should die if Hunger, Boredom, or Sleepiness hits 10.
Morph your pet at certain ages.
Animate your pet across the screen while it's alive.
Change from the console to the DOM, make buttons to call the functions and update the view of tomagotchi's stats
Have your tomagotchi give birth to baby tomagotchi...
...with special powers (extend the class)!
Add an excercise()
method to your tomagotchi, that affects certain properties
Add anything you can think of... use your imagination!
Thank you GA's Connected Classroom for providing the basis of this lab!
Adapted from SEI-MAE by Taylor Darneille*