Nemma is a UNIHIKER-first virtual creature app with a pygame-compatible desktop fallback for local testing.
unihiker_code.py: primary app runtimeinteraction_lab.py: hardware/audio diagnostics helper- Sprite/background assets:
nemma_*.png,dance*.png,eat*.png,background*.png,food.png
- States:
IDLE,CURIOUS,HAPPY,STARTLED,SLEEPY - Sleep flow:
- Low light over time pushes Nemma into
SLEEPY - Extended sleepy duration enters deep sleep
- Feed input/tap can request wake
- Low light over time pushes Nemma into
- Reactions:
- Sudden loud/sharp audio can trigger startled/curious behavior
- Strong sustained loudness can trigger dance animation
- Feeding:
- Feed action triggers happy state
- Optional two-frame eat animation plays when feed sprites are present
- Tap/click top area: move target position
- Tap/click Nemma: pet interaction (double-tap quickly to feed)
- Feed button (food icon): feed action
- Hardware button A: feed action
- Hardware button B: intentionally reserved (currently unmapped)
SIMULATE_IF_MISSING = Falseinunihiker_code.py:- Missing sensors do not emit fake values in production mode
- Mic backend probing order:
pinpong.extension.unihikerfirstunihiker.Audiofallback if extension mic is unavailable
- Ensure Python and
pygameare installed. - Place all files/assets in the same directory.
- Run:
python unihiker_code.pypython interaction_lab.py(optional diagnostics)
Tune behavior constants near the top of unihiker_code.py:
- Sleep/light thresholds and hold times
- Dance trigger thresholds and hold/hysteresis
- Eat/dance frame timing
- Mood profile thresholds (
MOOD_PROFILE)