Closed stynan27 closed 2 years ago
https://www.toptal.com/webrtc/taming-webrtc-with-peerjs - found a useful library for implementing P2P multiplayer with a similar two player game of connect 4.
The client example JS (above) needs to be translated to VueJS. I've found a library that could implement WebRTC client in VueJS https://github.com/westonsoftware/vue-webrtc
For now, the webserver should include API functionality for saving to/retrieving from a local settings.json file for configuration.
Include keys for:
Consider a model where 2 clients join a webserver and then communicate through the server using WebSocket messages.
Need to establish a proper web server. I will likely end up using NodeJS as this would be the easiest for me to use/configure. This server would be used to communicate with other web servers for the purpose of peer to peer multiplayer.
In addition, I'm also considering the possibility of API routes tied to game actions i.e.)/addPlayerCard
Possibly store player's current side deck here via communication with MongoDB?