I’ve been curious about this too after the very successful Rusty’s Retirement from earlier this year (there’s also the Desktopia from 2022).
There are a few issues to find solutions for. This is on Windows, and I haven’t tested any of it:
- Always keep the window on top, even when it doesn’t have focus. Either set this on window creation or with
SetWindowPos
passing argumentHWND_TOPMOST
. Of course, there’s nothing preventing another app from, at a later point, placing itself “always on top” over your game (see this Microsoft devblog article). - Don’t draw the window’s title bar or border. Either set this on window creation (via style) or by changing the window’s style with
SetWindowLong
orSetWindowLongPtr
after the fact (I’m not sure which one is the correct way of doing it). - If the window should have transparency, like Whimside and Rusty’s Retirement does by having trees and whatnot poke up and out of the play area, configure the window appropriately. According to this Stack Overflow answer, you can configure the OpenGL context to have an alpha channel, which will produce the desired result (other answers in the SO thread may also be of interest). Presumably, Vulcan allows you to do something similar.
- If you have transparency and you want mouse clicks to “fall through” any transparent pixels of the window to apps below, configure the window appropriately. I didn’t find info on how to do this. I would guess that it’s possible somehow.
Depending on how far you want to go, you may need to modify and compile Defold yourself in order to tweak window creation, OpenGL context creation, and window message processing. I would buy Rusty’s Retirement, play around with it and test how it handles the above, e.g. does its window let through clicks on transparent pixels.