stynan27 / PazaakApp

An ElectronJS desktop application created to replicated my favorite Star Wars mini-game from Knights of the Old Republic. 21 with a twist.
0 stars 0 forks source link

Web Server #4

Closed stynan27 closed 2 years ago

stynan27 commented 3 years ago

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?

stynan27 commented 3 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.

stynan27 commented 3 years ago

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

stynan27 commented 3 years ago

For now, the webserver should include API functionality for saving to/retrieving from a local settings.json file for configuration.

Include keys for:

stynan27 commented 3 years ago

Consider a model where 2 clients join a webserver and then communicate through the server using WebSocket messages.