Starcraft freezes on start #299
Comments
Hello. A few questions to round down what might be happening:
|
|
To confirm: Are you using StarCraft version 1.16.1? |
Yes, I was able to run Starcraft with bwapi before I did the Torchcraft changes. |
Am I supposed to change both ai = BWEnv.dll or just the "ai = BWEnv.dll" part? Since that's the only part I changed into "ai = " |
Setting up the TorchCraft bot shouldn't impact how BWAPI functions in any way -- it should just be another bot that you inject with BWAPI. So another good diagnostic test would be verifying that you can still load other BWAPI 4.2.0 bots (like this one).
So you only need to think about the |
I will look into it, will start over and see if I can get it to work. |
I think this happens most often when you set up the server correctly (BWEnv is the server) but did not run the client correctly (for example, from python). Running https://github.com/TorchCraft/TorchCraft/blob/master/examples/py/example.py for example should unfreeze the game. |
I did some testing and replaced the BWEnv.dll with the old dll I had. Now for some reason it works and dosn't freeze or crash. It runs some marine micro scenario I believe. Although the dll that its loading dosn't have anything to do with marine micro. So in conclusion it only freezes when im using the BWEnv.dll |
I haven't actually gotten to the part "Developing the TorchCraft Server:" yet. Was doing the "TorchCraft AIModule (DLL) for users:" and since the last * said " Click Start." I assumed it would be possible to run without freezing. So im assuming that the "Developing the TorchCraft Server" step needs to be completed before the game can be started? |
Ah, yes. The bot module (BWEnv) is waiting for a TorchCraft server to connect, and will wait until it does, which freezes StarCraft. If you experience the freezing only when using BWEnv.dll (and not other bots), and when not using a TorchCraft server, that indicates everything is working correctly. |
Ah I see, makes sense then. The steps in the setup are a bit confusing then since the "TorchCraft AIModule (DLL) for users:" says "Click Start" which made me assume the game would run without problems. |
That's a good point. I've opened #300 to make the documentation clearer on that point. Thank you for the feedback! |
Have followed the steps in "Developing the TorchCraft Server:". However, the game is still freezing. Unsure if I have done something incorrectly, im assuming that after I have recieved the BWEnv.dll file I am supposed to put it in the Starcraft folder. Even after doing that the game still freezes, am I missing something that I am supposed to do? I am assuming I am not supposed to do the step "Installing the Torch client (Linux)" since I am not on Linux. Is it possible that the issue is that BWAPI is located inside a seperate folder and not inside the actual Starcraft folder? Or possibly that I am required to install the Torch client? |
You are suppose to run the client. Try running https://github.com/TorchCraft/TorchCraft/blob/master/examples/py/example.py after you get to the freeze. If you do it correctly, your starting workers will execute attack-closest (meaning they won't move until an enemy is in vision) |
I feel like you can install it on Windows, but we recommend using a Linux VM. |
Im assuming this requires installing Pytorch? |
No it doesn't actually. It's a bit of a misnomer now, we've actually removed all torch dependencies. |
I'm actually trying to run the lua example. Using a community windows build of torch https://github.com/hiili/WindowsTorch Having some issues setting up the server though. |
I would like to avoid Linux VM if possible. Kinda struggling to get the lua and python examples to work at the moment. |
Not sure if I followed the instructions incorrectly. I did the copy of common prerequisites and followed the AIModule part.
However when Starcraft launches it freezes as soon as it enters the game/match.
I may have done the common prerequisites incorrect since I was unsure about what the last two steps meant.
For "Copy $STARCRAFT/TorchCraft/BWEnv/bin/*.dll into $STARCRAFT/." I was unable to find any BWEnv map so I just went in to the bin map and copied the 1 dll file into the Starcraft map.
For "Copy $STARCRAFT/TorchCraft/maps/* into $STARCRAFT/Maps/BroodWar." I copied both the folders inside the maps folder into the Maps/BroodWar folder.
Did I make a mistake somewhere? Or is it supposed to freeze when it gets into the game?
The text was updated successfully, but these errors were encountered: