Is yjs good for real time multiplayer games

Hello,

im evaluating different libraries for the multiplayer of my real time rpg game.
i came across this project but i seems i cannot find definite opinion for or against it in real time multiplayer using yjs.

Can you give me some insight if this is the right library for me?

You could probably be able to sync game data with Yjs. However, since Yjs only allows either write or read-only mode for documents, you’ll probably have to make your own user-edit authorization logic. Using sub-documents is one way, but you have to ensure that incase editing one big “Game” doc, all users are just making edits to properties that they only can change. So you either have to break apart that Game into sub-documents, perhaps into “Players” with their own inventories and such, or just provide each player with their own document all together.

For really serious game though I’d advise just writing your own state updation logic.

You think yjs cant handle the traffic or is the implementation that will be troublesome?

Making a game is hard enough but having to maintain Yjs synchronization server is another hurdle. You could use some proprietary synchronization service or just do it yourself and focus on the game first. I have a hobby game project where I just use protobufs to send data between client and server. But if you’re just doing it for fun, sure why not.