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

support room ids #142

Merged
merged 7 commits into from
Jan 19, 2021
Merged

support room ids #142

merged 7 commits into from
Jan 19, 2021

Conversation

stevenhao
Copy link
Member

@stevenhao stevenhao commented Jan 18, 2021

the vision for rooms

  • a permanent link that can hold multiple games -- so when you're done and want to play a new game, you don't need to paste a new link for everyone to join.

some immediate things that this unblocks

  • users can bookmark a link like downforacross.com/team/stevens-crossword-friends-1
  • gather.town integration
  • public lobby rooms for people to meet other users on the platform. can link to these in homepage / pin to discord or whatever
  • an archive of puzzles that a group has solved together

this pr might be broken into multiple PRs to allow incremental progress:

  • define backend schema, create table in staging: backend for rooms #143
  • support lazy creation of rooms (provide a name in the URL) + extend websocket setup to support room events. see "room actions" section below: rooms clientside socket management #144
  • support creating games within a room (appends to a room's list of games) and playing a game within a room [this PR]
  • support listing games within a room (render a list of game names, number of ppl in game, last updated date)
  • support playing games within a room (select which game to join,
    auto-join last game when join)

Room actions to support:

  • addGame(gid) -- add gid to list of games that belong to this room.
    • note: allows multiple rooms to share the same game. whatever.
  • updateProgress(gid, status) -- indicate that you are active in game gid, and
    game has progress = { percentComplete, isComplete, numEdits, numActions }
    • note: progress tracking is denormalized (done via client), slightly hacky. can iterate on this in future if it turns out to be troublesome

Room should be implemented in the same way as games -- events &
reducers, synchronized via ws

  • although the current schema of room events is dead simple, it may
    become more complex in the future, and synchronizing an append-only list of events is
    easier than synchronizing any other data structure.

Custom room ui

  • new url -- /room/:rid
  • within the room: render a RoomSidebar component on the left
    • collapsible
    • view games belonging to room + their progress & number of active
      users
    • a room sidebarrender a list of puzzles
    • button to select puzzle

Future

  • password-protected rooms

@vercel
Copy link

vercel bot commented Jan 18, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/downforacross/downforacrosscom/6sb6wx3va
✅ Preview: https://downforacrosscom-git-rooms.downforacross1.vercel.app

@stevenhao
Copy link
Member Author

image
iframe looks good enough for me :P

@stevenhao stevenhao merged commit dcf6e07 into master Jan 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant