0

Is this possibe?

I want two devices near each other running the same web page with a Connect 4 game running, being able to comunicate with each other. Ie, one person plays his turn and the other person gets the result. BUT, not going through a web server.

Is that possible? Is it possible with javascript? Would it be done with bluetooth? How? Are there other options? Are there any APIs?

Rewind
  • 2,554
  • 3
  • 30
  • 56
  • https://stackoverflow.com/questions/7022383/how-can-i-make-a-browser-to-browser-peer-to-peer-connection – Wiktor Zychla Dec 21 '20 at 19:10
  • There has to be a server. However, it is possible to set up a server locally on either computer, and connect to that locally, but not with just a webpage... – FZs Dec 21 '20 at 19:13
  • @FZs Do you have any links on howto do this? – Rewind Dec 21 '20 at 19:19
  • 1
    Asking for such things is generally off-topic on SO. There are many ways to do it, e.g., you can use a Node.js server with websocket connections from the both sides, etc. I don't have links, but do some research on the Internet... – FZs Dec 21 '20 at 19:26
  • 1
    A lot of decisions on how to setup communication between nearby devices depends on device capability. Blutetooth, Local WiFi, WebRTC are viable means of connecting your applications. Each protocol has its own advantages so you should research on that too. Try creating a small demo example and see how that would work. – Abrar Hossain Dec 21 '20 at 19:31
  • WebRTC seems what I was looking for. From what I have read it finds the best possible communication possible. Would that include Bluetooth if it was there? – Rewind Dec 21 '20 at 23:37

0 Answers0