<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: pixeguy</title>
    <description>The latest articles on DEV Community by pixeguy (@pixeguy).</description>
    <link>https://dev.to/pixeguy</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4132118%2Fdf9d3707-97da-4274-99d6-14104be0b3ea.png</url>
      <title>DEV Community: pixeguy</title>
      <link>https://dev.to/pixeguy</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/pixeguy"/>
    <language>en</language>
    <item>
      <title>I Built a Spotify Desktop Pet as My First Godot Project, BelPet! Here's how I did it.</title>
      <dc:creator>pixeguy</dc:creator>
      <pubDate>Fri, 18 Sep 2026 22:04:55 +0000</pubDate>
      <link>https://dev.to/pixeguy/i-built-a-spotify-desktop-pet-as-my-first-godot-project-belpet-heres-how-i-did-it-3gfa</link>
      <guid>https://dev.to/pixeguy/i-built-a-spotify-desktop-pet-as-my-first-godot-project-belpet-heres-how-i-did-it-3gfa</guid>
      <description>&lt;p&gt;This was my first time using Godot! (I've been a long time user of unity)&lt;/p&gt;

&lt;p&gt;I probably should've started with something a little more focused on learning Godot itself and exploring what the engine has to offer...&lt;/p&gt;

&lt;p&gt;Instead, I got sidetracked and made &lt;strong&gt;BelPet&lt;/strong&gt;, a small desktop pet that chills on your screen and doubles as a Spotify player :D&lt;/p&gt;

&lt;h1&gt;
  
  
  What is BelPet?
&lt;/h1&gt;

&lt;p&gt;BelPet is a desktop pet built with Godot 4 and C#.&lt;/p&gt;

&lt;p&gt;You can drag Bel around your desktop, and he falls back down and rests above your taskbar. More importantly, he can act as a Spotify playback device.&lt;/p&gt;

&lt;p&gt;From Bel, you can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Play and pause your music&lt;/li&gt;
&lt;li&gt;Skip to the next or previous track&lt;/li&gt;
&lt;li&gt;Seek through the current song&lt;/li&gt;
&lt;li&gt;Scroll over Bel to change the volume&lt;/li&gt;
&lt;li&gt;See the currently playing album artwork&lt;/li&gt;
&lt;li&gt;Drag him around your desktop&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The goal was basically to have a tiny Spotify controller living on my desktop rather than having to constantly open Spotify.&lt;/p&gt;

&lt;h1&gt;
  
  
  My First Time Working With a Public API
&lt;/h1&gt;

&lt;p&gt;This was also my first time building something that communicates with a public API/SDK, which ended up being one of the most interesting parts of the project.&lt;/p&gt;

&lt;p&gt;BelPet uses both the &lt;strong&gt;Spotify Web API&lt;/strong&gt; and &lt;strong&gt;Spotify Web Playback SDK&lt;/strong&gt;, but they serve slightly different purposes.&lt;/p&gt;

&lt;p&gt;When BelPet is the &lt;strong&gt;active&lt;/strong&gt; Spotify playback device, the Web Playback SDK handles the playback itself.&lt;/p&gt;

&lt;p&gt;When another device is active, BelPet can instead poll the Spotify Web API periodically to retrieve information such as the current song, playback progress, volume and playback state.&lt;/p&gt;

&lt;p&gt;This lets the UI stay &lt;strong&gt;synchronized&lt;/strong&gt; even when Spotify is playing somewhere else.&lt;/p&gt;

&lt;h1&gt;
  
  
  Getting the Web Playback SDK Into Godot
&lt;/h1&gt;

&lt;p&gt;One of the more interesting problems was that Spotify's Web Playback SDK is a &lt;strong&gt;JavaScript SDK&lt;/strong&gt; intended to run in a browser.&lt;/p&gt;

&lt;p&gt;My application, obviously, isn't a browser.&lt;/p&gt;

&lt;p&gt;I ended up using &lt;a href="https://github.com/doceazedo/godot_wry" rel="noopener noreferrer"&gt;&lt;strong&gt;godot_wry&lt;/strong&gt;&lt;/a&gt; to embed a WebView inside the application. The WebView runs a small HTML/JavaScript page containing Spotify's Web Playback SDK, while the rest of BelPet runs normally in Godot/C#.&lt;/p&gt;

&lt;p&gt;It was definitely a lot further down the rabbit hole than I expected to go for my first Godot project LOL.&lt;/p&gt;

&lt;h1&gt;
  
  
  Making Godot Behave Like a Desktop Pet
&lt;/h1&gt;

&lt;p&gt;The other fun part was making a Godot game window behave less like a game window and more like something &lt;strong&gt;actually living&lt;/strong&gt; on the desktop.&lt;/p&gt;

&lt;p&gt;BelPet uses a transparent, borderless, always-on-top native window.&lt;/p&gt;

&lt;p&gt;I also added custom mouse passthrough regions so that the transparent parts of the Godot window don't block you from clicking applications underneath it.&lt;/p&gt;

&lt;p&gt;Bel itself remains &lt;strong&gt;clickable and draggable&lt;/strong&gt; while the empty space around him behaves like there isn't a window there at all.&lt;/p&gt;

&lt;p&gt;There's also some simple gravity so when you let go of him, he falls until he reaches the usable bottom of the desktop above the Windows taskbar.&lt;/p&gt;

&lt;p&gt;None of these things were particularly huge individually, but putting them together taught me quite a lot about how Godot interacts with the actual OS rather than just what happens inside the game viewport.&lt;/p&gt;

&lt;h1&gt;
  
  
  Then I Discovered Spotify's Development Restrictions...
&lt;/h1&gt;

&lt;p&gt;Unfortunately, I only realized this when I was already mostly finished with the project 😭&lt;/p&gt;

&lt;p&gt;Spotify places &lt;strong&gt;restrictions&lt;/strong&gt; on applications running in Development Mode.&lt;/p&gt;

&lt;p&gt;BelPet works normally when BelPet itself is selected as the &lt;strong&gt;active&lt;/strong&gt; Spotify playback device.&lt;/p&gt;

&lt;p&gt;I had also built BelPet to monitor and control Spotify while another device — such as your phone or desktop Spotify client — is the active player. &lt;strong&gt;However&lt;/strong&gt;, that functionality relies on Spotify's Web API, and accounts need to be authorized for my development application.&lt;/p&gt;

&lt;p&gt;Obviously, manually adding everyone who downloads a random GitHub project isn't really practical.&lt;/p&gt;

&lt;p&gt;There is a workaround: you can create your own Spotify developer application, put &lt;strong&gt;your own Client ID&lt;/strong&gt; into BelPet and build it yourself.&lt;/p&gt;

&lt;p&gt;Also, Spotify Premium is &lt;strong&gt;required&lt;/strong&gt; for BelPet.&lt;/p&gt;

&lt;p&gt;Because of these restrictions, I've decided not to develop the project much further for now.&lt;/p&gt;

&lt;h1&gt;
  
  
  What I Originally Wanted to Add
&lt;/h1&gt;

&lt;p&gt;I actually had more planned.&lt;/p&gt;

&lt;p&gt;One of the larger features I wanted was an &lt;strong&gt;album catalogue&lt;/strong&gt; built directly into BelPet.&lt;/p&gt;

&lt;p&gt;Instead of Bel only controlling whatever you're already listening to, you'd be able to browse your albums/playlists and start music without opening Spotify at all.&lt;/p&gt;

&lt;p&gt;There were also plenty of smaller things I could've done to make Bel feel more like an actual desktop companion rather than primarily a Spotify controller.&lt;/p&gt;

&lt;p&gt;But considering the API limitations, I think this is a decent stopping point for the project.&lt;/p&gt;

&lt;p&gt;What I Learned&lt;/p&gt;

&lt;p&gt;Despite getting very sidetracked from my original goal of simply "learn Godot", I'm pretty happy that I did.&lt;/p&gt;

&lt;p&gt;This one small project ended up exposing me to:&lt;/p&gt;

&lt;p&gt;Godot 4 with C#&lt;br&gt;
Communicating with REST APIs&lt;br&gt;
OAuth authentication&lt;br&gt;
Spotify's Web API&lt;br&gt;
Spotify's Web Playback SDK&lt;br&gt;
Communication between C# and a browser-based SDK&lt;br&gt;
Embedding a WebView in Godot&lt;br&gt;
Native window manipulation&lt;br&gt;
Mouse passthrough&lt;br&gt;
Packaging all of this into an actual desktop application&lt;/p&gt;

&lt;p&gt;So... maybe not the most sensible first Godot project, but definitely a fun one :D&lt;/p&gt;

&lt;p&gt;The project is completely open source under the MIT License if anyone wants to look through it, mess around with it, or build upon it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/pixeguy/BelPet" rel="noopener noreferrer"&gt;Github Repo&lt;/a&gt;&lt;/p&gt;

</description>
      <category>gamedev</category>
      <category>godot</category>
      <category>opensource</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
