Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider making a listing of "public" rooms that anyone can join #49

Open
rbtying opened this issue Apr 12, 2020 · 3 comments
Open

Consider making a listing of "public" rooms that anyone can join #49

rbtying opened this issue Apr 12, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@rbtying
Copy link
Owner

rbtying commented Apr 12, 2020

When you create a game, you could mark the room as "public", so that it shows up on a listing prior to joining the room.

@rbtying rbtying added the enhancement New feature or request label Apr 12, 2020
@jimmyfang94
Copy link
Contributor

jimmyfang94 commented Feb 23, 2023

Working on this:

General plan is:

  • Add is_public to propagated state
  • Add action SetIsPublic valid on initialized state
  • Add message IsPublicSet
  • Add element under Difficulty settings. Something like: "List Publicly?: [Yes/No]"
  • Add a table on front page which polls for games with is_public:true

@rbtying Thoughts on how best to pull public games from storage? With the current interfaces doesn't seem straightforward but might be missing something.

@rbtying
Copy link
Owner Author

rbtying commented Feb 23, 2023

@jimmyfang94 thanks for thinking about it!

Steps 1-4 makes sense to me, though I'd consider using an enumeration (implementation detail) rather than a boolean
If you look at the implementation of the state-dump endpoint you'll see that there's actually already a (hidden) endpoint that enumerates all of the games that you can use for inspiration.

So, we probably need to add:

  1. a new endpoint which returns the public rooms as JSON (similar to the current /stats endpoint)
  2. some frontend code which polls the endpoint and makes the games available

If we wanted to be extra fancy, we could send the IsPublicSet=true message to all clients, which could then immediately poll for the available public games... but I'm not sure this is valuable over a button to refresh the list immediately?

@jimmyfang94
Copy link
Contributor

Makes sense! I'll take a stab at it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants