News for hackers. Stuff that matters.
Re:Ask HN: Building a multiplayer, offline-capable app in 20... by stevenfabre on Wednesday November 16, 2022 @09:55AM (#33623994)
Hi Tim,

I'm a bit biased but https://liveblocks.io is great for that :)

If you know how to use React, that's pretty much all you need to know. It also includes some nice hooks to enable things like multiplayer undo/redo and live cursors.

The team even put a couple of interactive blog posts about that that you might find interesting: - https://liveblocks.io/blog/how-to-build-undo-redo-in-a-multi... - https://liveblocks.io/blog/how-to-animate-multiplayer-cursor...

Happy to answer any questions you may have!

Re:Ask HN: Building a multiplayer, offline-capable app in 20... by tim_sw on Wednesday November 16, 2022 @10:43AM (#33624963)
Thank you! Will take a look
Re:Ask HN: Building a multiplayer, offline-capable app in 20... by yawnxyz on Wednesday November 16, 2022 @03:17PM (#33629891)
I love this! But my entire stack is in Svelte / Sveltekit — will there be a Svelte version or a vanilla JS version we could use?
Re:Ask HN: Building a multiplayer, offline-capable app in 20... by floflow on Wednesday November 16, 2022 @04:09PM (#33630644)
Yes there is! You can use @liveblocks/client: https://liveblocks.io/docs/api-reference/liveblocks-client

There's also a tutorial for getting started here: https://liveblocks.io/docs/get-started/javascript

Enjoy :)