Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The post writes about multiplayer, especially at the end. In games, but also in basically every other application, there is a state known to players (the cards in hand, the map around, etc) and a state that must be secret (the cards of the other players, the rest of the map, etc.) The server with the knowledge of all the state can be a client like the others but it has access to the real database. It can have the code to resolve interactions between players or that code runs locally to players too.

In complex turn based games there is a lot to do locally before sending the move to the server. Think about moving tens of units on a map. The problem here is of there are unknown parts of the map to explore. You need a connection to the server. However anything else will run faster because it doesn't have to hit the network and a round trip to the database on the server.

The post writes about Figma being developed local first. You don't have to hit the network while drawing, if you don't have to collaborate with someone on a shared document. Then you send the state to the server and your private state becomes known to all the other coworkers.



I think this article is focused on "multiplayer" in the contemporary non-game sense (which I still find weird).

However, I think an interesting thought experiment is a system that DOES share that secret state between players in a way where some facts are verifiable, but others are not. For example, when playing cards, I have the state of your hand in such a way that I can verify the card you played is valid, but cannot reasonably see (or find out) your hand.


I just want to say that I spent a long time re-reading your comment to understand your criticism before I saw that you're actually complimenting this idea, lol. I think that's a great way to highlight the strength of this approach: adding access control to such an app is about as easy as adding it to a simple DB.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: