KGS Leben: browser-powered, open-source KGS client

Comments, questions, rants, etc, that are specifically about KGS go here.
User avatar
Charlie
Lives in gote
Posts: 310
Joined: Mon Feb 06, 2012 2:19 am
Rank: EGF 4 kyu
GD Posts: 0
Location: Deutschland
Has thanked: 272 times
Been thanked: 126 times

KGS Leben: browser-powered, open-source KGS client

Post by Charlie »

A little over a month ago, WMS announced his JSON API for the KGS Go Server. I initially wanted to use it to create a modern desktop client for KGS but, after playing with it for a while, I finally decided to embrace the browser and began working on an HTML5 and Javascript powered client. One month has past and I have finally reached a point where I am prepared to commit to the project.

It will eventually be open-source, under the MIT license but, for now, it is very much a prototype. I spent the last month working on technically challenging and risky parts of the project and not trying to create a feature-complete application. Nevertheless, I have put up a video on YouTube showing the prototype as it is, today.

The intention behind the video is to serve as a beginning: my creation will only grow, from here. I do not want to build anything without the input of the community so I will be publishing regular updates on my progress, henceforth. I also welcome constructive comments on what I am building.

In its current state, the client is capable of joining open challenges, negotiating a game proposal and playing stones in the game when it begins. It can join any channel or room and chat therein and join other people's games and demonstration boards as a spectator.

https://youtu.be/m8yT6qrBSU4

P.S.: Please forgive the amateur nature of the video and the South African accent. I'm a programmer, not a P.R. guru.
User avatar
Bonobo
Oza
Posts: 2224
Joined: Fri Dec 23, 2011 6:39 pm
Rank: OGS 13k
GD Posts: 0
OGS: trohde
Universal go server handle: trohde
Location: Lüneburg Heath, North Germany
Has thanked: 8262 times
Been thanked: 924 times
Contact:

Re: KGS Leben: browser-powered, open-source KGS client

Post by Bonobo »

That looks quite awesome already, respect!

How will this, being “browser-powered”, work in the end? Does this require some Web site as an entry page? Or will it be a browser plugin? (I know close to nothing about coding, so pls forgive me if the answer should be obvious.)
“The only difference between me and a madman is that I’m not mad.” — Salvador Dali
yoyoma
Lives in gote
Posts: 653
Joined: Mon Apr 19, 2010 8:45 pm
GD Posts: 0
Location: Austin, Texas, USA
Has thanked: 54 times
Been thanked: 213 times

Re: KGS Leben: browser-powered, open-source KGS client

Post by yoyoma »

I was confused when you said for demonstration games, you can navigate the move tree. I expected to see a game tree UI somewhere, but I only see that in the java client, not the html one. Maybe you meant the html client can handle variations internally, but the UI part isn't there yet?
User avatar
wms
Lives in gote
Posts: 450
Joined: Tue Apr 20, 2010 4:23 pm
GD Posts: 0
KGS: wms
Location: Portland, OR USA
Has thanked: 257 times
Been thanked: 287 times
Contact:

Re: KGS Leben: browser-powered, open-source KGS client

Post by wms »

Looks fantastic! Thanks, Stephen, for doing this work. I'll try to keep on top of any bugs in the JSON webapp that you find.
User avatar
EdLee
Honinbo
Posts: 8859
Joined: Sat Apr 24, 2010 6:49 pm
GD Posts: 312
Location: Santa Barbara, CA
Has thanked: 349 times
Been thanked: 2070 times

Post by EdLee »

Yay! :bow: :clap: :salute:
jeromie
Lives in sente
Posts: 902
Joined: Fri Jan 31, 2014 7:12 pm
Rank: AGA 3k
GD Posts: 0
Universal go server handle: jeromie
Location: Fort Collins, CO
Has thanked: 319 times
Been thanked: 287 times

Re: KGS Leben: browser-powered, open-source KGS client

Post by jeromie »

