Closed dawkot closed 4 years ago
Partly related: https://github.com/godotengine/godot/issues/6642#issuecomment-256655555
@bojidar-bg Note that you can make ... (drumroll) ... another SceneTree! For example, I've done something similar here: https://github.com/KOBUGE-Incubator/multiball/tree/615e0f07c6f30ab7e1d337b512dac1c6761957de/game/menu
Still reproducible/relevant in 3.1 master 3ad9e47 : can't run multiple instances of a project
This is quickly becoming an annoyance here as well. The best workaround I can dream up right now is an editor plugin that calls a shell script that handles starting the server and client instances - but this is clunky
A feature that I would like is some configuration options for a one-click multiplayer project run. Many of these options exist in other engine editors such as Unreal. This would include:
-Setting the number of clients to start on project run -Arguments to pass the server instance and optionally set headless -Arguments to pass client instances
Just had some quick thoughts about it:
Many assumptions of what was thought to be "One" (one instance) may become "Many". I think it would be more natural to get multiple debuggers as processes first (spawnable command line debuggers or multiple editors with automatic port assignment) before we get them to work inside one single editor. Also, multithread debugging would be related, yet different because coming from the same process with shared memory. The only time I saw this was in Visual Studio, where you actually select which thread you are debugging and all the rest follows only that thread, however didnt use it enough to answer all the questions above.
Side note, how I did with another engine: I had some experience in debugging multiplayer games in Unity, which has a very similar problem. Building a server or a client every time was unrealistic due to the time it takes. Since the editor prevents you from opening twice the same project, the easiest approach was to create a symbolic link wrapping all assets, except the import folder. Then I could open two editors, one I could launch a server from, and the other a client. It works well under the assumption that both editors will NEVER step over each other by writing to shared files (such as project settings or other "global" state), which was the case in Unity. And since they have both their own imported data, I can even continue editing the game in this way. The only mess Unity is going to write will be in their own import folder; and meta files was fine as long as only one editor is told to refresh at a time.
I would assume the same could be achieved with Godot, but I am unsure about the overwriting part. One downside of this approach is that engine and tools developers must be aware of this possibility, which is not something many devs realize (there was sometimes plugins generating some random files which did step over each other, making it more difficult to run two editors). Another workaround is to clone the entire project, but it wastes space and it's painful to maintain.
Has work on this started or is there an ETA on it? I'm also developing a net game and having to relaunce godot over and over is very tedious and annoying
@Bombfuse As far as I know, nobody is currently working on this. As a workaround, you could write a script (in pretty much any language) to do this.
Yah I guess I can write a script, would still be an S+ feature imo tho
@Bombfuse Not really a fix but a workaround, but what I do is that I keep the Project Manager open and from there I can press Run on any project and create the server and as many clients as I need.
It would be helpful for developing multiplayer games if it was possible to instantly build and run a number of instances of the game at once to see if networking works correctly.