0 Favourites

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

  • 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)?

  • 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.

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • 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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)