Animated game PNGs of select moves

I’ve always wanted to fly out of the galactic plane and see it from outside :laughing:

3 Likes

>> Implying that’s a bad thing.

2 Likes

if gif works with 1 image of board and then just layers of stones with transparent background added, size cannot be big. I optimized like this a lot of memes.

1 Like

1 Like

original png file size 90 kb

gif file size : 45 kb
apng b

6 Likes

Hm, yeah that’s weird, if I use another tool that gets the PNG size down to 24.31 KiB, I must not have some flag set right somewhere… or the gif/png encoder that I have access to sucks. (And 45KB is fine, what I was seeing with whatever settings I had was closer to 1MB for something that the png was doing in about 250KB)

5 Likes

bug: I tried to get the first frame only and edited link to from 0 to 0 and got animation of FULL game instead

1 Like

That’s a feature, not a bug!

5 Likes

proof of concept:

17 kb gif

opt

I didn’t use last move marker, but i got to move 60 instead of move 30
with clear algorithm (not manually) it possibly would be less than 15kb

4 Likes

Honestly I think we’ll need to sprawl out of the pilot cabin to other parts of the craft at this point.

5 Likes

Sorry to necro this, I just wanted to say that a really cool use-case of this is to set “from move” and “to move” to the same move and set speed to whatever, and it gives you a link to a still image of any move in the game. That link works perfectly in Discord, and you can manually adjust the game position by changing a single number in the link, which is a task that would probably be very easy to automate with a simple bot.

I’m no programmer and I periodically pick up Python then give up, but I think this is a task that even I could figure out how to do… I’mma give it a shot and report back :eyes:

8 Likes

So, it works. Really really well.

I spent a five-hour headache learning how to get the simplest possible Discord bot running using hikari-py lightbulb (remember I’m not a programmer; that bit would be a breeze for anybody who knows the first thing about Python I’m sure :joy:), but the actual OGS apng bit worked immediately and exactly as expected without finagling.

The way my bot works right now is you give it an OGS game ID, then you give it a move number and it spits out an image of that position.

Already practical, but extremely primitive and my execution is as crude as can be. Still, the proof of concept is there, and the creative applications aren’t hard to imagine. It takes basically no skill to do this much, and it wouldn’t take much more know-how to implement reactions for dynamic game navigation like the OSR used to have.

My discord server is filled with clever programmers and they helped me with troubleshooting the basic hikari stuff that I couldn’t figure out on my own, so I’m sure anybody with any expertise would be able to make something really cool with this.

6 Likes

Sorry, what should happen in the screenshot?

The first image is move 0 of a game; then I asked it to show move 2. You can use this to jump to any move in the game. It might not be clear why I find this so cool, unless you’re familiar with Discord. Sharing Go content on that platform has never been convenient.

This is a crude example where the bot is spitting out a new image for each move, but a more elegant version would have the bot edit its own message and update the image instead of pumping out new ones for each command.

3 Likes

Yes you got it, I am not familiar with discord :blush:

1 Like