How do I use the Multiplayer plugin in a centralized manner?

Get help using Construct 2

Post » Mon Sep 21, 2015 6:02 pm

So this is a more specific version of other posts relevant to this matter.

The other posts that I read had @Ashley suggesting that you use a browser on the server to serve as the "host" peer, but that is not really a good option for us, since we are using a GUI-less Linux server and a lot of Java backend code that is taking up most of our current CPU/memory resources.

Is there anyway to do this short of completely reverse engineering the WebSocket API that the the Mutliplayer plugin uses in order to try and mirror the host's messages from one centralized server? Sadly, all of the Multiplayer examples use wss, which means that I would have to figure out how to plugin SSL certs into Wireshark to get at the messages being passed back and forth.

If I can't get this figured out, we are going to fallback on some kind of AJAX solution for now, because I don't have the time to build a completely new WebSocket plugin for Construct.

Or perhaps @Ashley can give us an API (or some kind of text file showing messages passed to/from an example host)?
https://www.ravenheart.ca/home
Company name changed to avoid Facebook-type shenanigans

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,415
Reputation: 4,824

Post » Mon Sep 21, 2015 8:19 pm

The multiplayer engine is built on WebRTC DataChannels, WebSockets are only used for the signalling server.

It's all browser based so running a browser tab on a server is our recommended way of hosting a server. If that's not at all an option and you're already doing a lot of coding, I'd say pick up the Javascript SDK and write your own custom plugin that integrates with your server in a way that suits you.
Scirra Founder
B
395
S
232
G
88
Posts: 24,371
Reputation: 193,762

Post » Mon Sep 21, 2015 8:43 pm

Thanks for replying @Ashley.

We will just use a stripped down AJAX API for now, until we are making money and have the time to build a centralized Multiplayer plugin. Hopefully, we can make it generalized enough to allow people to plugin their own APIs to use this future plugin.
https://www.ravenheart.ca/home
Company name changed to avoid Facebook-type shenanigans

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,415
Reputation: 4,824


Return to How do I....?

Who is online

Users browsing this forum: senecaa, ultrafop and 12 guests