Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

I Built a Spotify Desktop Pet as My First Godot Project, BelPet! Here's how I did it.

说明与用途

BelPet 是一个透明、始终置顶的桌面宠物,使用 Godot 4 构建,可作为 Spotify 控制器,支持播放、暂停、跳转、音量调节和专辑封面显示。项目通过 WebView 集成 Spotify Web Playback SDK,并使用 Web API 同步播放状态,需 Spotify Premium 账号和自定义 Client ID。

问题

Create a lightweight desktop pet that also serves as a Spotify controller without constantly opening Spotify.

结果

BelPet provides a convenient desktop Spotify controller with drag‑and‑drop pet animation, synchronized playback, and album art display, all built in Godot 4 with C# and a WebView.

工作流

  • 1. Set up Godot 4 project with C#.
  • 2. Create transparent, borderless, always‑on‑top window and mouse‑passthrough regions.
  • 3. Add simple gravity to let the pet fall to the taskbar area.
  • 4. Integrate Spotify Web Playback SDK via a WebView using godot_wry.
  • 5. Use Spotify Web API to poll playback state when another device is active.
  • 6. Implement UI controls: play/pause, next/prev, seek, volume via hover, album art display.
  • 7. Package the application for desktop distribution.
  • 8. Test functionality with Spotify Premium account and active device.
  • 9. Publish source on GitHub under MIT license.

证据

BelPet uses both the Spotify Web API and Spotify Web Playback SDK, but they serve slightly different purposes.

来源

I ended up using godot_wry to embed a WebView inside the application.

来源

BelPet works normally when BelPet itself is selected as the active Spotify playback device.

来源

  • 记录日期: 2026-09-21T21:00:15.288Z