From 48648a677f704197ba48990ddcda0a5367b2ea5e Mon Sep 17 00:00:00 2001
From: wasabimlgb
+
+
- Tabby Cat · Golden Retriever · Blue Buddy · Schnauzer + Tabby Cat · Golden Retriever · Blue Buddy · Schnauzer · Coco
Each character has its own animations and voice lines. Want something different? Generate a spritesheet with any AI image tool (Gemini, Midjourney, etc.), drop it in, and it just works. See the **[Sprite Spec](SPRITE-SPEC.md)** for details. +To add a new pet like `Coco`, the repo convention is: + +```bash +python3 -m pip install --user pillow numpy +python3 scripts/process-spritesheet-v4.py path/to/coco-source.png \ + -o public/sprites/coco.png \ + --cols 8 --rows 9 --target 128 +python3 scripts/generate-preview-gif.py public/sprites/coco.png \ + -o assets/previews/coco.gif \ + --still-output assets/previews/coco.png +``` + +Then register `coco` in `src/characters.js`. The Settings picker is generated from that file automatically. + ## A Day in Its Life Your pet reacts to what's happening — not randomly, but contextually. diff --git a/SPRITE-SPEC.md b/SPRITE-SPEC.md index 4df0fb2..c83cf39 100644 --- a/SPRITE-SPEC.md +++ b/SPRITE-SPEC.md @@ -66,33 +66,53 @@ STYLE: [e.g. "cute, photo-realistic" or "pixel art" or "chibi anime"] V4 is the canonical sprite-sheet cleanup pipeline for TinyRoommate. +Install the image tooling once: + +```bash +python3 -m pip install --user pillow numpy +``` + After generating, run: ```bash -python3 scripts/process-spritesheet-v4.py input.png \ - -o public/sprites/your_character.png \ +python3 scripts/process-spritesheet-v4.py path/to/coco-source.png \ + -o public/sprites/coco.png \ --cols 8 --rows 9 --target 128 ``` +Then generate the preview assets used by the README: + +```bash +python3 scripts/generate-preview-gif.py public/sprites/coco.png \ + -o assets/previews/coco.gif \ + --still-output assets/previews/coco.png +``` + +That gives you the two files the repo convention uses: + +- `public/sprites/coco.png`: the in-app spritesheet +- `assets/previews/coco.gif`: animated preview for docs +- `assets/previews/coco.png`: still preview image + ## Register Your Character Add an entry to `src/characters.js`: ```js // In CHARACTERS: -your_character: { defaultName: 'Name', displayName: 'Your Character' }, +coco: { defaultName: 'Coco', displayName: 'Coco' }, // In VOICE: -your_character: { - greet: '👋', - acks: ['~♪', '😊', 'hehe', 'hey!', '💛'], - petHold: 'hehe~ 😊', - petLines: ['hehe~', 'more...', 'nice~ 😊', "don't stop~"], - petFallback: 'hehe~ 😊', - tapLines: ['hm?', '!', 'hey?', '~'], - tapFallback: 'hey?', - chatFallback: 'hmm?', +coco: { + greet: '🐶', + acks: ['~♪', '😊', 'hehe', 'woof!', '🩷'], + petHold: 'tail wagging intensifies~ 😊', + petLines: ['more pets~', 'play with me?', 'best day ever~ 😊', "don't stop~"], + petFallback: '*happy panting* 😊', + tapLines: ['hm?', '!', 'woof?', '~'], + tapFallback: 'woof?', + chatFallback: 'woof?', }, ``` -That's it — the character picker UI is generated automatically from this file. +The character picker UI is generated automatically from this file. Once `public/sprites/coco.png` exists, `Coco` appears in Settings automatically. diff --git a/assets/previews/coco.gif b/assets/previews/coco.gif new file mode 100644 index 0000000000000000000000000000000000000000..e200f03ae069fae954852e16437fd39a32c16520 GIT binary patch literal 157423 zcma&OS5#AN*seR%0|ZDyZxVVHL+=;}9l_8MQA0IMuq;?&Jkhp79L5mpHL5<8Ib*aT5IXP}A>eI<
zVI~{?q0%Hxw(IQ*^diM*0_J-FUD#v=fC|`Zjy9d=DYLYd_++guBW|#UrVALY0Z?4<
zcVJSG7#m8z;_mTi9AlVRo-a*Nu9%?tSi7DQF!Fg6S{uY$tIYrJuM(7Mw8sb$^!CGy
zDr?(zEYSFjIHBW(5&!UHA=xLP^!&`9TQq*zj+9Brea)>7%YcjiqXruAN8|C|A3d>?
z`hEJ%@oU >K`6}kf9fMkwPOVJOlcI
zEWoFZhEw6{<6;-cuCOxf>Ka&>AgJYkE*P&CPcg((_?PkMU
z^l;;u>J?Aue7rAl^I1l$9WaKk< Wg8s+D$|1kfkVF|A6i2^7p$K5F05w(_9?&u_Gw
z5}f7BdDz3-4^pHi*dXK%QB}ci70_c4=+@1HlcJ#HOR8M~20N2~9wD*0Z#_cJ|MTP1
z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