Repository navigation
Conversation
A virtual pet for the 2.13" mono pixpaper,
running in both landscape and portrait on the clean partial-refresh path.
It has a Japanese UI and a pixel-art puppy with idle animations and
reactions to the on-screen buttons.
Build (on the RPi5; needs libgpiod v2):
gcc -O2 -o pet pixpaper-213-m-test-rpi5-pet.c -lgpiod
jpfont.h and petsprite.h are committed, so no Python is needed to build.
To regenerate them after changing the UI text or the dog*.png art:
python3 jpfont_gen.py # -> jpfont.h (needs Noto Sans CJK)
python3 sprite_gen.py --emit # -> petsprite.h (needs the dog*.png)
Run:
./pet landscape, interactive
./pet portrait portrait orientation
./pet auto self-running demo (also used when stdin is not a
tty); combine, e.g. ./pet auto portrait
keys: f = Feed, p = Play, c = Clean, q = quit
Signed-off-by: LiangCheng Wang <zaq14760@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Open-EP Pet, a Tamagotchi-style virtual pet for the 2.13" mono
PixPaper (RPi5), running in both landscape (250×122) and portrait (122×250)
on the existing clean partial-refresh path. It has a Japanese UI and a
pixel-art puppy with idle animations and reactions to the on-screen buttons.
Features
logical→RAM coordinate map in
fb_set()(portrait is a true 90° rotation).(エサ/あそぶ/そうじ) drawn from a tiny embedded 1-bit CJK bitmap font that
holds only the glyphs actually used.
look, surprised), height-normalised so every expression is the same size.
yawn / heart) plus a startle + action animation on Feed / Play / Clean, and a
sleep state with Zzz after a while idle.
f/p/c/q) or a self-running auto demo.Files
pixpaper-213-m-test-rpi5-pet.cjpfont.h/jpfont_gen.pypetsprite.h/sprite_gen.py/dog*.pngpet_auto.gifBuild & run (on the RPi5; needs libgpiod v2)