Readit News logoReadit News
tslocum · 2 years ago
Hey there, author here. Glad to answer any questions.

If you don't know how to play backgammon, check out this guide[0] and/or this video[1]. There is a lot of history[2] behind backgammon. bgammon.org is AGPL-licensed, the client[3] and server[4] source code is publicly available. The graphical client is powered by the excellent Ebitengine[5] game engine.

  0. https://bgammon.org/blog/20240201-how-to-play-backgammon/
  1. https://www.youtube.com/watch?v=KDvvKWi0ijs
  2. https://bgammon.org/blog/20240115-history-of-backgammon/
  3. https://code.rocket9labs.com/tslocum/boxcars
  4. https://code.rocket9labs.com/tslocum/bgammon
  5. https://ebitengine.org

honksillet · 2 years ago
It might be worth while looking at lichess and take some direction from their interface, which is quite nice.
tslocum · 2 years ago
Lichess has been a large inspiration for the project. I gave Lichess a shout-out for its influence in this blog post: https://bgammon.org/blog/20240101-hello-world/
porphyra · 2 years ago
Is there a way to resign a game? I don't want to play against a bot until I get totally demolished.

Also, if I click in the text input, a huge keyboard shows up even on desktop, obscuring much of the game. Why?

tslocum · 2 years ago
Yes, you can type /resign when it is your turn to end the game.

Thanks. The keyboard input should only show up if your browser is indicating there is a soft keyboard available for the device. On Android, the device keyboard doesn't work for some reason. It definitely shouldn't show up on desktop, though. I will look into this.

The desktop version[0] shouldn't have this issue, if you want to give that a try.

0. https://bgammon.org/download/

bonzini · 2 years ago
Why does "Play now using your browser" link to the play store?
tslocum · 2 years ago
If the user-agent claims to be Android, the play link is changed to the Play Store. This is because the web client runs single-threaded[0] and has reduced performance when running in a browser on desktop, let alone when running on a mobile platform. When running as a native Android app, all of the device's CPU cores are utilized.

0. https://github.com/golang/go/issues/28631

Dead Comment

huimang · 2 years ago
Something I've thought a lot while playing backgammon locally is "I wish there was a site like lichess, but for backgammon"... so kudos for going out and starting your own! Are there any plans for post-game analysis?

There seems to be an issue with the login/signup form, as it doesn't pull up the native keyboard for my phone, but some random keyboard.

fforflo · 2 years ago
I got a feeling that this may be a cultural aspect there too: Backgammon is not considered "sophisticated," I think. I'm from Greece (I don't play backgammon myself, though), and backgammon (tavli) is extremely popular but widely considered "a game for the masses." It is played mostly in tavernas and old-style coffee shops, and each game has a social aspect, too. People discussing (sometimes shouting and finger-pointing "no! You should have done this or that! Ah! just get up and let me play, you're a noob!"

I can't but laugh thinking who would be the GMHikaru or GothamChess of tavli :D :D

Edit: This can be misinterpreted. I don't play tavli not because is not considered sophisticated, I just find the rules confusing for certain setups.

TylerE · 2 years ago
Interesting, I've seen the opposite. In the US it's hardly played at all, nowhere near something like chess or poker, but a large (relative) percentage of the play that happens is for money, often at absolute nosebleed stakes.
chongli · 2 years ago
That sounds great! Here in Canada the bar scene is mostly about watching hockey on big screen TVs. That’s a lot less interesting to me than games.

I never learned backgammon though.

huimang · 2 years ago
After I learned backgammon from my parents, I also wonder why almost no one plays it in the US compared to chess. Seems mostly European and Middle Eastern folks play it (my parents are from Romania).

I like it because it's not as serious as chess, at least when it's not played for money. Just roll and go. I always carry a portable set with me, made by sondergut.

kzrdude · 2 years ago
chess should be a game for the masses too, and I think it is. People play that in cafes too
tslocum · 2 years ago
Thanks. Yes, I hope to support analyzing games in the future. I experimented with interfacing with gnubg to accomplish this, and hit a brick wall, as gnubg really isn't designed for computers to use it. From what I can tell, I would need to scrape the terminal output of gnubg to do this programmatically. I haven't found any open source engines that seem easier to interface with, if anyone knows of one, please share.

The internal keyboard is shown rather than the device keyboard because on many devices, using the device keyboard does not work. It either doesn't show at all, or it is shown but key input is not registered. I hope that the game engine powering bgammon.org adds support for using device keyboards soon, and will be glad to revert to using device keyboard as soon as possible.

me_me_me · 2 years ago
https://www.playok.com/

its english version of polish kurnik.pl (henhouse)

Its as old as polish internet, very rudimentary but always active for all kind of games

NooneAtAll3 · 2 years ago
no long nardi :(
euph0ria · 2 years ago
Great game! Some feedback from a first time ever backgammon player:

- Thank you for getting me to play for my first time!

- Once a move has been utilized, then grey out that dice

- Rename the button "OK" to "Skip turn", I was wasting many turns until I figured out it skips your turn

- Make the color of your player more visible, I didn't know if I was black or white, thought I was white for the longest time

- For desktop users, do not show the popup keyboard, super difficult to chat with other players since it hides the text I'm writing

- Once I've done my two/four moves, autoclick the "ok button" so it speeds up the gameplay

closedl00p · 2 years ago
Hi, nice snappy interface (even after making the HN front page...) and I like the gentle highlighting of possible moves for a piece.

In two games against the bot I _think_ I had the luck to run into a corner case bug with the rules engine: in the position shown in this screenshot https://ibb.co/dQ3HsM4 I'd rolled a 4-6, but the UI would not let me move my piece on 9 four spaces to hit the opponent on 5 -- the UI only wanted to let me move that piece six spaces.

I can imagine how this bug could happen-- all my pieces except this one are in my inner table, so it looks like my piece on 9 is the only piece that can legally use the rolled six, and you're required to fully use your roll if possible... except in this particular case, once I move that piece four spots, I'd be fully in my inner table and could use the six to bear off a piece.

[sidenote: I realize I don't know the best 2024 way to host a temporary image for posting on a text-only forum like HN... but imgbb looked reasonable...]

tslocum · 2 years ago
Thanks for reporting this and including a screenshot. I appreciate it.

I've just resolved this on the server and in the web client (now v1.3.5p1, displayed at the lower right when the game loads).

dumbo-octopus · 2 years ago
While we're on the topic of ancient link-based sharing websites, here's a pastebin of the Typescript code I wrote years ago that I just dug up to see if it'd handle this case. It does! It uses an actually-pretty-fast backtracking implementation to check for valid moves - validating Backgammon moves is a harder problem than you'd think, especially doing so quickly enough to effectively run monte tree search with. Even with all the thought I've put into it, I still don't have a quick explanation I can give a human trying to learn that game what the valid moves are, especially in the endgame and with blocked moves.

https://pastebin.com/QeSdnQpM

And the test cases I have for it: https://pastebin.com/vmMEjSMz

Deleted Comment

somat · 2 years ago
The opening position of backgammon always worries me, not because it is bad, but because I don't understand it. And backgammon is old enough that getting to the origin and meaning behind the position is not trivial.

My best guess is that the game started out with all the pieces off the board and you had to get them all on and around and off the far side. However this takes too long and some bright Persians who understood the game far more than me who only plays an occasional game with my father started creating and playing strategic openings. Positions with interesting interactions with the dice but now the game was much shorter and exciting. And the game we all play and enjoy today was one of the more popular openings.

A good theory, hard to prove. But why on earth do you start with five tokens already in your home???

tslocum · 2 years ago
I think the opening position evolved out of a desire for more interesting openings and resulting middle and end games. The position does seem strange at first, but it is sort of the foundation for more sensible positions, like turning 6-1 into a fortification of two pieces on the same space. Without the opening position, you would only have at most one checker on a space with this roll. I have absolutely nothing to prove any of this, it's purely speculation, as this is something I've wondered about as well.
bonzini · 2 years ago
Backgammon had a pretty large community at Yahoo! Games. With the demise of Yahoo! Games the only place to play online was FIBS, for which you had to download a Java client... Glad that finally someone scratched their own itch and built this, I will check it out and suggest it to my father.

Deleted Comment

starmftronajoll · 2 years ago
I’ve played for a long time at BG Galaxy, judging by online backgammon forums (and activity on BGG itself), it’s a pretty popular place to play.

https://www.backgammongalaxy.com/

Edit: Hey tslocum, rather than downvoting anyone who mentions other sites where people can play backgammon, I’d love for you to tell us more about why you believe your site is or will become superior to the existing options. There’s room for improvement in this space, but you’re definitely not there yet.

lstolcman · 2 years ago
Check https://www.playok.com/ - it has backgammon as well as other games. The site is using html 5 and following "keep it simple" principle; it just works
2-3-7-43-1807 · 2 years ago
very nice web site! thanks for recommending it here. just had a nice game of gin rummy.
CamelCaseName · 2 years ago
I'm on mobile, clicked "Play now" where it said "Play now using your browser" and it brought me to the play store.

Downloaded the app, and tried to sign up, but everything was flashing -- I think it keeps flipping between screen sizes

mieses · 2 years ago
bgammon.org register and login pages do not allow copy/pasting of usernames and passwords. i'd love to play but that's kind of annoying.
swebob · 2 years ago
Agree, terrible security not being able to fill the form using a pw manager.