Window nodes in Godot Engine allow developers to create interactive windows on the player's desktop that behave like normal OS windows, enabling games to extend beyond the main game window and interact with the desktop environment; key implementation details include configuring project settings (embed subwindows off, per pixel transparency allowed), using DisplayServer for global mouse position and screen size, and implementing collision detection through a 'secret window' technique where game logic runs in an invisible window while the visible window serves as a projection, with important considerations for scaling to screen fractions and handling window focus behavior.
Deep Dive
Prerequisite Knowledge
- No data available.
Where to go next
- No data available.
Deep Dive
Thinking out of the box, literally with window nodes – Nicolas Perez – GodotCon 2026
Added:So, hello everyone.
Yeah, my name is Niklas Perez. I'm going to talk to you about window notes, how are they are, and how to start using them to make a game.
So, I am just a humble game design student at HKU here in the Netherlands. Couple months ago, I did See my HKU people. Now, a couple months ago I decided to start messing around with window notes, decided to make it everyone else's problem. So, what's a window notes? Let me show you.
Oops, spoilers. This is a window notes.
As you can see, it looks just like a normal window. I can move it around. I can minimize it, maximize it. Behaves the same as normal. You know how a window works.
Now, then in this case I've made kind of a virtual pet with this. I can put this little Kirby here, while I could like work to work here in the middle.
I've also added a couple extra functions to him. Like as you can see, I can drag him around by clicking on the window itself. If I move my mouse away, he falls asleep. I can poke him awake. And I can also summon food that I can feed him to make him dance, you know, got to take good care of him.
So, how do we do this? Let's take a look at the Godot real quick. Now, yeah, he's just going to stay here for the whole time. As you can see, we have a window note right here. Now, if you create a window note on your scene tree, when you open the scene, the window will open automatically. You don't have to add any sort of function or anything else like that. It just opens on its own.
Now, one thing I will point out is you do need to go to the project settings and go to this option over here called embed subwindows. It's on by default.
Turn it off. If you turn it on, the windows that you open will be inside of the main window as a kind of like a subwindow. While we're in the settings, you may as well also go to per pixel transparency and set it to allowed.
That's because you need to do that in order to get this transparent background that I have on Kirby.
Now, if you look on the right here on the inspector, you see some typical stuff. You see position, size, and you also have all these flags. Now, these flags allow you to set the things for your window note. Like you can make it resizable, so I can like change the size of it. I can make it borderless, which looks a lot more immersive and but I would usually recommend.
Can make it so that it's always on top, which is how Cubi is still here despite me clicking on a different window.
And I can make it of course transparent.
Now, a couple more useful things to keep in mind, if you scroll down here, you have a viewport since the window note inherits from viewport.
Over here, you have three options called object picking. They're secretly actually different options, but shh.
And uh you want to enable this one if you want to do anything with clicking on the window. So, you can see if I disable this, I'm clicking on the window right now, it's not doing anything. You need to have this enabled. Finally, if you're used to using pixel art in Godot, you may know that you always have to change the filter to nearest, otherwise it looks so blurry. If you're using window notes, you have to set that per window.
If I reset this, as you can see, Cubi gets all blurry, but now he's nice and crisp.
And now, let's look at the code itself.
Uh it's not really that different from what you would expect from doing this using nodes to these. So, you can see I have an area 2D node on Cubi, and I can use that. I am looking at the wrong code. Spoilers. Now, you can use that in order to, for example, like check when the when the mouse is over Cubi, you can check when I'm clicking on them, etc. For making fall asleep, I just check distance between the mouse position and Cubi's position. A couple important notes on that. You may notice first of all that this is a vector 2I, not a vector 2. That's because uh window positions use integer vectors. So, that's important. You might get conversions errors if you don't remember this.
Secondly, uh the position of a window is its top left corner, not including the taskbar.
This shouldn't be too strange. I don't want to see the news. This shouldn't be too strange considering the fact that if you open a scene in the main window, that is also the case. But just keep in mind that if you want to get the middle of the window, you need to add half the size half the width and half the height.
Finally, you may notice nice little function called get global mouse position. That function is fake. It's wrong. It doesn't get you the global mouse position. It gets you the position of the mouse in respect to the main window. If you want to get the position of the mouse on the screen itself, you need to use display server.get_mouse_position.
Display server is a class for all sorts of functions and things useful for doing things with windows and >> [snorts] >> for example, if we want to get the screen size, you want to use display server as well. If you use get viewport, you'll just get the size of the main window as well. So, that doesn't work.
Now, the rest of it is very basic. Just you know, we check distance to food to make him eat it. There is a point I'd like to go into, which is that although Cubi here has an area 2D and the food also has an area 2D, we can't use those to check for collision between Cubi and the food to make him eat it. That is how I would normally do this if I was making this inside of a window. Like colliders in windows don't collide with other windows. That's one of the main restrictions you're dealing with. You can't for example, also put a rigid body on a window and expect it to actually work. If you put If you do that, it just creates a rigid body in the window that just falls down. I have tried also to make a window node the child of a rigid body. Doesn't work. Very sad.
So, yeah. If you want to have things like for example, windows with collision or windows with physics for a game, you have two options. You can program all that stuff in yourself, which I mean, it's not the most complicated thing in the world. The collision is basically just a bit of geometry, you know, just check the four corners of the window. If you want to do physics, as long as you don't want anything to rotate, it should be fine because window nodes don't rotate.
But, there's also an easier way to do this, which I'm going to show just now.
Now, let me look at my second showcase.
And okay, now it's Let's try that. Yes.
So, over here we have Mario. I've made him green for copyright reasons, but it is Mario. Now, I can uh Now, this is just looks like a standard Mario platformer, but if I walk off, I fall onto the desktop.
Thankfully, it's perfectly fine. I can just run around on the desktop. I can just jump around. Okay, this I can also like move this platform down. And you can see I can jump on it. I can collide with it. It's all fine. I can even uh move this platform down and kind of scoop him up.
And if I move it around, as you can see, Mario also moves with it. It is slightly junky. I will warn that the speed at which the player can move the mouse is much faster than the speed that Godot can move a window node. So, in any situation where player can drag a window around, you can get some slightly junky results like this. Yeah, so keep that in mind.
Also, if I squish him like this, I can If I squish too hard, I will squish him out of bounds.
All right. Let's I can jump into this pipe.
And if I was making this into a full game, I could have like a whole second set of levels. I could have platformers.
In this case, I've locked them up in a box.
Otherwise, I have a little special function to summon some help.
Ah, Well, okay, I guess he's stuck Well, he's stuck in a box for all eternity.
Let's just look at the code.
So, if we switch the scene, you will notice here on the scene tree on the left, we have you have you have Mario, you have the pipe, the star, the different levels, all this stuff we have seen. But what's all of this secret window? Now, if I open it and make it visible, you can see there's all these colliders in there, and there is also a character body 2D. This is the secret of how we're making this work more easily.
You see, when I'm moving Mario here, I'm not actually moving the window that you're seeing on screen. What I'm actually moving is the character body inside of this secret window. You can think of it as kind of like the actual game is happening in this invisible back door.
Well, what we're seeing here is a projection of it. So, we just set uh uh window to be invisible at the start.
Right now, if I make it invisible again, as you can see, it's not even visible here. And even if it's visible, I have set it to be a 2x2 pixels, so there's not much to see about it.
And yeah, it works quite well. Uh you can also have, as you can see, set it some colliders on the in the secret window on the edges of the screen, which is how Mario can't escape.
Uh one thing I will note here is that when you're doing things with window nodes, it's best to work on units of of screen fractions. Like as you can see here, I've set the this collider to be the size of like 1/100 of the screen wide. That's because if you've ever played a very old game for like old monitors in a modern like 4K monitor and seen the UI be like absolute tiny size, you know why this is important. You need to scale things to the window size, to the to the size of the monitor, so that it looks good no matter what machine players are running it in.
Uh yeah. Besides that, I also do a for the platform here, I do a very similar thing where instead I have a collision right here. And whenever I move this window, I just right down here, I move the position of the I move the position of the collision inside of the secret window with it. The way I have Mario stay on it, by the way, is by making it an so I can open it here, an animatable body 2D.
If you disable sync to physics right here, you can have any static body on it move with it. Again, slightly janky, but it works quite well.
Uh yeah, with this secret window method, doing games that use physics and collision is quite easy, actually. It opens up a lot of things from like space shooters to like platformers, things like that. And I would highly recommend that to get started with it. I was very surprised by just how easy window nodes are to work with. Couple of final notes is you might notice that whenever I click here, Mario stays visible on screen while the actual platform goes away. Like a the collision's is there, of course. That's because when you click on a window node, it automatically sets it in focus and puts it at the very front of everything. So, I have Mario set to be always on top while the window isn't because if I set the window to always on top, it would jump in front of Mario and copper Mario. So, that's just something to be aware of. Final thing, click on the X doesn't do anything. If you click on the X on a window node, it triggers a little thing here.
Uh no, it triggers this, close requested. So, you have to actually set the ability to close windows yourself. I think that's Yeah, I'm out of time, so I am going to have to end it here. If you want to see more stuff about window nodes, there's a couple games you can play. You can play Window Kill, which was made in Godot and is a very nice showcase of what you can do with this.
Window Frame is a bit of an older game made in Game Maker that also uses windows in an interesting way. And I've linked a little tutorial there for a person that made a very cool tutorial for you to use window nodes more of as a camera.
Finally, you can see my socials there if you want to see me mess around with windows more over the coming like 6 months. Bye everyone. Thank you for listening.
Related Videos
LBF101 Creating an XML Changelog
liquibase7511
3K views•2026-06-15
Alta Labs Cloud Dashboard Real time Network & Xnet Insights!
ShinyTechThings
158 views•2026-06-17
Wait... Group Policy Not Applying? Check This First!
keeplearning_iT
144 views•2026-06-15
Leetcode Weekly Contest 506 | Life's boring these days
Pudeesht
2K views•2026-06-14
microJAM: MAKING A MICRO GAME FOR A GAME JAM IN CLOJURESCRIPT AND TOTALLY NOT C
janetacarr
156 views•2026-06-18
Partitioning vs Bucketing vs Clustering: How to Make Queries 100x Faster
thedataandaiguy
194 views•2026-06-16
Design Claude Code Like a Senior Engineer
hayk.simonyan
344 views•2026-06-19
Linus Torvalds: AI Won’t Replace Understanding Code
SavvyNik
140 views•2026-06-19











