Game that sits at the bottom of your screen

Hey, guys! This game sits at the bottom of your screen:

image

The idea seemed interesting to me. Is it possible to do something like this in Defold?

1 Like

I’m pretty sure you can control window position and size with the DefOS Extension. You can use it to disable window resizing and. minimizing/maximizing. I do not know if it can take away the top window bar though

2 Likes

I think you can. And if you can’t it should be relatively simple to achieve.

1 Like

I notice that the game is actually full screen, menus are pop-up at the center of the screen, so you’ll need a transparent full screen window(and somehow bypass the mouse events) which is might be little bit difficult to achieve.

5 Likes

I understood.

The most interesting thing about this idea is that the person can work on other things while the game is happening on one part of the screen.

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 argument HWND_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 or SetWindowLongPtr 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.

4 Likes

This reminds me 25 years ago, when it was the age of windows tools and softwares having liberty shapes doing animations on desktop

2 Likes

Yeah, I remember the 90s aesthetic being all over Winamp skins. Still had this green guy somewhere deep down in my memories.

7 Likes

topic is interesting! for the transparency part, where the trees and roofs of the houses blend with the desktop, i would consider taking the screenshot of the desktop (assuming it does not change) and then use it as a texture, and draw the sprites on top of that. This to avoid all the problems with real transparency with the desktop. but never really tried it, just a thought

1 Like

In the early 2000’s I had made a game system emulator application for my nephew’s and nieces. The buttons on the graphic all do things like load and launch the emulators and close the window etc. Clicking in a transparent area would send the input event to any application below the window form. I remember I had used Form.TransparencyKey Property (System.Windows.Forms) | Microsoft Learn for this effect and the key color was defined using a texture, same texture as the images shows except the transparent area key color was set as magenta so that I could use blacks . Not sure how its done on windows 10+ and or any other OS but I’m sure its something similar.

4 Likes
2 Likes