Author |
Topic: Arimaa Server Protocol - bugs (Read 780 times) |
|
borg
Forum Junior Member
Arimaa player #1593
Gender:
Posts: 9
|
|
Arimaa Server Protocol - bugs
« on: Mar 12th, 2006, 6:57pm » |
Quote Modify
|
my gui is in progress, but there are a lot of problems with the protocol. i can login and find open games. the response from the server is as expected, it works already fine. next step is to reserve a seat: Code: Reserve Seat - Put our name on an open seat POST action=reserveseat sid=[gameroom session id] gid=[game id] role=[w or b; which side the user will be playing] RESPONSE gid=[id of the new game] gsurl=[URL of the gameserver where the game will be hosted] tid=[authentication string that needs to be passed to the gameserver later] error=[if there was a problem, this contains the error message which can be displayed to the user] |
| first: why there is a "role" option? with the response of "action=mygames" i already got the role. second: when i try "action=reserveseat&sid=...&gid=..." (with my sid and the gid i got from "action=mygames") i get following as response: Code: <html> <head><title>Temporarily Unavailable</title></head> <body bgcolor="#d8d8f8" background=""> <h2 align=center>Temporarily Unavailable</h2> <blockquote> <p align=center><i>Use the back button of your browser to return to the previous page.</i></p> <hr width=70%> <p align=center><b>Will be restored in a few minutes. <!-- Unknown column 'playerid' in 'where clause' --></b></p> </blockquote> </body> </html> Content-type: text/plain error=Gameroom: Another player just took that seat: 34709 --END-- |
| huh? but the seat is reserved for me, i can look it up in the original webfrontend. another logical bug: i can find "invited me games" but there is no option to accept games someone invited me to.
|
|
IP Logged |
|
|
|
ajhager
Forum Newbie
Arimaa player #1316
Gender:
Posts: 5
|
|
Re: Arimaa Server Protocol - bugs
« Reply #1 on: Mar 13th, 2006, 3:22am » |
Quote Modify
|
Hello borg, I too am writing a web client in my Arimaa program. I've got the protocol code done, so if you have any questions, feel free to ask. There are some bugs in the protocol, but I've sent a report of them to Omar. (I can send you what I've found if you'd like. ) About what you've posted: I'm not getting the error you got when reserving a seat. Are you still getting it? Next, although I can query for invitedmegames, I don't see any invites even though they are there. Are you seeing the invites? Since I can't see them, I can't test it, but since invitedmegames returns game info just like mygames and opengames, I'm assuming you just reserve a seat, sit, etc. like normal.
|
|
IP Logged |
|
|
|
borg
Forum Junior Member
Arimaa player #1593
Gender:
Posts: 9
|
|
Re: Arimaa Server Protocol - bugs
« Reply #2 on: Mar 13th, 2006, 9:35am » |
Quote Modify
|
on Mar 13th, 2006, 3:22am, ajhager wrote: I'm not getting the error you got when reserving a seat. Are you still getting it? |
| you have to commit the opposite of the role you got from the action=mygames query. otherwise it will not work. this is a bit strange, i think the "role"-option is redundant in this case. but with the knowledge of this it works for me too.
|
|
IP Logged |
|
|
|
borg
Forum Junior Member
Arimaa player #1593
Gender:
Posts: 9
|
|
Re: Arimaa Server Protocol - bugs
« Reply #3 on: Mar 13th, 2006, 9:41am » |
Quote Modify
|
on Mar 13th, 2006, 3:22am, ajhager wrote:Next, although I can query for invitedmegames, I don't see any invites even though they are there. Are you seeing the invites? |
| same for me. on Mar 13th, 2006, 3:22am, ajhager wrote: Since I can't see them, I can't test it, but since invitedmegames returns game info just like mygames and opengames, I'm assuming you just reserve a seat, sit, etc. like normal. |
| oh, this sounds logical on Mar 13th, 2006, 3:22am, ajhager wrote:There are some bugs in the protocol, but I've sent a report of them to Omar. (I can send you what I've found if you'd like. ) |
| perhaps you can post bugs and improvement suggestions etc. in this thread. omar can read it here too, but we can better discuss about it here.
|
« Last Edit: Mar 13th, 2006, 9:48am by borg » |
IP Logged |
|
|
|
ajhager
Forum Newbie
Arimaa player #1316
Gender:
Posts: 5
|
|
Re: Arimaa Server Protocol - bugs
« Reply #4 on: Mar 13th, 2006, 1:01pm » |
Quote Modify
|
Sounds good to me borg. I don't have a lot of time at the moment, so here is a quick paste from the email I sent omar. 1. Querying games I've been invited to returns 0 games no matter what. 2. Reserving a seat returns the gsrul as '/client1gs.cgi'. It should return the absolute path like creating a game does. 3. sending a move returns error='' or ok='', not error='' or sid='',side='',role='', as the protocol specification says. 4. For sending a takeback request, one of the values it asks for is takeback=req. what value is req supposed to be? I've tried everything I can think of to no avail. Takeback replies work great on the other hand. 5. What effect does leaving a game have? I've sent the leave game action, gotten an ok=1, but i could still get the game state, make moves, etc. And it had no visual effect on the other end either ( flash client ). 6. Through the client I was able to reserve a seat with Arimaanator and play, but through the website it wouldn't let me because I hadn't worked my way high enough in the bot ladder. Until later...
|
|
IP Logged |
|
|
|
omar
Forum Guru
Arimaa player #2
Gender:
Posts: 1003
|
|
Re: Arimaa Server Protocol - bugs
« Reply #6 on: Mar 14th, 2006, 4:31pm » |
Quote Modify
|
on Mar 13th, 2006, 1:01pm, ajhager wrote:Sounds good to me borg. I don't have a lot of time at the moment, so here is a quick paste from the email I sent omar. 1. Querying games I've been invited to returns 0 games no matter what. 2. Reserving a seat returns the gsrul as '/client1gs.cgi'. It should return the absolute path like creating a game does. 3. sending a move returns error='' or ok='', not error='' or sid='',side='',role='', as the protocol specification says. 4. For sending a takeback request, one of the values it asks for is takeback=req. what value is req supposed to be? I've tried everything I can think of to no avail. Takeback replies work great on the other hand. 5. What effect does leaving a game have? I've sent the leave game action, gotten an ok=1, but i could still get the game state, make moves, etc. And it had no visual effect on the other end either ( flash client ). 6. Through the client I was able to reserve a seat with Arimaanator and play, but through the website it wouldn't let me because I hadn't worked my way high enough in the bot ladder. Until later... |
| Thanks for the bug report Aaron. Some of these got introduced when I modified the protocol to make it a little cleaner. 1. Made changes to fix it; needs to be tested. 2. Made changes to fix it; needs to be tested. 3. Protocol documentation was wrong; changed the documentation. 4. req is just the literal string "req"; it's not a value that changes. 5. Leaving the game just lets the opponent know you have left; it does not end the game. The star in front of the players username will be removed to indicate the player is not present. 6. There really isn't any restriction on which bots you can play. The bot ladder just makes it seem that way by not giving 'play' links to higher bots than the first one. Omar
|
|
IP Logged |
|
|
|
ajhager
Forum Newbie
Arimaa player #1316
Gender:
Posts: 5
|
|
Re: Arimaa Server Protocol - bugs
« Reply #7 on: Mar 15th, 2006, 3:25am » |
Quote Modify
|
Thank you so much Omar. I definately appreciate all your hard work. 1. The game invites now do show up wonderfully. They are missing the gid field though. Everything else seems good. Once my gui for online play is further along, I will test everything more rigorously.
|
|
IP Logged |
|
|
|
|