Closed haopan27 closed 5 years ago
In the mean time, I've switched to a more powerful machine to run everything on it (the server, the 1st client and the 2nd client on a VM). Still the same problem persists. I am using Hyper-V Manager which is included in Windows 10 Pro. Inside its Virtual Switch Manager, I selected the Default Switch (Default Network), since this seems to be the only option to enable my VM to have internet connection (I've tried both the External and Internal connection types but to no avail). From what I read, Starcraft UDP connection requires internet connection so that the host can cast the games onto the internet and then they can be found by other computers. Anyway, it would be helpful if someone can share the details of how they set up the VM.
My really simple testing setup is to have the server on the host machine and two clients both in VMs using VirtualBox, with the network mode set to Host-only Adapter (one client on the host machine shouldn't be a problem though). For one physical machine that works fine, but I think if you have multiple physical machines the Host-only Adapter doesn't allow the Starcraft clients on different machines to connect with each other, so we use a different setup (Bridged Adapter I think). I haven't used Hyper-V so I don't know what the equivalent settings are.
I'm not sure if the crashes would be caused by that, but you can test the network setup by just running Starcraft manually on both machines and trying to start/connect to a game.
Thanks, Richard. I was just about to post that test result (I did it before seeing your post : D ): It was successful. I was still using my old setup: 1 client using the host machine and 1 client using the VM. I started a game instance on each and tried to connect the two via UDP. The two were able to find each other and the game ran fine.
I'll try tweaking the network mode in Hyper-V and perhaps setting up 2 VMs, although I am not sure if it is still necessary to do so, given the test result?
I am still using one machine, but now having it to run the server and two clients on 2 VMs.
Following your suggestion, I used the Host-only Adapter option (yes, it is also available in Hyper-V). Unfortunately the client in VM couldn't even connect to the server.
So I reverted back to use the Default Switch in Hyper-V. The two clients were able to connect to the server, and were able to start an instance of Starcraft, but the game hangs on the initial screen where the game mode (single-player, multi-plater, etc.) is chosen. I am not sure if the aforementioned VM setup-related issue is resolved. If no, let's continue working on it; else if yes, I have the following two questions.
1) I suspect this game-hanging-on-the-initial-screen behavior might have something to do with the injection, since I've encountered the very same problem when using ChaosLauncher and when its Config file for BWAPI 4.1.2 Injector [Release] was not set up properly (for example, auto_menu = OFF). Is this what's causing the problem, or is there other things we should look into?
2) I then manually set up a game (by clicking multiplayer, UDP, etc) for two bots, the game starts, but was not able to find the .dll files. I am attaching a picture here showing the messages. I've config'd the ChaosLauncher and set the AI module paths to the appropriate server/bots/BotName/AI/ folders. ChaosLauncher was able to inject the two .dll files and the game ran fine. I wonder if anybody could help me to understand why the .dll files weren't located when using VM game clients?
Yes, I agree that it probably isn't a network issue. The TM client should be writing to "your_starcraft_dir/bwapi-data/bwapi.ini" with the correct settings, including the path to the AI .dll. After the TM attempts and fails to start a game, have a look at the bwapi.ini file on each VM. They should have the AI dll path, and that should have been copied correctly to that location, and the game name should be the name of the hosting bot. Check that your TM client settings are correct (ClientStarcraftDir).
Richard: I assumed you meant Tournament Management when you typed 'TM' in your previous message, and that 'TM client' and 'VM client' are equivalent.
I checked the "your_starcraft_dir/bwapi-data/bwapi.ini" path you mentioned, to my surprise, there is no such "your_starcraft_dir/bwapi-data/' folder either on one of my VMs, or on the server-side machine. This is possibly caused by some cleaning operation (for example, Client_CleanStarcraftDirectory( ) ).
I added the folder to the VM that didn't have it. The games were still not started automatically, so as before, I set up a game manually, it crashed immediately after the initial game scene (a command center with 4 SCVs).
Here are the two bwapi.ini files, and they looked fine to me. bwapi_VM1.txt bwapi_VM2.txt
My server settings file if it helps: server_settings_txt.txt
Edit: I was wrong saying "one of the VMs didn't have the folder". It actually had the folder when the client was running and the game was launched, and I guess the folder was deleted when the client was closed. And the crash didn't happen for the second time (this probably means I shouldn't manually add folder there). But anyway, I guess we should move on to analyze:
Are you able to start a game manually with your current setup? Try putting a bot dll on each machine, and seeing if you can start the games manually (clicking the menus without the TM software).
If you can not start a game manually and have the bots play against each other, then there is an issue with your client machine not being set up properly. Dozens of people have used the TM software since the last update without issues, so I can assure you it works. Sounds like you skipped a step somewhere with setting up BWAPI, or a folder name, etc, on the client machines.
Dave: I think the answer is partially yes. In a comment of mine 3 days ago, I mentioned: "I then manually set up a game (by clicking multiplayer, UDP, etc) for two bots, the game starts, but was not able to find the .dll files. "
So I was able to start a game manually, unless you're talking about another way to set up the game? Although the experiment wasn't fully successful as the .dll files were not found.
I'll double check everything else in the mean time though.
I tried to use one machine to run both server/run_server.bat and client/run_client.bat, and a second machine to start a client. The server was able recognize it, alongside the client created on the machine which started the server. The server tried to start a game, one client (non-server side) then launched an instance of the Starcraft game, and the game crashed/was terminated after seeing the scene where the game lets you to choose which connection type (Battle.net, UDP, etc.). The other client (server side) also launched the game, and was stuck at the scene where the game lets you to choose game mode (single player, multiplayer, etc.). I wonder if the UDP connection (supposedly the type to use here) is not set up properly, or was this caused by something else?