Skip to content
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

Automatic detection of player connection #79

Open
mtraton opened this issue May 13, 2015 · 3 comments
Open

Automatic detection of player connection #79

mtraton opened this issue May 13, 2015 · 3 comments

Comments

@mtraton
Copy link

mtraton commented May 13, 2015

Sorry if I'm writing in a wrong place.

Normally the server app needs to manually add each and every player except the ones who were hardcoded in PlayerPresenceManager(). How can one make the server automatically listen to the client connections and add them to the PlayerList Panel?

@samschreiber
Copy link
Member

Players don't connect to the match host in GGP today; the match host
connects to the players.

On Wed, May 13, 2015, 6:30 AM mtraton [email protected] wrote:

Sorry if I'm writing in a wrong place.

Normally the server app needs to manually add each and every player except
the ones who were hardcoded in PlayerPresenceManager(). How can one make
the server automatically listen to the client connections and add them to
the PlayerList Panel?


Reply to this email directly or view it on GitHub
#79.

@samschreiber
Copy link
Member

Just to be clear -- this is a good idea and it'd be nice if we could support something like this, where players automatically announce themselves to the match host.

We'd need to define a new protocol for doing that, though. Today, the player is essentially a server that sits there waiting for a match host to connect to it. There's no defined mechanism in the GGP communication protocol by which a player can announce its presence, or a match host can detect the presence of players whose IP address it doesn't yet have.

I've thought about adding a special GGP.org-specific protocol, whereby players can auto-register with a GGP.org server, and then match hosts can connect to that GGP.org server to get a list of registered players. There are some privacy implications that I'm still thinking through (are people okay with the IP addresses of their players being publically available?). But clearly it would be a nice thing to have.

@gsj601
Copy link
Contributor

gsj601 commented May 20, 2015

I'd like to second the idea of a second protocol. The current model works fine for running competitions, or for the kinds of occasional matches against other registered agents that wind up in the archives. But, it's not so helpful for trying to run an experiment. I've run into the same problem, of trying to get the player to announce to the server, when I was trying to set up a system where I have ten computers that get told what player to play as, and what game to play, by a central server that's in control of an experiment (where an "experiment" is just every combination of games and player types from a set, with N repetitions).

That being said, I did already write something that works, just by writing a Python wrapper around the existing ggp-base code. Basically, I wrote all the parts about players connecting to a server to say they're ready, but then I get the server and the players to start up external java processes that run the regular player and game server code. It's not pretty, but, it works. So, if it could help mtraton (and others?) I thought I'd mention it. It lives at
https://github.com/gsj601/ggp-hardware
I've done some polishing to make it run fairly easily, using config files. It's not completely polished, and not everything's documented. But, like I said... it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants