Game with 2 separate windows

I had an idea for a puzzle game, where you would play in 2 separate windows at once, and the windows would need to share actions across them, for example you stand on a button on one screen, and the doors open on the second one. But if you go to another room on one screen, it doesn’t change on the second one. Is something like this possible? Also sorry if english bad, or something i wrote is unclear
Edit: I want to achieve something similiar to here (Spoilers for OneShot)

Well, Unity itself does not support multiple game windows at the same time. Of course you can create your own native window using the windows API, but that’s probably not what you want. The best alternative if you want to use Unity to render both windows is to start your application two times and have each instance display something different. You would need to use inter process communication or network sockets to communicate between the two applications.

Furthermore if you want the background of one of the windows to be transparent you have to utilize quite a bit of native windows api. Here’s a package that may help you out a bit.

Though overall even it’s not super complicated, it’s not trivial either. The game you linked has this as a specific game feature / gimmick. This has countless of potential issues that could break the game. Depending on the windows version and the user’s theme / style certain features may not exist at all or break in one way or the other. So such things would need to be tested on a variety of systems. Also be careful what you’re doing on the user’s PC. The game you mentioned does also manipulate all sorts of system settings like the desktop background image. If you’re not careful and restore the original state, players will be quite upset. So you should know what you’re doing.

You can “simulate” a window inside the game itself. Of course it would not be a seperate OS window but contained inside the gamewindow. However this should be much easier and less error prone. You haven’t been very clear on what you want to use that second window for. You said you have an idea but you mostly described that OneShot game. So do you actually have a concrete idea what you want to use that second window for? Or is it just because this game did it so you want to do the same thing? On of the hardest parts of game development is to have a good game design. I have the feeling you’re stabbing in the dark and only have a very very rough idea what you actually want to do and why.

Your initial description just sounds like a classical split screen game with two characters and each has its own view. This does not require a second “window”. Here’s one of my very old WebGL examples that was about a vis portals implementation, but it featured an “overview window” which was a second camera that was looking straight down. To look around you have to hold down the right mouse button. This is a bit glitchy inside the browser. Anyways I added a button to swap the two views. So you had the FPS view in the tiny window and the overview as the main view.

If you insist in having two seperate OS windows, there’s a lot you have to take into account in order to visually align the content of the two windows like it was done in the OneShot game. Different windows versions and themes have different border and title bar sizes. So in order to match the coordinates you have to jump through several hoops. As I said it’s not super complicated but not really a thing for a beginner.

Hi @ugyasludif

Isn’t it what you want?
Already answered question