Hunterafi

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

codeanpeace

Modules within Phoenix to get familiar with:

  • 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!

Asd

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

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 :innocent:

Where Next?

Popular in Questions Top

senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
marius95
Hello everyone, I try to use an Javascript Event Handler in my root.html.leex file. Therefore I created a function in the app.js file: ...
New
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
qwerescape
Is there a way to get the call stack or stack trace at any point in the code? Not from exceptions, but an expression that returns how the...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
komlanvi
Hi everyone, I was playing with phoenix liveView but I run into an issue. I have a form and want to validate each input text when the te...
New
PeterCarter
There are pre-rolled solutions for other frameworks that do work. However, Phoenix does not seem to have these. Have people had good expe...
New
jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New

Other popular topics Top

axelson
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!) This post collects co...
239 48475 226
New
sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
985 43657 311
New
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
fayddelight
I tried installing elixir 1.11.2 erlang 23.3.4 via asdf in my zsh shell. Enabled the versions locally and globally. When I list them ...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
klo
Got a question about when to concat vs. prepending items to list then reversing to achieve appending. So i know lists boil down to [1 | ...
New
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New
sergio
Kind of like when jquery came out, it was super necessary. Existing drag and drop libraries have a bunch of baggage to support old browse...
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New

We're in Beta

About us Mission Statement