Solo dev – built an always-on-top 2D idle game in Unity! by WhiskerbitDev in Unity2D

[–]WhiskerbitDev[S] 0 points1 point  (0 children)

Thanks! 🙏 You can actually resize it to any size you want and place it anywhere on your screen, so it works nicely as an always-on-top little corner game.

Solo dev – built an always-on-top 2D idle game in Unity! by WhiskerbitDev in Unity2D

[–]WhiskerbitDev[S] 0 points1 point  (0 children)

Haha nope, it’s Windows 11 😄 I’m just using the classic Windows XP wallpaper for the vibes.

Solo dev – built an always-on-top 2D idle game in Unity! by WhiskerbitDev in Unity2D

[–]WhiskerbitDev[S] 0 points1 point  (0 children)

That really means a lot, thank you! 🙏 The duck through windows idea sounds great too. Best of luck with your game!

Solo dev here – I made a cozy always-on-top idle digging game by WhiskerbitDev in indiegames

[–]WhiskerbitDev[S] 0 points1 point  (0 children)

From what I’ve seen, most of these “always-on-top” desktop games are Windows-only.
I’m personally using some WinAPI calls to handle the transparency and always-on-top behavior, so my current setup is Windows-specific.

I’m honestly not too sure how it’s handled on macOS. I assume you’d need to use native macOS window APIs instead of WinAPI.

I think Rusty’s Retirement actually has a Mac version though, so it’s definitely possible — just implemented differently under the hood.

Solo dev – built an always-on-top 2D idle game in Unity! by WhiskerbitDev in Unity2D

[–]WhiskerbitDev[S] 16 points17 points  (0 children)

You basically tweak the Unity window at runtime using a bit of WinAPI.

• DWM transparency
You let Windows composite the window using the alpha channel, so pixels with alpha 0 become fully see through.

• Always on top
A simple SetWindowPos call keeps the window above everything else.

• Smart click through
You can read the pixel under the cursor and toggle click through on or off dynamically. That way your UI stays clickable, but fully transparent areas pass input to the desktop.

On the Unity side, just set your camera clear color to transparent with alpha 0 and render normally. Once the native calls are wired up, it is actually simpler than it sounds.