Hey everyone! I recently wrote a blog post here about version 3.3.0, but now I wanted to tell you that synchronisation is here, which means that you can now both read and write to the Matrix API.
Why Matrix?
I have seen many people here who write games that only work locally in the browser. Understandably, because cross-browser multiplayer games require you to develop, deploy and maintain a back-end that connects Elm front-end clients as a middle man. Annoying, boring, and a lot of work!
Matrix is a back-end that allows (Elm) clients to exchange JSON objects. Using the Matrix SDK, you don’t need to worry about how the JSON objects are exchanged - they simply appear on the other users’ end. Just make sure they’re logged in, and then they’re good to go!
What’s new?
In version 3.3.0, you could only write JSON objects, and not read them. The new version 3.4.0, however, introduces the sync function, which lets you read the latest JSON objects sent by other Elm clients.
Here’s a rudimentary (and ugly!) example of people exchanging JSON objects through the Matrix SDK:
What’s next?
This library allows for much more, and I’d love to hear from you what you’d like to be able to build multiplayer games.
Please let me know what you think of it! Any feedback, suggestions or ideas are welcome here. Alternatively, you can reach out to the project on Matrix or follow the project on the Fediverse.