I'm glad someone took up the challenge. It's a promising start! Please let us know when you decide to release the code; I'd love to take a look.
User avatar
yishn
Dies in gote
Posts: 57
Joined: Tue Jun 30, 2015 2:37 am
Rank: 4 kyu
GD Posts: 0
Location: Germany
Been thanked: 15 times
Contact:

Re: KGS Leben: browser-powered, open-source KGS client

Post by yishn »

Wow! That looks amazing! Maybe someday I can play on KGS again without soiling my computer with Java.
longshanks
Dies with sente
Posts: 97
Joined: Sat Nov 22, 2014 1:51 am
GD Posts: 0
Been thanked: 14 times

Re: KGS Leben: browser-powered, open-source KGS client

Post by longshanks »

Initial thoughts are it looks great. Keep up the good work and be sure to post updates here. Being able to play on any device without the need for Java would be great.
User avatar
Charlie
Lives in gote
Posts: 310
Joined: Mon Feb 06, 2012 2:19 am
Rank: EGF 4 kyu
GD Posts: 0
Location: Deutschland
Has thanked: 272 times
Been thanked: 126 times

Re: KGS Leben: browser-powered, open-source KGS client

Post by Charlie »

Thank you for all the positivity. :)

@Bonobo: At the moment, the code isn't really useful to non developers because you need to host the JSON End-point and that requires you to set up Things. In the end, however, you will require nothing other than a proper web browser - Chrome, Firefox, I.E., Edge, proper Safari or Opera, others if you're lucky. When you navigate to the URL at which the application will be hosted, you will be presented with the sign-in screen that is featured at the very beginning of the video.

@yoyoma: Yes, what I meant was that the browser-based client can follow along as the Java client jumps about in the game tree. Sorry for being ambiguous. This is actually not trivial and seeing it work so smoothly is a sign that the internal game tree and position models are capable of unrolling moves and replaying moves to reproduce a position. I probably didn't need to make a show of it but I spent so long testing and tweaking it, I couldn't help myself.

I'm using Jan Prokop's WGo.js to render the board (although I secretly hope to write my own renderer just because that interests me) but his library has a simple stack-based model of a game, not a full tree. I tried to bend his stack-based model to my requirements but it turned out to be far more efficient to simply borrow his implementation of the rules (captures and liberty counting) and write a bespoke tree model that better fits the model used in WMS' API. Ach. Whatever. I'm just making excuses: I ripped his library open because I wanted to truly understand how it works. Permit me my fun, it's the real reason why I'm doing this, after all.


@wms: Thanks. And thanks for the rapid turn-around time on bugs, so far.

@jeromie: If there's anything you wish to see, just shout and I'll consider posting whole code files or snippets. The project, at the moment, is still moving too quickly for me to punt the code, I feel. When it has settled down a bit more, I will write a developer's readme describing the build system and how to set up a dev. environment, a brief overview of the project's structure and patterns and start shouting loudly. (I guess contributor's guides and other such things will need to be enacted...)

@yishn: Oracle's Java Runtime leaves a bad taste in my mouth, too - ever since the whole Ask Toolbar debacle. Luckily, you don't need it. You can use Zulu which is a build of OpenJRE and can be "xcopy" deployed - that is, extracted from a ZIP file and simply plonked into a folder. By serendipitous chance, I actually wrote a guide describing precisely how to do that, a little over a month ago: https://probabilism.wordpress.com/2016/ ... al-damage/

My sense of humour is seriously tickled. The second part of that guide never materialised because I've been too busy writing KGS Leben but it was research for the second half that lead me to the discovery of the Google+ post announcing the JSON API. Sometimes, life is just weird.
dfan
Gosei
Posts: 1598
Joined: Wed Apr 21, 2010 8:49 am
Rank: AGA 2k Fox 3d
GD Posts: 61
KGS: dfan
Has thanked: 891 times
Been thanked: 534 times
Contact:

Re: KGS Leben: browser-powered, open-source KGS client

Post by dfan »

This looks great; I can't wait to try it out. One thing which would be really useful even at this early stage is a mark on the last-played stone.
User avatar
EdLee
Honinbo
Posts: 8859
Joined: Sat Apr 24, 2010 6:49 pm
GD Posts: 312
Location: Santa Barbara, CA
Has thanked: 349 times
Been thanked: 2070 times

Post by EdLee »

dfan wrote:One thing which would be really useful even at this early stage is a mark on the last-played stone.
Yes; very important feature.

Hi Charlie,

Please use a circle for the current move marker (like IGS clients: gIgo, Panda, etc.),
or, at least provide an option for the user to choose among a circle, square, triangle, etc. Thanks.
jenson
Dies in gote
Posts: 32
Joined: Sun Jun 16, 2013 5:12 pm
GD Posts: 0
KGS: mychew
Tygem: jenson
IGS: jenson
Wbaduk: jenson
DGS: jenson
Kaya handle: Jenson
Online playing schedule: Kaya, whole day but it depends on work schedule
Has thanked: 12 times

Re: KGS Leben: browser-powered, open-source KGS client

Post by jenson »

already a great looking browser client to me plus it has the features I missed in KGS Android client. I don't mind to play both on android (since I've paid for it) and browser client.

