绪心桌宠 v1.4.0
Xuxin Desktop Pet v1.4.0
安卓悬浮窗上的程序化桌宠 · 三套角色全靠代码逐像素画出来(2026-10-31 更新)
A procedurally drawn desktop pet for Android — three characters painted pixel by pixel in code (updated 2026-10-31)
软件介绍
About
绪心桌宠是一款跑在安卓手机上的桌宠:像电脑桌宠那样悬浮在桌面最上层,随时陪着你。它不依赖 Live2D、也不加载任何 3D 模型——三套角色(初音未来 / 洛天依 / 乐正绫)全部由 Canvas 程序化建模 + 骨骼动画逐像素绘制,随包只有一个 APK,约 3.6 MB(R8 混淆 + 资源收缩)。
角色都按 3 头身 Q 版建模:蛋形头、发丝分层高光、渐变眼珠、腮红、小手小鞋,初音的面部还做了透明挖空,悬浮在桌面上时直接透出壁纸。骨骼层级写成显式状态机 —— 待机时呼吸起伏、漂浮与眨眼,行走时双腿交替迈步并反向摆臂、朝向随移动翻转,被拎起时悬垂摆动,开心与困倦则由心情 / 饱食度状态驱动。
陪伴系统是它和「一张会动的图」的区别:点击与投喂都有气泡和语音反馈(系统离线 TTS,没有引擎时静默降级为气泡),双击触发爱心爆发与弹跳,启动时按早 / 午 / 晚 / 深夜问候;心情与饱食度会随互动提升、闲置衰减并存进本地;久坐与喝水提醒走独立的高优先级通知通道(响铃 + 震动),点通知直达主界面;今日陪伴时长、互动次数与投喂次数跨重启累计,桌面小组件上也能看到。
最新版本 V1.4.0 是一次纯优化迭代,不改造型,专治三个真问题:长时间挂机的耗电(动画出帧上限 60fps,高刷屏不再按 120Hz 全速重绘,熄屏或窗口不可见时暂停自刷新)、今日陪伴时长恒为 0(统计入口此前没有调用方,现在由前台服务按分钟批量累加)、以及久坐 / 喝水提醒不响(此前复用常驻通知的低优先级通道,现在独立通道 + 震动 + 角标)。
说明:初音未来 / 洛天依 / 乐正绫为他人版权角色,本项目仅作个人学习与练习用途;仓库暂未提供预编译 APK,按 README 用 Android Studio / Gradle 自行构建即可(compileSdk 34、minSdk 24)。
Xuxin Desktop Pet is a desktop pet that lives on an Android phone: it floats above the home screen, the way a PC desktop pet would. It uses no Live2D and loads no 3D models — all three characters (Hatsune Miku, Luo Tianyi and Yue Zhengling) are painted pixel by pixel with Canvas procedural modelling plus skeleton animation, shipped as a single ~3.6 MB APK (R8 shrinking and resource reduction).
Each character is modelled in a 3-head-tall chibi style: egg-shaped head, layered hair highlights, gradient irises, blush, little hands and shoes — and Miku's face is cut out transparent so the wallpaper shows straight through. The skeleton runs an explicit state machine: breathing, floating and blinking while idle; alternating legs, counter-swinging arms and a direction-aware flip while walking; dangling when picked up; and happy or sleepy expressions driven by the mood and hunger systems.
The companionship layer is what separates it from an animated picture: taps and feeding produce both a bubble and speech (the system's offline TTS, degrading silently to bubbles when no engine exists), a double tap triggers a heart burst and a bounce, and startup greets you by time of day. Mood and hunger rise with interaction and decay while idle, persisted locally. Sit and water reminders use their own high-priority notification channel (sound plus vibration) that opens the main screen when tapped, and today's companionship time, interactions and feedings accumulate across restarts — visible on the home-screen widget too.
The latest release, V1.4.0, is a pure optimisation pass with no character changes, aimed at three real problems: battery drain during long sessions (a 60 fps frame cap so 120 Hz screens stop redrawing at full speed, and self-refresh paused when the screen is off or the window is hidden), companionship time stuck at zero (the counter had no caller; the foreground service now accumulates it by the minute) and reminders that never rang (they reused the low-importance persistent channel; they now have their own channel with vibration and a badge).
Note: Miku, Luo Tianyi and Yue Zhengling are characters owned by others, and this project is for personal study and practice only. The repository does not ship a prebuilt APK — build it with Android Studio / Gradle as described in the README (compileSdk 34, minSdk 24).
功能特性
Features
项目档案
Project Details
PetCharacterView / AnimeGirlView)、前台服务、AppWidget、离线 TTSPetCharacterView / AnimeGirlView), a foreground service, AppWidget and offline TTSgradlew.bat assembleRelease 出正式签名包(需按 keystore/README.md 配置密钥),gradlew test 跑状态机单测gradlew.bat assembleRelease produces a signed build (configure keys per keystore/README.md), gradlew test runs the state-machine tests