Nodragem

Can we make a multiplayer game without a remote server?

Recommended Posts

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

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites
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".

Share this post


Link to post
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.