First complete (solitaire) #Machiavelli game here on the #Fediverse, played on my experimenal bot:
#machiavelli #fediverse #cards #cardgames
One of the weird things about the presentation by the #Machiavelli bot is that the suits are posted using their Unicode codepoint, but apparently #Mastodon is converting that into :hearts: :diamonds: :clubs: :spades:, which is part of the reason why they are so clearly visible (and in color), in contrast to the Unicode *card* codepoints, which are left unchanged. Does anybody know at which stage #Mastodon does this conversion?
#askFedi
#machiavelli #mastodon #askfedi
OK seriously. The #latency is unbearable. This is going to be the insurmountable issue with the #Machiavelli bot. Over 3 minutes for the reply to federate back. I guess playing will be very … relaxed.
OK I'm going to start a new game of #Machiavelli to test the bot. Everybody is free to join in (reply 'join game' to any of the posts in the thread) at any time, even while the game is ongoing (good for testing!)
@fedichiavelli machiavelli create ; join game ; machiavelli start
Wow the official #Mastodon #Android app sucks *hard*. @Azalais is helping me test my #Machiavelli game management bot and there's apparently no way to see on screen at the same time the reply combo the bot sends (public message with table layout + direct message with player cards).
#mastodon #android #machiavelli
We've started doing some tests with my #Machiavelli game management #bot (see https://botsin.space/@fedichiavelli/111042872757965668 and https://botsin.space/@fedichiavelli/111042695379007834 for two test games).
I've made an effort to minimize the “noise” produced by the bot, but it's still pretty verbose. Part of the issue as usual is that even unlisted messages ultimately are visible to followers, so maybe I should adopt the @pluralistic strategy of adding a CW to collapse them at least?
I'm not entirely sure if I'll develop this UI much further, even though I wouldn't mind setting up a website not unlike https://lichess.org but for #Machiavelli. I think I'll add a few more features that I believe may be useful also for the #Fediverse #bot, and finally get to the actual bot.
Updates to the #machiavelli bot have been slower these days, what with the end of summer vacation and my own fascination with the web (HTML+JS) interface to the bot. I'm honestly surprised by how relatively easily I've managed to set up a rather functional interface that allows access to most of the card/group manipulation features of the underlying engine. it has also exposed a number of small kinks that need some ironing out.
So, apparently when playing an ace of diamonds on my web frontend for the #Machiavelli bot, the move gets blocked by the ad blocker, because it POSTs something like play/AD/14
Aside from the drag & drop issue, trying to support mobile for my web frontend to the #Machiavelli #bot is a whole new mess. Screen estate is at a premium, but towards the end of a game there's going to be a lot of card groups on the table, so that making them all visible while still allowing interaction with each individual card in it is … nontrivial. At the very least there needs to be a way to zoom in and out, and possibly also to rearrange the groups on the table to make interaction easier.
On the upside, the bot structure is clean enough that I was able to build a web interface to the game engine in just a couple of hours. The components are just a trivial web server in #Python that serves a couple of static files and converts POST requests to bot commands, an #HTML “template” that displays the table and use cards and #JavaScript client code to convert user interactions to appropriate POSTs, and the responses to HTML updates.
#python #html #javascript #machiavelli #bot #gamedev #webdev
#gamedev log for the #Machiavelli #bot: I've completed the overhaul of message reaction system, and taken the opportunity to fix a few inconsistencies and even a couple of bugs. I've been thinking about introducing a coalescing step so that reactions of the same kind are only output once —for example, there's not need to respond with multiple intermediate table updates, only the final state is necessary. This would allow users to play multiple sets in a single command without flooding.
One more step I have to do before finally getting to work on the actual #Mastodon backend for my #Machiavelli #game #bot is decouple the whole messaging system from the game logic. This is technical debt accrued from the original #IRC bot plugin, where for simplicity the class handling the logic sent public and private messages to update users about the game status.
#mastodon #machiavelli #game #bot #irc
The natural place for it would be botsin.space, but as bots go the #Machiavelli one is a bit atypical: during matches, I expect traffic to be more frequent that for other bots, even though I'm working on minimizing the amounts of messages exchanged. There's also the issue of the message limit, as I'm not 100% that a single table description would always fit in 500 characters.
I've pushed today's work on my #Machiavelli game managing #bot to the repository
https://codeberg.org/Oblomov/machiavelli-fedi-bot
It's still not “fedi ready” (can only be played on console and on LAN for testing), but it's getting there.
I'm going out this evening so probably no more progress today —and time will get even shorter in the coming days.
Still, once the infrastructure is more refined, it may be ready for testing, at which point the obvious question is “where”.
For those looking for a deeper historical cut...
Putin may have taken a page from Cesare Borgia with Prigozhin playing the role of Ramiro de Lorca #machiavelli
It turns out that the issue wasn't with the socket handling but with the client-side line-base wrapper. Fixed the issue, tested a full “multiplayer” LAN game between me and myself.
So if you pull
https://codeberg.org/Oblomov/machiavelli-fedi-bot
you can now play #Machiavelli at #LAN #party!
(Conditions apply. There is still a lot to clear up about the way messages and channels are handled, but if one of the participants starts with 'machiavelli create' you're set.)
I've found enough time today to set up the infrastructure for #LAN play for the #Machiavelli bot I'm writing. It's the opposite of refined, and barely functional. In particular, expect delivery issues for messages in multi-player at the moment because the server basically brute-force sending, which as anybody that has don any decent socket programming knows, it's the worst possible way to do things.
On an unrelated note, I hate socket programming.
Anyway, I've now completed a full “solitaire” game of the #Python reimplementation of my #Ruby #IRC #bot #Machiavelli plugin (hashtag galore yeah), so I believe the logic itself to be robust enough. The next step would be to start interfacing it with Mastodon. One thing that worries me is that the table can get rather largish, which may trip the character limit.
#python #ruby #irc #bot #machiavelli
So I've started porting my #Machiavelli #Ruby #IRC #bot #plugin (how's that for hashtags, uh?) to #Python, which has been a rather frustrating experience so far. I'm much more comfortable with Ruby than Python, but the languages are similar enough that the differences fall into that grating #uncannyValley experience. Also lots of bugs due to syntactical and behavioral differences (e.g. index() raising an exception instead of returning the null type). But things are moving forward.
#machiavelli #ruby #irc #bot #plugin #python #uncannyvalley