Is there any way of hosting multiplayer not from a peer?

0 favourites
  • 3 posts
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • Some people who join the game have a really bad connection. This makes it a trouble for others to join that person. Is there any way I could host the multiplayer game form a certain server?

  • https://www.scirra.com/blog/142/make-on ... onstruct-2

    There are a number of links to tutorials under the "Learn how to make multiplayer games" section. I'm not sure if they specifically explain how to set up a dedicated server, but they do talk about it in at least one of them. Have you already read over them?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • What I have done is prevent the ability of a peer to create a room depending a hash value in the URL. For example, if my game URL is "awesomegame.com", to be a host the peer would need to enter a URL with a "secret" hash similar to "awesomegame.com/#secretHash" or "aweseomgame.com/#host"

    Here is how to use it:

    After logging in, but before joining a room, add a System condition to compare two values. Compare Browser.Hash to whatever you want the "secret" to be. Compare: Browser.Hash Equal to #mysecret

    If the user is allowed to be host, create a new room with a unique name. For testing I simply used the Multiplayer.MyID for the room name.

    If the user is not allowed to be host, get a list of rooms. If no rooms are joinable, tell the user that there are no Hosts or servers, or whatever message you want to say... or tell them to send you an angry email

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