Background is still not transparent.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By NeFurka

Background is still not transparent, but the boot splash really disappeared.
Imgur

:bust_in_silhouette: Reply From: Yuminous

Transparency might still be disabled? In your scripts _ready() function, try putting:
get_tree().get_root().set_transparent_background(true)

And make sure that your WorldEnvironment background color has an Alpha of 0.
WorldEnvironment > Ambient Light > Color → # 00000000

Thnx, it’s works, but, there is also the questions:

  • Of whether it is possible to pass inputs to the desktop, for example, if the cursor is on a button, then the input goes into the game, and if it does not touch any object, the input goes to the desktop;
  • Or, the game will be behind the desktop and all inputs will be sent to it only when nothing already covers it.

NeFurka | 2021-07-15 14:27

Of whether it is possible to pass inputs to the desktop

In its basic form, due to the nature of the computer OS, there is no way the mouse cursor input can pass through the game window on to the desktop.

So, what you would need for this is multiple game windows. Godot unfortunately doesn’t support this for now…

But I think you can make your game — it is just much more complex.

Basically my idea is that: you would need to make multiple “games” that all serve as buttons etc. for the main ‘game’ that you are trying to make (this is just so you could separate them from each other).

They would communicate to each other through files in the filesystem that contain various data (maybe they are constantly reloading the same text files from the other games, looking for any changes and if they see a change they will act themselves).

See this for more details on files:
https://docs.godotengine.org/en/stable/classes/class_file.html

This would allow you to have desktop-clickable space between the game elements, because the user is not clicking on any game windows.
I think that’s probably (one of) the only ways to do it for right now.

inputs will be sent to it only when nothing already covers it

This is hard as well, again due to the nature of every Operating System. It’s possible to make a program window “Always On Top” but not “Always On Bottom”. You can detect when the window loses or gains focus (the user clicks away or clicks o the window, respectively), there’s also various other Window Management detections, but whether you can do anything useful for them with what you want is debatable.

In general it’s hard (impossible) to prevent a user from forcing the system to gain focus on a window if they really want to. Is there much benefit to preventing this from happening?

A further note regarding Windows, if the user wants to play your desktop game (which would seem to be like a Vista widget), they would likely want to press the Show Desktop button (lower-right). This would force your game to minimize (and the Desktop window to become focused), so you would have to consider this aspect as well.

Note that it is possible to work around all of the above issues if you write a system-specific application (using Visual Studio or something like that), and it may potentially be faster or more efficient than attempting to make such an application with Godot.

And thinking about a hybrid may be able to combine a game system you’ve created with Godot and a window management program you created with some other software. But I have no experience with any of that so I wouldn’t be able to point you in any direction to make a start.
It’s just food for thought.

Hope it helps!

Yuminous | 2021-07-15 15:16

Thanks for the help and idea, I’ll go and think what I can do.

NeFurka | 2021-07-15 15:42