Live data from Hacker News

What happens when you make a move in lichess.org?

davidreis.me

111–120 of 162 posts

Re: What happens when you make a move in lichess.org?

#111

- "While these moves could be calculated client-side, providing them server-side ensures consistency - especially for complex or esoteric chess variants - and optimizes performance on clients with limited processing capabilities or energy restrictions." Just a wild guess: might be intended to lower the implementation barrier for new open-source software clients on new platforms, and/or preempt them from implementing…

From what I remember, one of the main reason also was to avoid bloating the JS on the game page. That page is kept especially slim to maximize performance and load times for low-powered devices.

Great!

A bit of surprise consideration … is that even common in these days of overfancy web sites.

Re: What happens when you make a move in lichess.org?

#112
post #101

Earlier quoted context omitted.

I guess my naive frustration comes from crazy fps games tracking things so precisely and yet somehow Chess.com can’t handle a turn based game?! Honestly. I do recognize that fps games utilize predictive algorithms and planning to estimate future player positions but still, turn based networking with 100ms accuracy should be a solved problem

Yeah honestly I agree like it would be nice if they switched to WebRTC or UDP.

So you need to send a few bytes of information every few seconds, but you want to spam the network with UDP packets containing those few bytes?

Re: What happens when you make a move in lichess.org?

#113
post #60

I wish this discussed the timing arbitration of each move. Based on the packet information (if that is correct & complete) then the timing is done entirely on the clients. However, they show the time in seconds which can't be right so I am curious how accurate this packet schema is (or if those are float values). Regardless, one thing I find maddening about chess.com is the time architecture of the game. I haven't se…

> it feels like the SERVER is tracking the time TBH this is what I expected for all online chess. How else to reconcile the two players' differing clocks and also prevent client-side cheating?

> How else to reconcile the two players' differing clocks and also prevent client-side cheating?

Is there a point in preventing cheating, really? I can just make a bot...

Re: What happens when you make a move in lichess.org?

#114

Earlier quoted context omitted.

Like? Ad-free, compute intensive, non-CRUD, massively scaled, complex cheat moderation, infinite puzzles/analysis, educational (studies/tactics/openings explorer), etc. All this for free. I'm curious what's the best website in your opinion

I could elaborate, but rather, let me ask you this instead since its more relevant. What is the point of responding with any legitimate criticism when any potentially negative sentiment however mild, upfront, expressing disagreement, gets downvoted to the point where the mechanics of the website squelches the person and silences them (by purposeful intent). Can you ever have any legitimate intelligent conversation af…

It seems like your negative sentiment above has been downvoted a lot, and I understand your frustration. Your comment was indeed not offensive.

But I believe it was just that: a negative sentiment. Not exactly a "constructive, intelligent criticism". And when you go there, the reality is that people will vote to reflect their own opinion. If you say "This project is so amazing!" and get a ton of upvotes, it does not mean that your comment is super useful; just that many people agree. Similarly, if you say "Naah, it sucks" and get a ton of downvotes, it means that many people disagree. Not that they want to silent you.

Now try an actual constructive criticism: you may get downvotes (that's how it is because people are emotional beings), but probably upvotes as well if you bring interesting insights.

> There is only the possibility of harm by continuing any discussion under these circumstances.

That's fair. I think one mistake there is that you should have started with a constructive criticism rather than an admittedly polite "naaaah, I think it sucks".

Re: What happens when you make a move in lichess.org?

#115
post #112
post #101

Earlier quoted context omitted.

Yeah honestly I agree like it would be nice if they switched to WebRTC or UDP.

So you need to send a few bytes of information every few seconds, but you want to spam the network with UDP packets containing those few bytes?

Every single online multiplayer game that cares about latency reimplements a subset of HTTP over UDP.

Re: What happens when you make a move in lichess.org?

#116
post #11

20 years later I still think "female lich" whenever I see the word lichess, even though I know it's li chess.

One day I, if I find the time for the pun, i really want to sculpt a chess set where the black pieces are all undead necromancer wizards and the white pieces are all asian fruits with rough-skin. That way we can have a game of lychees vs liches on lichess.

Re: What happens when you make a move in lichess.org?

#117
post #112
post #101

Earlier quoted context omitted.

Yeah honestly I agree like it would be nice if they switched to WebRTC or UDP.

So you need to send a few bytes of information every few seconds, but you want to spam the network with UDP packets containing those few bytes?

Sure; why not? If I can stream videos on that same network for entertainment, or play another online, multiplayer game, why not use UDP if it gives a better user experience? It's not like UDP transport of those bytes is significantly worse network-wise and certainly lighter weight than those other alternatives.

Re: What happens when you make a move in lichess.org?

#118
post #115
post #112

Earlier quoted context omitted.

So you need to send a few bytes of information every few seconds, but you want to spam the network with UDP packets containing those few bytes?

Every single online multiplayer game that cares about latency reimplements a subset of HTTP over UDP.

Huh, that's not what I would expect at all. If you are having custom network protocols anyway, why deal with all the overhead that even a subset of HTTP brings? You might as well make an entirely new protocol at that point.

Re: What happens when you make a move in lichess.org?

#119
post #9

I wish the article explained how it dealt with message loss from the at-most-once redis pub/sub channel

Indeed, it does deal with the message loss. I was momentarily confused because in my many thousands of bullet chess games on Lichess I haven't had much of any message loss that can be attributed to Lichess's servers (but plenty when my Internet connection is down or unstable). I will have to take a look, because whatever it's doing, it works very well!

The at-most-once delivery could be an issue if lichess's backend services (lila or lila-ws) crash. Presumably this a rare enough occurrence that message loss is more of a theoretical concern.

Re: What happens when you make a move in lichess.org?

#120

I wish this discussed the timing arbitration of each move. Based on the packet information (if that is correct & complete) then the timing is done entirely on the clients. However, they show the time in seconds which can't be right so I am curious how accurate this packet schema is (or if those are float values). Regardless, one thing I find maddening about chess.com is the time architecture of the game. I haven't se…

What I'd love is for my pre-moves to be sent to the server immediately so I don't time out when I pre-moved.

That would introduce other issues I think. Since premove are cancellable/changeable, what happen if you changed at the very last moment but due to delay it did not reached the server in time?
Post reply on HN