You can now challenge someone to game of #chess over toots! https://castling.club/ 💪

It's actually a standalone server in the #fediverse, implementing #activitypub all by itself. 😃

castling.club

@kosinus This is amazing! Who wants to play against me (noob level)?

@king challenge @hinterwaeldler

Don't worry, I'm quite the newbie myself. 😇

@hinterwaeldler Oh, haha, just remembered, it will never respond mid-thread unless it's an existing game. D'oh!
@kosinus
Do you need a castling.club account, or can you play from other instances?
@DialMforMara You can play from anywhere! (In fact, there are no accounts on castling.club, it’s kind of an instance with just the bot.)

Well, thank you @kosinus. ActivityPub + Chess looks like the perfect combination to destabilize my busy life. Released in August, that won't help either.

😜 This was my way to say Big Thank You and congratulations for this brilliant idea. Although it is true that I will have to keep it at bay!

@kosinus there is something similar for #ssb as well afaik.
@grainloom Forgive me, I don't know what SSB is! (Except for Smash Bros? That'd be hilarious. Like old Batman cartoons, but over toots: *KAPOW*BAM*CRASH*) 😄

Spielt jemand Schach? Das ist ja cool

@kosinus

@kosinus i tried challenging someone but nothing happened. Maybe i did something wrong?

https://fuckonthefirst.date/objects/b99e2225-3e63-42bf-a4c8-c4032a3e0b6c

@pea Sorry about that! It appears Pleroma does things somewhat differently.

I made some changes just now. Could you try again?

@pea @Kat Ah, no, it should be mere seconds. Sorry friends! I thought I fixed everything, but wasn't able to test it fully, because my local testing Pleroma is only half working. Will dive in and get back to you in a bit!
@kosinus @Kat no problem, i also poke around with fedi software myself and know it can be a pain 😛
:sparkles_orange:​ The Pumpkin Kat :dizzy_orange: (@[email protected])

34.2K Toots, 232 Following, 238 Followers · Kat She/Her Better than Gregtech backup accounts: @[email protected], @[email protected], @[email protected] poly, not searching

@kosinus How hard would it be to implement Go as well?

@CoronaCoreanici Haha, I don't know! I've never played Go myself.

I use a library made by someone else for the chess ruleset: https://github.com/jhlywa/chess.js

Other than that, castling.club implements all the fediverse stuff, message formatting, drawing the board, and the detail pages you see at castling.club itself.

jhlywa/chess.js

chess.js - A Javascript chess library for chess move generation/validation, piece placement/movement, and check/checkmate/draw detection

@kosinus
Oh! Cool. I'd love to play @lostnbronx or @klaatu a game of chess online like this.

Not that I'd be able to make more than one or two moves a day, but it would be cool.

@kosinus predicting people just using the highest A.I. setting from Windows Chess against each other.
@alice I wouldn’t mind if someone wrote a bot you could challenge. Though two fully automated players against each other should probably be stopped. 😉
@kosinus Fascinating. There must be a whole world of games possible over #activitypub.
@neilgall This worked a lot better than I expected! Someone also mentioned Go, but I’ve never played it. 🙂
@kosinus I gotta try this out, so cool!
@kosinus This is cool, is there source for it? It's reminding me of old Mafia bots on IRC
@aeb No, but I’m considering open sourcing it! Just sitting on that decision for a bit. 😀

@kosinus Wow!

Not expecting anything from you, just throwing out a random idea:

Would be cool to have a privkey in a browser addon, and sign your mastobuddies' keys, and then play e2e encrypted chess with each other. Just because we can. You could use your existing social network a la PGP WoT for ranking, and view it from your personal network's perspective.

@tim That’s wild, haha. Sounds like it would need a client impl of chess, though? Or keep the bot in the loop for everything. I wouldn’t be surprised if this was already done over email. 🙂
@kosinus Probably would require client impl, yes. Perhaps it could run in the browser as well, through browserify (for example), and use Mastodon to propagate messages (if max. characters doesn't limit this).
@kosinus Curious, I can't tell @[email protected] on the fediverse 😢
@Sebbaz Sorry about that. I can’t really look into it right now, but will take a look at the logs soon. It should in general work fine with Mastodon, but I’ve heard of specific instances fail before. 😕

@kosinus Hey ! Oh, in fact it was an instance problem.

The august, 5th there was a activitypub push problem. The bot King couldn't reply, it doesn"t receive my request 🐰

Very good job !

@Sebbaz Cool, thanks!

Might be cool to add a public federation log, so people can debug issues themselves. 😀

@kosinus just saw this on lobste.rs. It's an incredible idea!

I was thinking today that I wanted to make something interactive on the #fediverse and its serendipitous that I stumbled upon this!

@carbontwelve Thanks, and that's awesome! Do it, do it, do it! Do you need ideas? 😉
@kosinus haha ideas would be nice. I usually find the ones I come up with have already been implemented.

@carbontwelve The ideas I’ve seen mentioned are mostly games.

Someone mentioned Go (the board game), but probably any 1v1 turn-based strategy can work the same way. (Reversi, uhm, others? 😛)

More than 2p would be a step up and bring some more challenges. Monopoly?

Really cool, but vague idea is doing RPG stuff: https://mastodon.social/web/statuses/100634276218935422

@carbontwelve
Mind that castling.club is a federated server, but bots can also be simple clients. If the interaction is what you care about, that’s probably easier! The federation stuff was just part of my personal goals.

@kosinus I have just day-dreamed about writing a MMO-esk table top simulation as a federated server. It would be cool but also a massive project.

This is something that I would like to dip my toes into so I think I will begin by doing a checkers version of your chess example as a way of getting my head around how things work and then go from there.

@kosinus you know what would be cool, a federated MMO table top game... with each server being a realm that others can visit/trade/war with...
@carbontwelve That sounds tricky, because each server might have different versions / code, thus different rules? The only systems I know of that tackle that issue are *gasp* blockchains. 😄
@kosinus I'd like to know the license of this software. I can't seem to find it.
@buttle There’s a source code link at the bottom of the homepage. A license file is included.

@kosinus whoa! this is so cool 😁

Is there any public thread of an actual match? I'd like to take a look 👀

Or if not, I guess I can just start a match of my own 🤪 ♟️

@badrihippo Games and the bots msgs are essentially public, but not necessarily users msgs / replies to the bot. Games >5 turns are listed on https://castling.club (scroll down) and you can see the current state, individual turns, etc. 🙂