0 votes

Hey there,

My question is a bit tricky, and will probably need knowledge to poeple who understand really well the engine.

I am currently gathering information to create a C++ Module to create new windows as if they were nodes into the scene tree. I figured out how to spawn new windows and new OpenGL Contexts into those windows, but I could not figure yet how to inject the engine in that new created context. Once that done, I think I could manage to have a dinstinctive view into that new window, but I need that critical link...

Anyone an idea ?

PS: I already looked into the os classes, but I did not really understood what's going on to inject the engine...

in Engine by (16 points)

Maybe spawn another instance of the game and communicate via (localhost) network/multiplayer?

The idea is actually just not that. Because, by doing this, you will really soon be limited by the ressources of the computer as it will have to run a complete game engine multiple times, in addition to a local server. That will completely kill the perf of the computer.

The idea is to create a new window, a new OpenGL Context, and then in that window, run a new Viewport node. Like that, there is actually no other instance of the engine running, and information will be shared faster and easier, and the processor will be less busy. That would allow the game to use more ressources in its graphics, AI, or gameplay.

Your solution is probably the laziest, and the quickest to implement. If someone has a light game and the need for 2 or 3 windows, it would work well. But I am more into performance, and I do not see how to link a new Viewport node into a new window...

1 Answer

0 votes

Hey BlackWave42, I don't know the answer to your question, I just wanted to tell you that they are already planning on implementing multi windows officially until at least 4.0. Nevertheless it would be really cool if you find a solution, good luck.

Link: https://youtu.be/C0szslgA8VY?t=1168

by (864 points)

Thank you for this information. Do you know what is the release date of the 4.0 ? Because, multi-windowed game is actually the last feature I need in order to go on with my game dev...

And I think that I am getting closer... I'll jump into the working of the visual server, and the details of the Viewport class, I think that I could find a way in a few weeks (without the implementation of course). I'll then have to code and test. I will give some updates if requested.

Of what I have heard, 4.0 will need some time to be released. Probably a year or even more.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.