Show HN: Multiplayer Demo Built with Elixir

  • This is awesome. I recently built a multiplayer Phoenix LiveView experience - https://internetfight.club - and in the process had the idea for a fully DB-reactive dev experience, seems like you scratched the itch first! Well done. I think this is the future of web development and I'm quite happy about it. That being said, I wonder how far you could get on ETS alone..

  • Oh wow- I’m a huge fan of Supabase and have loved using it in a few Sveltekit projects so far! I gotta ask- how straightforward would it be to power a collaborative code editor with this?

    I have a YJS powered collaborative Svelte REPL I built using y-monaco and y-webrtc, all ā€œserverlessā€ on Vercel using CFWorkers to connect/verify users. Supabase already houses the private REPL loading/saving/sharing features. Native Supabase CRDTs could be perfect for the next version of the app!

  • I want to add that each room is capped at five players. Whenever you go to https://multiplayer.dev, you're assigned to a room with the fewest players so that no one is alone for too long. If you feel stuck in a room try navigating back to https://multiplayer.dev.

  • I love the direction Supabase is taking; finding the building blocks of modern applications (database, auth, functions, presence, realtime subscriptions), making them easy to use, and then sharing the source code. I’ve learned a ton just from cruising around supabase GitHub.

    Can you say which of these new components will be open sourced? There are some other features (e.g. function hooks) that are also closed-source at the moment. Is Supabase heading for an ā€œopen coreā€ model?

  • Trying to run the demo I get a blank loading page on my nextjs app

    ```realtime-realtime-1 | Transport: :websocket realtime-realtime-1 | Serializer: Phoenix.Socket.V1.JSONSerializer realtime-realtime-1 | Parameters: %{"apikey" => "nokey", "vsn" => "1.0.0"} realtime-realtime-1 | 2022-04-11 22:30:17.543 [warn] Ignoring unmatched topic "room:" in RealtimeWeb.UserSocket realtime-realtime-1 | 2022-04-11 22:30:17.556 [warn] Ignoring unmatched topic "room:NAejZl5PKVbAwUsxCucM-" in RealtimeWeb.UserSocket realtime-realtime-1 | 2022-04-11 22:31:11.144 [warn] Ignoring unmatched topic "room:" in RealtimeWeb.UserSocket realtime-realtime-1 | 2022-04-11 22:31:11.166 [warn] Ignoring unmatched topic "room:jQCdG-h3NT8nFVk7BpCAc" in RealtimeWeb.UserSocket ``` Any idea what I might be missing?

  • If I understand this correctly, it's basically transmitting database changes over a websocket? If so, how does that work re: performance when it comes to something like live cursor positions?

    Writing to the DB every 50ms for each cursor on the screen doesn't seem great for performance...or am I missing something?

  • Supabase developer here -- I'm excited to use this myself!

  • This is amazing, and every day my excitement for Supabase grows. What would be the best way to build a multi-region cluster in Supabase?

  • This is great. Do you need to be cautious of overloading your Supabase database and impacting performance with heavy use of multiplayer?

  • Since you already have cursors, make it into a game of catch by showing small explosions when cursors collide :D

  • Very interesting, I can see a whole raft of applications for this tech that are outside of the game scene, various collaboration tools use very similar tech under the hood and this would be a very nice way to abstract some of that out and to lower the bar to launch collaborative applications.

  • Nice job, but the demo rendered extremely weird on my mobile device. Some weird jankiness forced half the site off screen. Hard to see what's happening.

  • I'd recommend removing the chat feature to make this demo (much) more safe-for-work.

    Edit: Or, restrict it to pre-built messages.

  • Neat demo. What are the scaling limitations?

  • Why use a backend heavy broadcast mechanism when you can just use webrtc data channels and communicate directly among users?