-
Notifications
You must be signed in to change notification settings - Fork 37
Starting battle on LAN Websocket address #96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@electricSoda Thank you for reporting this as a bug and providing really good information for how to reproduce the issue you see. 😊👌 I will have a look into this issue. |
I reproduced the problem 👍 So I will figure out how to fix that @electricSoda When you start a local server, it will start up at localhost:, not the address(es) specified with the 'Select Server' dialog. This dialog is mainly meant for which server the GUI will connect to, which could be an external server or local server. It might even run from a Docker container or Linux shell within Windows. That said, I believe the local IP address and |
Sounds good 👍 |
…ack and localhost IP addresses.
@electricSoda I just released 0.24.1 with fixes for this issue. I should like you to try out, if it works for you as well. ❓ Also notice, that I updated the check when entering/adding a new URL, so you don't need to do this manually via a text editor. 😉 |
Still doesn't work :(. If I select a LAN server like |
@electricSoda If I get you right, the main issue is that the GUI automatically starts up a server locally on the default (Robocode) port 7654. That is at ws://localhost:7654, where local IP addresses like e.g. 192.168.1.28 will work too, but only if you use the same port, i.e. ws://192.168.1.28:7654. The Select Server dialog only lets you select any server including your own (local server). And you can hit the Test button to check if the server is up and running. Note that this is useful, if you are trying to reach an external server outside your system, or if you have multiple servers running, e.g. started an independent server in the background on another port than 7654, e.g. 3000. Then, when you add the server URL ws://192.168.1.28:3000 and try to start a battle nothing happens! Which is what this issue is about. To fix this issue, I have some proposals I will start working on. If you have other suggestions, make sure to add those to this thread.
|
Hi Said so...I think I can reproduce the same issue with a single machine and without using the official GUI. I'm not 100% sure if this is exactly the same problem, as far as I understand the reported bug states that starting the server using the lan ip, for example 192.168.xxx.yyy, instead of the "localhost" or "127.0.0.1" the match doesn't start. I'm going to use my alternative GUI project, so maybe I can easily see more some details than @electricSoda.
Server output at point 5Messages sent and received by the controller at point 5Green arrow are the messages sent from Controller to Server, red arrows the messages received from the Server. Now repeating the point 1 to 5 but reverting the server ip as 127.0.0.1 Server output at point 5Messages sent and received by the controller at point 5What I observe is that when using the lan address instead of localhost or 127.0.0.1 the server is able to make Controllers and bots join correctly but as soon as the game starts the server is unable to communicate correctly with them, in particular I see that the bots are not receiving the "game-started-event-for-bot" and so the bots can't respond with a "bot-ready". It's the same issue I've reported in #97 but in that case the problem was related to my machine, if I use "localhost", it is translated in ip V6 "::1" instead of "127.0.0.1", and the bots could join but could not receive the "game-started-event-for-bot", as in this open issue. Are you maybe switching the messaging system from direct to broadcast? Could be here that there's a translation issue of addresses? |
…dow was opened when starting a battle. Now an error message will show up plus the dialog for selecting a (local) server.
@electricSoda I have just release version 0.24.4 which now shows an error message if a remote server is being used for starting the battles. Currently, only local server battles are supported. |
@electricSoda I am closing the issue now. Please re-open it, if the original issue is still present or create a new issue. |
The bug
When you start a Robocode Tank Royale server from the GUI on any LAN Websocket address, boot up bots to connect to the server through the command line (e.g.
java -cp ../lib/* AvoidWall.java
), and then try and start up a match between these bots through the GUI, the match doesn't start.To Reproduce
Go to the
server.properties
file and add your computer's LAN address converted to a websocket address (e.g.ws://192.168.1.20:3000
) to theserver-urls
propertySelect the the IP address from Server > Select Server from the GUI
Start up a server on this new websocket address through the GUI (Server > Start Server)
On a separate computer (or on the same computer), change the SERVER_URL environment variable (by doing
set SERVER_URL=<url>
) to the same websocket address you did in theserver.properties
fileAlso make sure to configure the secret for the bots by doing
set SERVER_SECRET=<secret>
; you can find the bots-secrets in theserver.properties
fileThen go in command prompt or terminal and then boot up a bot e.g.
java -cp ../lib/* Corners.java
It should show that it's connected on the battle menu thingy on the GUI (in the Joined Bots (local/remote))
Add that remote bot for battle
Boot up another bot from a local directory through the GUI (not from command line)
Click start battle
You will see that the pop up for selecting bots disappears like it's going to start a match, but then nothing shows up on the main screen (the battle interface doesn't show up)
Desktop (please complete the following information):
Java info:
The text was updated successfully, but these errors were encountered: