HOME

the cat, a round blue pixel petNo. I

EELIPETS

a virtual pet that goes on adventures while you watch

a small idle rpg that lives in a browser tab. you pick a pet and spread nine points across its six stats at the start and after that something happens every ten seconds. it runs into a monster and fights it on its own or it wanders into something nice and you pick which of its needs to top up, and every 100 xp it levels up and you get one more point to spend

▶ play in your browser

your pet is saved in this browser, so there's no account. you can export it as a json file from the settings menu

WHAT YOU'RE LOOKING AT

the game screen with the pet, its six stats and six needs, health and xp bars and the kill counter
Figure 1 - a level 4 pet

its six needs drop by one every five seconds, even while the tab is closed. they turn red under 20 and green over 80, and for now that's all they do. if it loses a fight the whole save is wiped and you're back at the stat screen

HOW A DAY GOES

fights run themselves

40% of the time it's a monster within one level of you, and the one with more agility swings first. you can run before it starts or skip to the end once it does, and a win is worth 15 xp plus 5 for each of the monster's levels

a battle against a wolf with both health bars and the battle log
Figure 2 - a wolf going first

or it finds something nice

the other 60% it's a little story and then you pick one of three needs to top up by 10 to 29. it's worth 5 to 30 xp either way

an adventure about a wise old oak tree
Figure 3 - one of the adventures

nine pets to pick from

each one is a 64 by 64 png in ms paint's default colors. i drew the cat by hand and the other eight came from a script that copies its eyes and mouth onto new shapes, which is why they all look a little surprised. you pick one on the stat screen when you start and you pick again if it loses a fight

  • cat

    cat

  • ghostie

    ghostie

  • mushy

    mushy

  • hatchling

    hatchling

  • batling

    batling

  • witchling

    witchling

  • jelly

    jelly

  • starling

    starling

  • slime king

    slime king

Figure 4 - all nine pets

THE SIX STATS

HOW IT'S BUILT

it's twelve preact islands on one astro page and none of them import each other. they talk through custom events on window and read each other's state out of localStorage, so the battle can pause the encounter timer without knowing where it lives. a fight saves itself after every turn, so a reload drops you back into the same battle

STACK:

astropreact islands@preact/signalslocalStorage

SIZE:

~3.2k lines of tsx across twelve islands
▶ play in your browser