forked from petus/MeteoPlaneRadar
-
Notifications
You must be signed in to change notification settings - Fork 1
Virtual Pet DigiCat
Radovan Dvorský edited this page Sep 19, 2026
·
3 revisions
DigiCat is a full-body animated pixel art virtual companion and tactical airfield co-pilot built directly into the ESP-MeteoPlaneRadar. Designed as an homage to classic retro virtual pets and inspired by aquascape123/digicat (MIT License), DigiCat lives right on your 2.1" round touchscreen display.
- Retro 16-Color Palette (RGB565): Custom ginger tabby palette with dark stripes, cream belly, pure white bib and paws, emerald green eyes, and soft pink nose and ear accents.
- Hardware-Accelerated Span Blitter: Runs 2× integer scaled (64×64 native to 128×128 screen pixels) using horizontal run-length span rendering (< 0.5 ms blit time on the ESP32-S3 dual-core).
-
Direction-Aware Horizontal Flipping (
flipX): The sprite engine mirrors sprites horizontally in real time, allowing DigiCat to walk left and right and face aircraft without doubling memory footprint. -
10 Complete Animation Sequences:
- Walk Cycle (4 frames): Alternating paws, torso bounce, high tail sway.
- Sitting Idle (4 frames): Biological breathing, natural 140ms blinks, occasional ear twitch.
- Happy Purr (4 frames): Blissful squint smile, blushing rosy cheeks, floating love hearts, and acoustic purr chime.
- Aircraft Tracking (2 frames): Turns towards plane bearing and looks high up at the sky.
- Snack Munching (4 frames): Golden fish cracker on ground, crunching crumbs, licking whiskers clean.
- Sleeping Loaf (4 frames): Curled up loaf pose with slow rhythmic breathing and rising Zzz particles.
- Playful Pounce / Jump (4 frames): Crouch anticipation, parabolic leap (-32 px vertical lift), mid-air flight, cushion landing.
- Face Grooming (4 frames): Paw lifting, licking paw pad, rubbing cheek, face wash over ear.
- Yoga Stretch (2 frames): Downward cat stretch (front low, butt high) followed by tall rainbow arched back.
- Paw Swatting & Overhead Scratching (8 frames): Standing upright on hind legs, reaching paws high and executing alternating vertical paw swipes and scratches at overhead aircraft.
-
Gliding Twin-Engine Jet: When an aircraft is detected in the local airspace via ADS-B/radar, a custom
$28\times14$ pixel art jet (rendered$2\times$ scale at$56\times28$ px) glides across the sky band ($Y = 175..205$ ). -
Dual Contrails & Strobe Beacons: Dual aerodynamic vapor contrails trail the aircraft across the sky with blinking red/green wingtip navigation strobes and a pill badge showing the flight's callsign and distance (
DLH123 · 8km). - Runway Flight Chasing: DigiCat tracks the plane's flight path, turning and sprinting along the runway deck to stay directly beneath it.
-
Paw Swipes & Claw Sparks (
CAT_STATE_SWAT): DigiCat rears up on hind paws and swats up at the jet. At the swipe apex, bright claw scratch sparks appear beneath the plane, accompanied by an avionics chirp as the aircraft performs an evasive altitude hop! -
Touch Interaction: Tapping directly on the overhead jet triggers an evasive jet altitude dash and prompts DigiCat to perform a high leaping pounce (
CAT_STATE_JUMP) to catch it. - Perfect Speech Bubble Centering: Speech bubble typography calculates exact vertical and horizontal bounding boxes, centering dialogues cleanly.
-
Physical Runway Platform: Asphalt deck between
$Y = 342..382$ with dashed yellow centerline markings and perimeter beacon lights (amber on left, cyan on right). -
Dynamic Cast Shadow: Soft feathered oval drop shadow directly under DigiCat's paws. During leaps and jumps (
CAT_STATE_JUMP), the shadow remains on the runway surface, shrinking and fading with altitude for realistic 3D depth. - Surface Weather Reactivity: The runway dynamically reflects weather conditions: dark slate asphalt in fair weather, glossy reflective wet surface with raindrop splash rings during rain, and soft snow dust along the curb during snowfall.
-
Real-Time Weather Synchronization: Directly reads live precipitation alerts from radar nowcasting (
PrecipTracker) and Open-Meteo current condition codes:- Night Sky Stars: 18 glittering stars twinkling across the perimeter sky when night mode is active.
- Rain: 22 slanted rain streaks with angle reacting to device IMU tilt + ground splash ripples.
- Thunderstorms: Fast heavy rain combined with periodic 70ms atmospheric lightning flashes and branching discharge bolts.
- Snowfall: 22 soft snowflakes with sinusoidal wind drift and IMU tilt responsiveness.
-
Weather-Adaptive DigiCat Accessories:
- Rain & Thunderstorms: Bright yellow & red umbrella protecting DigiCat (pitched stand beside him while sleeping with bouncing droplets; held in paw when awake).
-
Snow & Freezing Weather (
$\le 2^\circ\text{C}$ ): Cozy red & cream knit winter scarf with a fluttering tassel tail around DigiCat's neck. - Clear Skies: Retro aviator goggles with cyan tinted lenses and leather strap perched on DigiCat's forehead.
- 2-Minute Night Wake Window: Interacting with DigiCat during night hours (tapping, stroking, feeding, or calling him back) keeps him active and playful for 2 full minutes with full daytime autonomy (patrolling, jumping, stretching, grooming, tracking flights).
- Gradual Sleep Wind-Down: During the last 20 seconds of the wake window without user interaction, DigiCat yawns, stretches, and slows down idle blinking before gently curling into a sleeping loaf with a quiet goodnight purr.
- Morning Wake-Up Stretch: Tapping a sleeping cat triggers a wake-up stretch, chirping purr, and friendly greeting.
- Side-Entrance Animation: Activating the pet screen while awake triggers the smooth side-entrance trot from offscreen.
Unlike static digital pets, DigiCat has autonomous decision-making:
- Multi-Side Entrance: Whenever you swipe up to open the Pet Drawer while awake, DigiCat runs in from either the left or right edge with a fast, energetic trot.
-
Active Life on Screen: Every 6–12 seconds, DigiCat chooses an activity on his own:
- Strolling to a new spot across the airfield deck (
X = 140..340). - Pouncing and leaping into the air after imaginary moths.
- Sitting and washing his face with his paw.
- Stretching his spine and claws with big cat yoga.
- Strolling to a new spot across the airfield deck (
- Airfield Excursions: DigiCat can decide to leave the screen to explore the airfield hangar or chase dragonflies outside. He leaves behind an animated radar pulse and a humorous status note in his speech bubble.
-
Return When Called: Tapping anywhere on the screen, clicking Feed/Pet, or tapping the chassis immediately summons DigiCat back! He rushes in at high speed, chirps happily (
BEEP_PET_CHIRP), and greets you.
- Live HUD Status: Displays real-time Happiness (0–100%), Hunger (0–100%), and XP (flights tracked).
- Interactive Petting: Continuous touch / drag petting creates a springy physical lean towards your finger with floating hearts and gentle purring vibration pulses.
-
Treat Feeding: Double-tap or tap the
[ 🍖 FEED TREAT ]button to feed a crispy fish cracker snack, restoring hunger and happiness. -
Aviation Rank Progression: Tracking overhead aircraft awards XP, promoting DigiCat through ranks:
- Kitten Cadet (Mačací kadet / Kočičí kadet)
- Radar Navigator (Radarový navigátor)
- Airspace Ace (Letecké eso)
- Toggle button in the Remote Control card on the web dashboard to show or hide the DigiCat companion drawer directly from any web browser over Wi-Fi.
- Google Gemini AI Integration: Connect your free Gemini API key to generate witty, live contextual remarks in Slovak, Czech, or English tailored to current overhead flights, weather conditions, and hunger levels.
- 100% Offline Intelligence: Operates fully without internet using a rich built-in library of localized multilingual dialogues.
| Action | Result |
|---|---|
| Swipe Up from Bottom Edge | Opens the full-screen DigiCat Pet Companion Drawer. |
| Tap on Overhead Aircraft | Triggers evasive jet dash & cat jump/swat reaction! |
| Tap anywhere on screen (when away) | Calls DigiCat back from his airfield excursion! |
| Tap on DigiCat / [👋 PET / TALK] | Pets DigiCat (triggers happy jump, blush, hearts, purring chirp). |
| Tap on [🍖 FEED TREAT] | Drops a golden fish cracker for DigiCat to eat. |
| Swipe Down from Top Rim | Closes the Pet Drawer. |
DigiCat visual styling and virtual pet game mechanics are inspired by and credited to aquascape123/digicat under the MIT License.
ESP-MeteoPlaneRadar • Open-source tactical aircraft & weather station for ESP32-S3 • Report an Issue
v2.0.0 | ESP32-S3 Touch Radar