Closed popedaddy69 closed 4 years ago
Hi @popedaddy69, it's a little complicated to run this, as I don't own the rights to QWOP. However I can give a general guide as to how to set this up:
First you need to download the required assets from foddy.net to load the game through the Athletics.html
folder in this repo. The code there should give you a clue what assets are required.
The next step is to edit QWOP(2).min.js to not have restrictions on domain. The code checks if it is running on foddy.net and doesn't if it isn't, so you have to remove this restriction.
Next you have to add three functions to the game code to connect to the runner on the page:
qwopLoaded()
method call when the game starts.sendGameStats()
method to the update method that fires every framesendEndGameStats(score, time)
call to the end game method.Now the JS is all set up to run QWOP via websockets. Sp you can host a webserver (using python or PHP) and load the file 'Athletics.html' in your browser.
The final step is setting up the python script which will connect to the browser via web-sockets and give commands to the athlete.
To do this:
$ pip install tornado
$ python3 qwop-send.py
Now it should connect to the client in the browser to play QWOP. Update the code in gen.py and qwop-send.py to control how the bot plays.
Hope this helps, and sorry this isn't easier, as mentioned above, as I don't own the rights to QWOP I cannot do this config for you or save it to this repo. Let me know if you need any further instructions.
I'll add some of these instructions to the README too, as well as hopefully uploading a 'gif' demonstrating the use of this bot soon.
This isnt an issue but how do I run the bot?