Been lurking here for a while and learning quite a lot I have been building a few different sites and wanted to extend my single player Poker site to head to head players, or even a poker room.
What are your suggestions for ways to do this. Know of any blogs that talk about this? I know this is open ended but I just wanted to get a discussion started and become part of the community.
Phoenix.Presence for tracking players/commentators/watchers
Phoenix.Channels for bi-directional client <—> app communication which LiveView builds on top of
Phoenix.PubSub for pub/sub which Channels builds on top of
There’s too many “build a chat room with Phoenix LiveView” posts to list, but they should help stitch together the concepts above. There’s even a handful of “shared canvas cursor tracking” posts if you want a non-text centric example of soft real time communication using Phoenix LiveView.
At a more foundational level, dive into OTP itself e.g. from a Process to a Genserver and how it empowers you to draw a line between runtime concerns and thought concerns as expressed in this oldie but a goodie post To spawn, or not to spawn? that walks through modeling blackjack in OTP as an example.
And on the experimental fun side, OTP makes it fun to prototype novel interactions in my experience. Take a look at the interaction design of couch party games for inspiration!
Thanks everyone. I already started with a GenServer and Lobby for making rooms. I have a blog that I keep track of the progress. Will get into PubSub and Channels once I have the framework for the all the interactions within the room.
Feel free to check it out if anyone wants to see the progress.
It’s live if anyone want to check it out. You will need at least 2 people and one logged in person. If the host leaves the room then the room is stopped. Any questions let me know.