to me they bth serve different purposes. I've long wanting to do something similar but lack the expertise and time to explore further or help on similar projects :)

Good move Charlie!
User avatar
Charlie
Lives in gote
Posts: 310
Joined: Mon Feb 06, 2012 2:19 am
Rank: EGF 4 kyu
GD Posts: 0
Location: Deutschland
Has thanked: 272 times
Been thanked: 126 times

Re: KGS Leben: browser-powered, open-source KGS client

Post by Charlie »

Heh. I was wondering what the first feature-request would be. At least some of the voices in my head had bet hard imaginary cash on it being a last-move marker.

I like the OGS ones but I find them to be a little too severe. It makes the white stones look almost like black stones. I was planning to try something similar but slightly more subtle. What do you think about it?

Now that I have finished the technical foundation and answered all the major questions in my head, I am trying to follow a shortest-path-to-usefulness strategy. After that, I will probably set up a UserVoice to provide some direction. I will never *promise* to implement everyone's personal whims but I also want to give players options. Options and sensible defaults.
User avatar
Jordus
Site Admin
Posts: 1125
Joined: Fri Dec 04, 2009 6:06 pm
Rank: KGS 9k
GD Posts: 0
Universal go server handle: Jordus
Location: Allegan, MI, USA
Has thanked: 16 times
Been thanked: 116 times
Contact:

Re: KGS Leben: browser-powered, open-source KGS client

Post by Jordus »

Charlie wrote: I like the OGS ones but I find them to be a little too severe. It makes the white stones look almost like black stones. I was planning to try something similar but slightly more subtle. What do you think about it?


A circular marker on a circular object could shadow over the object you are trying to highlight, though personally it hasn't bothered me. If going with something different maybe use a marker shape that is different and it should be fine. If OGS's circle marker is too harsh try a square or triangle. You could also make the marker a color other than black or white such as red or green. If changing colors I would research exactly what color combos would work best for someone with colorblindness so they can use the app with ease as well. (The thought occurred to me when thinking about the color patterns. I personally have no knowledge or expertise in the subject and no idea if certain colors are unintelligible together or not.)
I'm thinking...
User avatar
yishn
Dies in gote
Posts: 57
Joined: Tue Jun 30, 2015 2:37 am
Rank: 4 kyu
GD Posts: 0
Location: Germany
Been thanked: 15 times
Contact:

Re: KGS Leben: browser-powered, open-source KGS client

Post by yishn »

Charlie wrote:I like the OGS ones but I find them to be a little too severe. It makes the white stones look almost like black stones. I was planning to try something similar but slightly more subtle.


If I may be so bold: Take a look at Sabaki for inspiration. It uses a small disc as the last move marker and I find it very nice. (Of course, since I made it. :roll:)
Post Reply