34
submitted 6 months ago* (last edited 6 months ago) by hankskyjames777@kbin.run to c/fediverse@lemmy.world
all 7 comments
sorted by: hot top controversial new old
[-] h3ndrik@feddit.de 15 points 6 months ago* (last edited 6 months ago)

Hmmh. Why ActivityPub? I mean I suppose it's alright as a standard for some turn based or slow trading game. But it's neither very efficient nor suited for realtime. And having long (and descriptive) JSON messages, queues, ... is baked in per design.

And it's not even interesting to a Mastodon user if player x sold y latinum to player z. So for lots of game logic we don't need messages in a common format that's federated to Mastodon, Lemmy, Peertube etc.

I think a nice and not too complicated coding challenge would be to design a world that spans multiple servers. Players could roam a world, go through some door or portal and the client seamlessly connects to the next server. So that part of the world (the other server instance) is behind that portal. That'd make sense from an in-game perspective and won't be that hard to implement. Basically it's just like any other game, just that the client auto-connects to servers with some internal logic and not just in the start menu. And ideally authentication would be federated. The new server could ask the player's home instance to authenticate them on entering the new instance.

[-] hankskyjames777@kbin.run 2 points 5 months ago* (last edited 5 months ago)

alright as a standard for some turn based or slow trading game neither very efficient nor suited for realtime

only in itself, it can be "temporarily solved" using an extension (like what Forgejo has for relations to Git, e.g. commits) for realtime, it could be something like how godot implements P2P multiplayer (over ICE/TURN/STUN) for federation between servers

[-] h3ndrik@feddit.de 3 points 5 months ago* (last edited 5 months ago)

I'm not sure if ActivityPub allows for an extension like that. And I mean if you open up a separate direct channel via TURN... It'll be incompatible with something like Mastodon anyways, so I then don't see a good reason for why to bother with the additional overhead of AP in the first place. I mean you could then just send the status updates in some efficient binary representation as data packets directly do the other players. So why use ActivityPub that needs to encode that in some JSON, send it to your home instance, which handles it, puts it in the outbox, sends HTTP POST requests to the inboxes of your teammates where it then needs to be retrieved by them... In my eyes it's just a very complicated and inefficient way of transferring the data and I really don't see any benefits at all.

So instead of extending AP and wrapping the game state updates into AP messages, I'd just send them out directly and skip AP altogether. That probably reduces the program code needed to be written from like 20 pages to 2 and makes the data arrive nearly instantly.

I suppose I could imagine ActivityPub being part of other things in a game, though. Just not the core mechanics... For example it could do the account system. Or achievements or some collectibles which can then be commented and liked by other players.

[-] NataliaTheDrowned2@kbin.run 3 points 5 months ago* (last edited 5 months ago)

The TURN channel could be used ONLY for live multiplayer interactions (and everything else that needs dynamic state updates), while everything else (e.g. game data, achievements, avatar data, other static things) would be in AP

[-] Wijnie@feddit.nl 7 points 6 months ago

Would be cool to see chess on the fediverse

[-] hankskyjames777@kbin.run 1 points 5 months ago* (last edited 5 months ago)

Im talking about 3D here (ik about the first lemmy link talking about slow games)

this post was submitted on 18 Jun 2024
34 points (100.0% liked)

Fediverse

28702 readers
183 users here now

A community to talk about the Fediverse and all it's related services using ActivityPub (Mastodon, Lemmy, KBin, etc).

If you wanted to get help with moderating your own community then head over to !moderators@lemmy.world!

Rules

Learn more at these websites: Join The Fediverse Wiki, Fediverse.info, Wikipedia Page, The Federation Info (Stats), FediDB (Stats), Sub Rehab (Reddit Migration), Search Lemmy

founded 2 years ago
MODERATORS