Author |
Topic: Send permanent game ID at end of game (Read 806 times) |
|
Janzert
Forum Guru
    
 Arimaa player #247
Gender: 
Posts: 1016
|
 |
Send permanent game ID at end of game
« on: Sep 5th, 2009, 10:03pm » |
Quote Modify
|
This may or may not be possible depending on details of how the server works. It would be quite nice if the final update from the game server could include the permanent database game id for the game. Bots could then record this in their log file if desired and clients for humans could display it in the chat or other appropriate area. This would allow a game to be easily found and referenced after the game is complete. Janzert
|
|
IP Logged |
|
|
|
omar
Forum Guru
    
 Arimaa player #2
Gender: 
Posts: 1003
|
 |
Re: Send permanent game ID at end of game
« Reply #1 on: Sep 22nd, 2009, 9:27pm » |
Quote Modify
|
The game server would not be able to provide the permanent game id. However, it would be possible to make a request to the game room with the temporary id and get back the permanent id. I added a 'findgameid' action to the gameroom protocol. http://arimaa.com/arimaa/protocol/
|
|
IP Logged |
|
|
|
Janzert
Forum Guru
    
 Arimaa player #247
Gender: 
Posts: 1016
|
 |
Re: Send permanent game ID at end of game
« Reply #2 on: Sep 22nd, 2009, 11:02pm » |
Quote Modify
|
Thanks Omar, that should work great. If it's not a problem it might be a little cleaner for bot clients if this could be added to the bot1gr.cgi as well. Janzert
|
|
IP Logged |
|
|
|
omar
Forum Guru
    
 Arimaa player #2
Gender: 
Posts: 1003
|
 |
Re: Send permanent game ID at end of game
« Reply #3 on: Sep 23rd, 2009, 9:35pm » |
Quote Modify
|
Good idea. Added 'findgameid' to bot1gr.cgi also. Thanks.
|
|
IP Logged |
|
|
|
Janzert
Forum Guru
    
 Arimaa player #247
Gender: 
Posts: 1016
|
 |
Re: Send permanent game ID at end of game
« Reply #4 on: Sep 28th, 2009, 10:17pm » |
Quote Modify
|
Omar, could you double check that this made it onto the server. It seems to only work through client1gr.cgi at the moment. Thanks, Janzert
|
|
IP Logged |
|
|
|
Janzert
Forum Guru
    
 Arimaa player #247
Gender: 
Posts: 1016
|
 |
Re: Send permanent game ID at end of game
« Reply #6 on: Oct 7th, 2009, 8:01pm » |
Quote Modify
|
Oops, I had forgotten that the url used during the game (the table url?) was different from the gameroom url. Switching to the correct url works. Thanks again, Janzert
|
|
IP Logged |
|
|
|
Janzert
Forum Guru
    
 Arimaa player #247
Gender: 
Posts: 1016
|
 |
Re: Send permanent game ID at end of game
« Reply #7 on: Nov 25th, 2009, 4:13pm » |
Quote Modify
|
It seems like this fails somewhere around a third of the time. Instead of the game id I get an error back from the server: error=Gameroom: Cannot find the game with temp id of (That's the complete message, there is no id given in the error message) At first I thought I must be sending a bad temporary id but I checked what I sent to the server and I don't see any correlation between errors and successful responses. The post body that generated the error above: action=findgameid&tid=153353 and one that worked fine: action=findgameid&tid=153377 So it seems like the script is failing to parse the id sometimes but I'm not sure what it correlates with. Janzert
|
|
IP Logged |
|
|
|
omar
Forum Guru
    
 Arimaa player #2
Gender: 
Posts: 1003
|
 |
Re: Send permanent game ID at end of game
« Reply #8 on: Dec 9th, 2009, 7:00pm » |
Quote Modify
|
Strange. Are you making this request right after creating the game. It might be a timing issue with the game not being completely created before the request. Maybe adding a couple seconds of delay might fix it. Or maybe retry the request with increasing second intervals.
|
|
IP Logged |
|
|
|
Janzert
Forum Guru
    
 Arimaa player #247
Gender: 
Posts: 1016
|
 |
Re: Send permanent game ID at end of game
« Reply #9 on: Dec 9th, 2009, 8:29pm » |
Quote Modify
|
The request is sent very quickly after receiving the result of the game from the server. I'll change it to retry a few times with an increasing back off and see how it does. Janzert
|
|
IP Logged |
|
|
|
Meneldor
Forum Full Member
  

Doug Webber
Gender: 
Posts: 18
|
 |
Re: Send permanent game ID at end of game
« Reply #10 on: Dec 11th, 2009, 4:00pm » |
Quote Modify
|
That would be a useful feature. Janzert - I think I recently played against one of your bots and it timed out once I had all traps covered
|
|
IP Logged |
|
|
|
|