powelli13 / dara-dots

Using Phaser 3 to implement a game idea I have.
MIT License
5 stars 2 forks source link

Abstract out the lobby chats into a shared channel structure #16

Open powelli13 opened 3 years ago

powelli13 commented 3 years ago

The game and lip sync lobbies have a lot of repeated code between the JavaScript and the Elixir channels. It would be nice to create a single way to do this and then share it between different pages. The Phoenix channel naming scheme could help with routing the messages for example "lobby:rps" or "lobby:ttt" could act as the identifiers. Then a single Elixir module and one consuming JavaScript file could be used to facilitate all lobby chats instead of repeating code.