nips icon indicating copy to clipboard operation
nips copied to clipboard

NIP-64: Chess (Portable Game Notation)

Open theborakompanioni opened this issue 1 year ago • 18 comments

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: https://github.com/nostr-protocol/nips/pull/212)

theborakompanioni avatar Feb 28 '24 15:02 theborakompanioni

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.

vitorpamplona avatar Feb 28 '24 16:02 vitorpamplona

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

staab avatar Feb 28 '24 16:02 staab

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 avatar Feb 29 '24 17:02 theborakompanioni

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

Undrafting! :tada:

theborakompanioni avatar Mar 08 '24 12:03 theborakompanioni

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

theborakompanioni avatar Mar 21 '24 08:03 theborakompanioni

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

theborakompanioni avatar Apr 23 '24 11:04 theborakompanioni

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 :pray:

theborakompanioni avatar May 27 '24 10:05 theborakompanioni

:star: :rocket:

dni avatar May 27 '24 11:05 dni

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

vitorpamplona avatar May 27 '24 13:05 vitorpamplona

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 :+1:

theborakompanioni avatar May 27 '24 13:05 theborakompanioni

@hsjoberg

fiatjaf avatar May 27 '24 13:05 fiatjaf

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.

arthurfranca avatar May 27 '24 14:05 arthurfranca

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 :facepalm: . 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!

theborakompanioni avatar May 27 '24 14:05 theborakompanioni

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)

arthurfranca avatar May 27 '24 14:05 arthurfranca

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.)

theborakompanioni avatar May 27 '24 14:05 theborakompanioni

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.

fiatjaf avatar May 27 '24 16:05 fiatjaf

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.

AsaiToshiya avatar Jul 08 '24 14:07 AsaiToshiya

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?

theborakompanioni avatar Jul 08 '24 14:07 theborakompanioni

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

AsaiToshiya avatar Jul 10 '24 14:07 AsaiToshiya

I think we can merge it already. Should I?

How can we view that game on Brostr?

fiatjaf avatar Jul 10 '24 15:07 fiatjaf

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

AsaiToshiya avatar Jul 10 '24 16:07 AsaiToshiya

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

AsaiToshiya avatar Jul 12 '24 17:07 AsaiToshiya

Resolved conflicts and rebased onto current master (https://github.com/nostr-protocol/nips/commit/744bce8fcae0aca07b936b6662db635c8b4253dd). :pray:

theborakompanioni avatar Aug 12 '24 11:08 theborakompanioni

Nice!

AsaiToshiya avatar Aug 12 '24 14:08 AsaiToshiya