# Mythkit

A virtual-pet game for the ELEGOO E32R28T board (ESP32, 240x320 ILI9341
display, resistive touch). Hatch an egg, care for a cat-inspired mythical
creature, and watch it grow through branching forms. Made for kids 8+ and up.

Website: https://www.mythkit.dev

| | | |
|:-:|:-:|:-:|
| <img src="docs/screenshots/home.png" width="240" alt="Home screen: the pet in its room"> | <img src="docs/screenshots/feed.png" width="240" alt="Feeding: meal or snack"> | <img src="docs/screenshots/play.png" width="240" alt="Play menu"> |
| Home | Feeding | Play menu |
| <img src="docs/screenshots/game.png" width="240" alt="Which cup? mini-game"> | <img src="docs/screenshots/collection.png" width="240" alt="Pet book: forms found so far"> | <img src="docs/screenshots/stats.png" width="240" alt="Pet stats"> |
| Which cup? | Pet book | Stats |

- Full care simulation: hunger, happiness, sleep, cleaning, sickness, with
  three difficulty presets.
- Life stages and branching evolution, driven by data-only species packs.
- Touch mini-games, plus turn-based games you can also play remotely.
- Deep sleep with catch-up: the pet pauses while the board is unpowered.
- Optional Wi-Fi for the clock (NTP), set up through a hotspot page.
- Optional microSD card for extra species packs and firmware updates.
- Optional remote care over the home network: an MCP server on the board, so
  an MCP client can read the pet's stats and care for it
  ([guide](docs/mythkit-remote-care-guide.md)).

## Art

The pets, icons and room art are included: the converted frames in
`art/mythkit/frames/`, compiled into the firmware as
`components/species/fallback_pack.c` and `components/art/shared_art.c`.
`docs/mythkit-guide.pdf` and `docs/mythkit-evolution-paths.pdf` show the pets
and how they evolve.

To draw your own:

1. Draw (or generate, see [art/ART_PROMPT.md](art/ART_PROMPT.md)) one sheet
   per form on a magenta background into `art/mythkit/sheets/`, plus the shared
   sheets (`icons.png`, `props.png`, `games.png`, `room.png`) into
   `art/shared/`. Layouts are described in `tools/sprite_convert.py` and
   `tools/shared_art.py`.
2. Run `./mk.sh art` to convert them and rebuild the built-in pack.

Species, forms and evolution edges live in `art/mythkit/species.json`.

## Building

Everything builds in Docker (`espressif/idf:v6.0.1`), driven by `mk.sh`
(bash; Git Bash works on Windows):

```bash
./mk.sh build        # firmware
./mk.sh test         # host tests (C, no board needed)
./mk.sh pytest       # tool tests
./mk.sh pack         # rebuild the built-in species pack
PORT=COM3 ./mk.sh flash-app
```

Flashing runs esptool on the host (`pip install esptool`); set `ESPTOOL` if it
is not `python -m esptool`.

## Layout

- `components/`: the game core (pet simulation, saves, games, packs, drawing)
  and board drivers.
- `main/`: the screens and the game loop.
- `port/`: stand-ins that let the shared game run without ESP-IDF (host tests).
- `test/host/`: host tests.
- `tools/`: sprite converter, pack builder, placeholder art, serial logger.
- `docs/superpowers/specs/`: design documents.

## License

The code and art are under the [MIT License](LICENSE).

"Mythkit" is the name of the author's game. The license covers the code and art,
not the name: please give forks and derived games their own name.
