You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am working on a multiplayer 2D game using low level UDP with GDScript
Describe the problem or limitation you are having in your project
To test client and server interaction I need to export the project as an executable file and then I can launch it. It takes much more time to test when you need to build and then open .exe via file explorer.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Add one-click client and server launch button. Developer needs to be able to see if a game instance is a server or a client after it is built to setup game as it is supposed to be from code.
One click will launch both client and server, and the game instances will understand their roles using some global variables set different for each instance
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Add global variables - IS_SERVER and IS_CLIENT (for example, better with OOP practices of course) and make possible to launch two game instances at one click with these variables different.
Developer code:
launch.tscn
func _ready():
if IS_SERVER:
# starting the server or opening server startup menu
elif IS_CLIENT:
# open client menu / join the server / anything else
If this enhancement will not be used often, can it be worked around with a few lines of script?
You can use .bat script to run 2 instances of built exe file and maybe pass different cli args to them for them to know which one is server and which one is client
Is there a reason why this should be core and not an add-on in the asset library?
Because it is associated with development of almost all multiplayer games and its a useful testing instrument which can save a lot of time
The text was updated successfully, but these errors were encountered:
This is already partially implemented in 4.x via the ability to launch multiple instances from the editor. However, there's no way to specify different CLI arguments for each instance yet: #522
Describe the project you are working on
I am working on a multiplayer 2D game using low level UDP with GDScript
Describe the problem or limitation you are having in your project
To test client and server interaction I need to export the project as an executable file and then I can launch it. It takes much more time to test when you need to build and then open .exe via file explorer.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Add one-click client and server launch button. Developer needs to be able to see if a game instance is a server or a client after it is built to setup game as it is supposed to be from code.
One click will launch both client and server, and the game instances will understand their roles using some global variables set different for each instance
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Add global variables - IS_SERVER and IS_CLIENT (for example, better with OOP practices of course) and make possible to launch two game instances at one click with these variables different.
Developer code:
launch.tscn
If this enhancement will not be used often, can it be worked around with a few lines of script?
You can use .bat script to run 2 instances of built exe file and maybe pass different cli args to them for them to know which one is server and which one is client
Is there a reason why this should be core and not an add-on in the asset library?
Because it is associated with development of almost all multiplayer games and its a useful testing instrument which can save a lot of time
The text was updated successfully, but these errors were encountered: