Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NIP-64: Chess (Portable Game Notation) #1094

Merged
merged 5 commits into from
Aug 12, 2024

Conversation

theborakompanioni
Copy link
Contributor

@theborakompanioni theborakompanioni commented Feb 28, 2024

NIP-64

Reserving kind := 64 for notes representing chess games in PGN format.

NIP-64: https://github.com/theborakompanioni/nips/blob/nip-64/64.md
Website: https://jesterui.github.io/nip64/

(Former discussion: #212)

@vitorpamplona
Copy link
Collaborator

vitorpamplona commented Feb 28, 2024

Looks good.

I would change the title to include Chess, like Chess Game Representation, just to avoid thinking that this is a standard for any type of game.

@staab
Copy link
Member

staab commented Feb 28, 2024

Is this what jester uses? If so, I have no objection to this.

@theborakompanioni theborakompanioni changed the title NIP-64: Portable Game Notation NIP-64: Chess (Portable Game Notation) Feb 29, 2024
@theborakompanioni
Copy link
Contributor Author

Is this what jester uses? If so, I have no objection to this.

It's planned that jester publishes all games in the form that can be agreed upon here.
Currently, jesters game mechanics are not optimal - it was written at a time when parameterized replaceable events did not exist yet. Currently it uses kind := 30 and publishes every chess move as distinct event - this is quite wasteful and should definitely be changed in upcoming iterations.

Generally, jester will obey whatever we can come up with here. But keep in mind, that PGN is a notation for "finished" games and the NIP does not contain any references to actual game mechanics on purpose.

@theborakompanioni
Copy link
Contributor Author

theborakompanioni commented Mar 8, 2024

Demo website is now live: https://jesterui.github.io/nip64/

Undrafting! 🎉

@theborakompanioni theborakompanioni marked this pull request as ready for review March 8, 2024 12:22
@theborakompanioni
Copy link
Contributor Author

@vitorpamplona @staab Any feedback is highly appreciated. Is there anything I can do to assist the review process? 🙏

Copy link
Member

@staab staab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@theborakompanioni
Copy link
Contributor Author

Please let me know if any more information or feedback is required. 🙏

@theborakompanioni
Copy link
Contributor Author

Rebased onto 85df9b0.
What do you think @staab?
Is there anything left to do in order to progress this further?
Any hints and feedback is highly appreciated 🙏

@dni
Copy link

dni commented May 27, 2024

⭐ 🚀

@vitorpamplona
Copy link
Collaborator

Is there anything left to do in order to progress this further?

To merge, there is a need for 2v lients that implement this NIP

@theborakompanioni
Copy link
Contributor Author

theborakompanioni commented May 27, 2024

Is there anything left to do in order to progress this further?

To merge, there is a need for 2v lients that implement this NIP

Understood.
(Just for me to better comprehend.. Is there a document where I can read more info regarding this requirement or is this documented somewhere? This is just me wondering how I would have known such information beforehand.) Edit: Directly in the readme, oh my.

Does the NIP website and JesterUI count as clients?
Edit2: I will open issues on Primal, njump and nostrudel and generally see what I can do 👍

@fiatjaf
Copy link
Member

fiatjaf commented May 27, 2024

@hsjoberg

@arthurfranca
Copy link
Contributor

To merge, there is a need for 2v lients that implement this NIP

Imo such niche NIP should become a NUD? The kind number could be marked on this repo as reserverd for the NUD.

@theborakompanioni
Copy link
Contributor Author

To merge, there is a need for 2v lients that implement this NIP

Imo such niche NIP should become a NUD? The kind number could be marked on this repo as reserverd for the NUD.

I know what you mean. As a background: I have been asked by @fiatjaf to provide a NIP for this some long time ago and only had time at the beginning of this year 🤦 . So maybe this is already obsolete, and I can quite understand the benefits and drawbacks of this being an own NIP. @fiatjaf Please excuse and forgive me for taking so long to be polished and finished. Do whatever feels best!

@arthurfranca
Copy link
Contributor

I mean, this chess spec is great and all, but the NIP numbers will be capped at 99 or something I heard.

One drawback of the NUD approach is there is no guarantee relays will keep the NUD article forever (or longer than github would keep a NIP around xD)

@theborakompanioni
Copy link
Contributor Author

theborakompanioni commented May 27, 2024

I mean, this chess spec is great and all, but the NIP numbers will be capped at 99 or something I heard.

One drawback of the NUD approach is there is no guarantee relays will keep the NUD article forever (or longer than github would keep a NIP around xD)

I understand. It is not in my interest to occupy any magic numbers.
I just did my duty and have done what I promised to do. Wherever this is taken and whatever happens – I support the decision.

(Chess has a wide audience and might spark interest for nostr – but this should not by any means be a justification for it to be an own NIP.)

@fiatjaf
Copy link
Member

fiatjaf commented May 27, 2024

Thank you for writing this NIP @theborakompanioni.

I'm for merging this.

If for nothing else, because every decentralized protocol should be able to play chess (there is chess on ActivityPub and chess on SSB, for example), and the chess client was created in the early days of Nostr. Also chess is a very traditional and old game, surpassed only by Go and StarCraft.

If I remember correctly there was another chess client at the time. But we can keep this open indefinitely and wait for another implementation.

@ghost ghost mentioned this pull request Jun 2, 2024
@AsaiToshiya
Copy link
Collaborator

I have implemented to display the chess in Brostr, but to merge this PR, I think we need to implement a client that publishes PGN notes.

@theborakompanioni
Copy link
Contributor Author

I have implemented to display the chess in Brostr, but to merge this PR, I think we need to implement a client that publishes PGN notes.

e.g. there is https://njump.me/nevent1qqszyvyhx69weu5mvjn65nyrdeapsjd2c0c0tjpwms02kh3gup43nvsprpmhxue69uhhyetvv9ujumn0wdmksetjv5hxxmmdqgsz62azh3jsc0lcwdvjpq5qfjck3rq36lk59szc9g0qdldyvu7ehyqe43sa6

But I can also add the ability to publish PGN events to the NIP-64 website in the meantime–would that be feasible?

@AsaiToshiya
Copy link
Collaborator

Sounds good, but I'm not sure it is feasible. @fiatjaf what do you think?

@fiatjaf
Copy link
Member

fiatjaf commented Jul 10, 2024

I think we can merge it already. Should I?

How can we view that game on Brostr?

@AsaiToshiya
Copy link
Collaborator

Sorry, the new version is not released yet, but will be very soon.

@AsaiToshiya
Copy link
Collaborator

@fiatjaf I just released a new version of Brostr. You can view that game here.

@theborakompanioni
Copy link
Contributor Author

Resolved conflicts and rebased onto current master (744bce8). 🙏

@fiatjaf fiatjaf merged commit ed15e31 into nostr-protocol:master Aug 12, 2024
@AsaiToshiya
Copy link
Collaborator

Nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants