4 ms·
Show HN: Multiplayer Backgammon Game Written in JavaScript
- hoytech 9y agoNice work. I've played the Bulgarian games before but I always forget the rules for the last 2. Generally speaking for an international audience I'd suggest defaulting to standard international rules. This is basically the same as your "General" except you'll need to add a doubling cube and a few other little things (ie Jacoby rule). The game is really incomplete without the cube. For a truly multiplayer experience, you can implement chouette rules. This is the most common way to play casually in bars/clubs (at least in North America), and is IMO pretty much the most fun you can possibly have at a board game. :) To solve the problem of waiting around for an opponent, you can hook up an AI such as GNU BG. Backgammon has a long tradition of AI development going back at least to Hans Berliner’s BKG program in the 70s. Cheers!
- dotnetplayer 9y agoThanks! Will change the default to classic international rule and keep variants as a second option (eg. under some kind of a country flag). Have not yet thought on rules with more than two players, but I will consider it. Having an AI will be nice, but I do not have an idea yet how to integrate it safely (to avoid cheating) in the client. Did not want to add AI in the server to avoid increase in server load/costs. By the way rules written by other players/developers, with variants of them as known in their country, are welcome. I will consider adding those rules to the official demo.
- wimagguc 9y agoSome sort of a timeout or feedback would be great I guess. I'm waiting for my opponent for well over a minute now, and I guess they're gone. (But are they? What if I close this now and they win!)
- dotnetplayer 9y agoAgreed, a timeout is a must. Thanks for feedback!
- rmetzler 9y agoI waited for any game to start and it was Gul bara game, which I didn't know the rules of. I never saw that many doublets in a game. I also agree that it's tedious to wait for opponents and I think it would be great to hear a sound played when a game starts. I suspect some moves aren't transmitted correctly, but I'm not certain. Is there a way to select the order of dices in the general rule? Sometimes you roll 5-4 and 4-5 would be a good move with a specific piece but 5-4 is blocked.
- dotnetplayer 9y agoThanks for feedback! I should add a link to the rules for the current game. Playing a sound is a good idea. The server has few players for now, hence the waiting time. But you can always invite a friend. I will advertise it more as soon as it gets highly available/scalable. You can change the order of dice by clicking on the dice. Another way is to use left/right mouse button. Left button plays the larger die, right button plays the smaller die. I guess a short help page will be useful.
- rmetzler 9y agoAnother small UI glitch: as a black player you don't know when it's your first turn. You see the dice, but it's not clear that you have to wait for white to make a move.
- amorphid 9y agoI like it. A couple suggestions: - show the opponent's dice roll - show pieces taken off the board (or where they will be put). Good work!
- dotnetplayer 9y agoThanks! Didn't the opponent's dice roll show in your game? It should be visible for the time before the opponent presses the Confirm button. I have not decided where to place the pieces that are off the board, without reducing the playable space, but will surely find them a place.
- amorphid 9y agoWhat might have happened is the opponent left on their 2nd turn before they rolled they dice. I honestly didn't notice on the first turn. A different option could be showing "waiting for opponent to roll". I hadn't thought about writing a backgammon game before, and it'd pretty interesting to think about all of the work that is necessary to create something polished. The mechanics of making the core rules would probably be the easier part. Creating a seamless UI/UX to accommodate online players from all over gets complicated pretty fast. If you're planning on using this as a portfolio piece to impress potential employers, I recommend writing down some of the things you could have done, but chose not to implement... "I thought about adding drag and drop functionality, but I kept it simple for the demo, because PC users did X, touchscreen users did Y, and I would have needed to do A, B, and C to do it well, but didn't have time to work on it."
- shaggyfrog 9y agoNice work! Suggestions: - Allow choosing length of match - Auto-play (any/all) forced moves (perhaps still requiring the forced player click Confirm when there are 0 or 1 legal moves) Not sure if you are or aren't (didn't see it in my game): show doubling cube in neutral position at start, and possession/face when offered to or owned by one player Show quick "emoji" style reactions so you can send e.g. a :P when someone dances on the bar several times in a row?
- dotnetplayer 9y agoThank you! Choosing match length seems to be a must have. I will probably postpone auto-play for now. I want the game to be as close as possible to playing with a friend on a real board. Automation would spoil that a bit. But having emojis goes in todo list.
- darepublic 9y agoYou should have option to play ai