Hunterafi
Any tips on creating a multi-user poker site?
Hello Everyone,
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.
I’ve deployed with LiveView and Fly.io.
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.
Most Liked
codeanpeace
Modules within Phoenix to get familiar with:
Phoenix.Presencefor tracking players/commentators/watchersPhoenix.Channelsfor bi-directional client <—> app communication which LiveView builds on top ofPhoenix.PubSubfor 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!
Asd
Yeah, my tip is: don’t create gambling website. At least make sure that there is no conversion between game currency and real money
Samjowen
For this kind of problem where you have “tables” or “rooms” in a game, you will often want to reach for the Dynamic Supervisor.
Docs here: DynamicSupervisor — Elixir v1.20.2
Hopefully that should serve as some inspiration for you ![]()
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #hex









