CmdrDats / igoki

Clojure Go Kifu recorder and OGS player
Eclipse Public License 1.0
161 stars 16 forks source link

OGS no Demoboard feature #106

Open wizerdo opened 2 years ago

wizerdo commented 2 years ago

What is was hoping for, is that you were able to set up a demo board (so that you input both players) is this at all possible? A relevant use case would be for recording games during tournaments.

Hope to hear from you.

CmdrDats commented 2 years ago

Ye, the simplest base case records both players - it looks like there's a small bug at the moment where you need to hit file -> new sgf after you set camera up for it to start recording the game

wizerdo commented 2 years ago

You mean that you have to setup the program twice, and run it twice?

CmdrDats commented 2 years ago

No, simply setup the camera (select camera, choose board corners), put a few stones down to check that it's picking them up ok, take them off - then go to file -> new, and start playing - it should start recording the game. If you want to start with handicap stones, place the handicap stones before the file -> new, and it'll initialise the board to that position and start playing. I think it should also then start with white, though you'll need to check.

Let me know if that answers the question or if I'm misunderstanding perhaps?

wizerdo commented 2 years ago

Thx for the response, but indeed think you misunderstand. OGS has a feature that is called demo board, with it you can review games, or relay games that are played in a tournament. With it you play as both black and white.

As I understand, Igoki currently only lets you play one color when connected to ogs, and demo boards don’t show up in Igoki

CmdrDats commented 2 years ago

Ah yes, i see. I'll have to figure out integration for demo board. For now, i think you can workaround this using the 'manual' tab instead of direct ogs integration. This basically simulates mouse clicks, so you can open demo board on one half of the screen and have it input both colours as mouse clicks. It also lets you integrate with just about any go client..

Let me know if that works as a workaround for now?

wizerdo commented 2 years ago

Yeah that will work I guess, I was also considering running the application twice and letting them play as black or white (against each other so to speak).

CmdrDats commented 2 years ago

I'll have a look tonight and see what it'll take to implement the demo board, i suspect it won't be too difficult to make it play for both

wizerdo commented 2 years ago

the manual input seems (at least for me) only to hover over the correct coordinate, but it doesn't place a move. (in OGS i have single click to confirm move enabled.

CmdrDats commented 2 years ago

One thing I've noticed, in some OSes, the first click takes window focus if not focused, and doesn't register click, so perhaps check that the browser window is focused? Else maybe i can make it double click, that might help

wizerdo commented 2 years ago

I did “focus” the window so don’t think that was it, but double click might work 🤔

See the images on how I have set it up for testing 😉

1948B660-04E2-448C-894F-1EE40C97F73F D7486727-A353-449A-9E97-90A30F60CDCB

CmdrDats commented 2 years ago

Woo! That's a gorgeous setup!

I'll try change it to double click and maybe make the clicks slower and we can see.

CmdrDats commented 2 years ago

btw - I just checked my code - it should move the mouse back to original location after mouse click on manual mode - if it's just staying there, I suspect some other kind of error - if you've got a terminal window with output, could you check if there's some kind of error message there?

I've implemented a double click, and I'm going to test the OGS demo board soon and see if I can implement it properly.

wizerdo commented 2 years ago

27 nov. 2021 16:02:39,151 INFO igoki.integration.robot - Submitting mouse click at: pp size: 19 cell: [33 33] coords: [15 15] ref: m [551 737] 0 1

this it was it says, doesn't seem like an error message

wizerdo commented 2 years ago

I was wondering, would it be possible to login into 2 separate accounts in Igoki, and “let them play against each other”

CmdrDats commented 2 years ago

hmm, interesting idea - it's entirely possible, sure. I would need to rework a few things just to make the state management cleaner, but there's no fundamental reason why not.

What's your specific use case? Do you often have OGS players that can login with their details and then play each other while people can watch on OGS?

wizerdo commented 2 years ago

I think the use case would be live streaming tournaments, in such a manner that someone can comment on the game. The main problem with for example using a demo board on OGS is, that if you hire a pro for commentary on the games, then they cant properly review the game on OGS. so therefore one would like to play with 2 accounts, placing alternating moves on OGS, like a regular game.

CmdrDats commented 2 years ago

cool, makes sense - I had a look at OGS - the documentation on the demo/reviews are sparse, though I can probably make it work.. feels like two OGS accounts might be simpler and possibly more versatile?

wizerdo commented 2 years ago

Yeah I would agree!