Nodragem Posted December 15, 2017 Share Posted December 15, 2017 Hello, I started to use socket.io, express and phaser to make multiplayer games. I followed this tutorial: https://phaser.io/news/2017/03/socketio-multiplayer-tutorial and I used Heroku to host and serve my game. However, I was thinking that, in the case I want to make a coop game, I would not need the server to be always running on Heroku. Instead, I could use one of the client machine as the server? Do you think that this is possible? Thanks, Nodregam JackFalcon 1 Quote Link to comment Share on other sites More sharing options...
Jimaginary Posted January 20, 2018 Share Posted January 20, 2018 It may be "possible", but having an authoritative client can open you up to backing, cheating, etc. It's a much better idea IMO to have an actual server. Quote Link to comment Share on other sites More sharing options...
JackFalcon Posted January 21, 2018 Share Posted January 21, 2018 something came up on the radar yesterday. https://webrtchacks.com/datachannel-multiplayer-game/ They say, aok with WebRTC. "The DataChannel is fully peer-to-peer and encrypted" https://github.com/agilityfeat/memory-webrtc-data-channel.git I plan to try .... ... anyone know of a success with this or something similar? Quote Link to comment Share on other sites More sharing options...
shen Posted April 11, 2018 Share Posted April 11, 2018 I just studied this a little bit. https://github.com/cjb/serverless-webrtc is a good start (Although WebRTC is P2P, it's still better to have a signalling server than manual hand-shaking). Quote Link to comment Share on other sites More sharing options...
Nodragem Posted January 24, 2019 Author Share Posted January 24, 2019 On 1/20/2018 at 10:49 PM, Jimaginary said: It may be "possible", but having an authoritative client can open you up to backing, cheating, etc. It's a much better idea IMO to have an actual server. yep, but for instance, for a local coop session with 2 players, players may not want to be connected to internet. Hence the local machine would need to run the server and 2 clients. Basically, I would like my game to run local coop sessions (server+2 clients on the local machine) or remote coop sessions (remote server, and 1 client by machine). Another instance would be the Nintendo Switch, where you can play locally with two machines, hence one machine needs to be server+client. I think that the first case (server+2 clients on local machine) is doable with socket.io, running the server on localhost. However, I am unsure how it would work with the Nintendo Switch case. On 1/21/2018 at 1:18 AM, JackFalcon said: something came up on the radar yesterday. https://webrtchacks.com/datachannel-multiplayer-game/ They say, aok with WebRTC. "The DataChannel is fully peer-to-peer and encrypted" https://github.com/agilityfeat/memory-webrtc-data-channel.git I plan to try .... ... anyone know of a success with this or something similar? That sounds good; I guess we can still make one of the machines the "server". Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.