Multiplayer helper Chrome extension

I have created a simple Chrome extension here:

This extension adds two functions to the IDE in multiplayer games. The first is based on a request @Bob_ made a while back:

My extension adds a SWAP “button” beside the agent selection.

The second function is something that I’ve been wanting for a while now. The extension puts a new PLAY_100 “button” on the IDE that will launch 100 matches (clicks the Play button 100 times) and record the results. The number of iterations is configurable in the extension options screen.

For now, the results of the PLAY_100 option are only available by viewing the JS browser console.

I have also created a Greasemonkey / Tampermonkey version of the script, found here:

https://greasyfork.org/en/scripts/22182-cg-multiplayer-helper

This has the advantage of running in both Chrome and Firefox, but unfortunately, it somehow messes up the WebGL display of the matches. Not sure what the problem is.

This is all very rough stuff. Use at your own risk! :slight_smile: Comments welcome.

  • danBhentschel

KNOWN BUG: When clicking SWAP, the search bar sometimes doesn’t accept an automated Enter keypress. If it looks like SWAP is stuck searching for a user, just press Enter on your keyboard and the SWAP operation will continue.

3 Likes

Umm… Actually I guess I jumped the gun a bit with my post. The 0.0.2 version of the extension is still “Publishing in progress”, and is not publicly visible. Hopefully it will be soon. The 0.0.1 version is fully functional, except it doesn’t have an options screen to edit number of iterations. It’s hardcoded at 100.

  • danBhentschel
1 Like

Oh… A little quirk I forgot to mention: when you first enter the IDE, the extension won’t recognize the URL as an IDE, and won’t do anything (routing, AngularJS, SPA, yadda, yadda). You need to refresh the IDE for the new “buttons” to appear.

  • danBhentschel
1 Like

Hey !

Good job ! Really nice and useful little extension !
Installed and tested, everything works perfectly.

Small comment : 100 plays is a lot, I just tried on codebusters and it takes forever, so I stopped. I think it’ll be the same for most games, maybe set the default to 10/25.

Hmmm didn’t pay attention closely enough to the results … Are we getting the score of every play or the number of victories on each side ?

Currently, it’s number of victories on each side. And I just realized it doesn’t handle ties properly. I should add some logic around that.

  • danBhentschel

Other things I’m considering doing with this:

  • Keep track of a list of matches w/ recreation info

  • Detect crashes

  • Parse STDERR for customizable hints and report based on them

  • Randomize order of agents during runs

  • Randomize selection of opponents from a specified ranking range

  • Send the information (POST) to a specified URL on completion

  • Properly handle gateway timeout errors. Not sure what it does right now. Kind of hard to simulate. :slight_smile:

Any other ideas? I will make this available on gitHub very soon so that others can fork if desired.

  • danBhentschel
1 Like

I’m closing this topic since all further developments will be posted to:

  • danBhentschel