Badmiracle's Recent Forum Activity

  • Have you tried bringing the issue up to either teams or are you just speculating?

  • Hey! If you'd rather not set one up yourself you'll likely need to rent a VPS from a service provider. I use OVH.com - but there are several. Try googling "VPS".

    It should cost around $10 a month to start - at this price the VPS won't be able to handle much, just make sure the browser tab is minimized after the game's running and you'll be able to do your testing. I wouldn't recommend upgrading the VPS until you need to.

    You're free to configure the VPS with an OS of your choice. Mine is using a variation of Linux, and I have remote desktop + chrome installed on it which allows me to go in and navigate to the site. Most service providers support teams will help you get this setup if you're having trouble.

  • joelmayer The documentation should be out when the r121 updates move to a stable release - which should clear up how to use the plugin.

  • For anyone interested, I guess one way to be sure is to use custom tags with the identifier attached. Its messy and I'm not even sure if it's necessary but it's a workaround:

    Call getUsername(player.account)

    + function: On "getUsername"

    -> ajax: Send AJAX request with tag "getUsername_" & function.Param(0))

    + ajax: On any completed

    -> json: Load content from ajax.LastData

    //tokenize the tag to get the tag name

    ----+ System: tokenat(ajax.Tag,0,"_") = "getUsername"

    //tokenize the tag again to get the account name

    --------+ player: account = tokenat(ajax.Tag,1,"_")

    ---------> player: Set account to json.At("data.username")

  • Hey R0J0hound, thanks for the reply. It hasn't happened in tests - it's just something I thought about.

    It definitely seems like it could be an issue down the road if the game ever achieves 100+ players or so, where they're all talking to the server at the same time, and the servers making the requests for them.

    In my example, if the AJAX request uses the tag "getUsername", the corresponding condition "AJAX on "getUsername" completed" may not actually be tied to the initial request, but rather the first incoming response with the tag "getUsername".

    I'm worried that because the time it takes to send and receive a response varies for every request that goes out, it might mix things up (eventually).

    I noticed something called an "X-Request ID" in the response headers, I'm wondering if the AJAX plugin takes this x-request ID into account in order to validate the request is a match once "on getUsername completed" fires.

  • Queue them, then no problem !

    Sounds great in theory. Do you have any recommendations for how I could I go about doing that?

    Is there a potential that this could cause a bottleneck?

  • I'm working on a multiplayer game. When a player logs in the server gets a message and sends an AJAX request to my webserver. When the request is completed, the server loads ajax.lastData and return the username to the player.

    I'm wondering if two players were to login at roughly the same time, might it be possible that the server ends up swapping the players usernames?

    Scenario:

    1. Player A and B login and send message to server
    2. Server sends AJAX request for Player A's username
    3. Server sends AJAX request for Player B's username
    4. AJAX request for Player B's username ends up getting received first
    5. Server sets Player A's username to "Player B" (mistaking Player A for Player B)
    6. AJAX request for Player A's username is received second
    7. Server sets Player B's username to "Player A" (mistaking Player B for Player A)

    Thanks,

    bad

  • Kyatric

    I enjoyed the video tutorials on your website. Have you ever made any step by step tutorials for online Multiplayer? If not, do you know of anyone who has? Videos make a bigger impact for me vs reading.

    For now, I would recommend playing around with the templates. It can be overwhelming at first but Construct 2/3 does a lot of the heavy lifting for you - try to focus on figuring out how syncing objects and sending/receiving messages works. It becomes quite simple the more you progress. I'd be happy to answer any questions that you might have.

    All that said - don't bother using Construct 3 for Multiplayer unless local preview gets added: https://construct3.ideas.aha.io/ideas/C3-I-314

    Construct 2 is your best bet for now.

  • Thanks for the info Ashley. I'm going to continue testing (on a different network with a VPS) and see if something has changed since the last time you hosted the game running the multiplayer plugin and I'll let you guys know.

  • Good point. I'll see if it happens again.

    I remember paying for a cheap VPS at some point, and I would get Chrome crashing on that server quite often, I always assumed it was a mem issue or something else (not MP plugin related) anyway.

    Hopefully some others (if not Ashley himself) can test this and see if they get disconnected as well.

  • I'll give that a shot, but I came across the same issue w/ Firefox. Will keep you guys posted!

    TheRealDannyyy would you mind running a test as well and letting me know if it disconnects by morning?

    I've also been experimenting with running just 1 tab (the host) w/ no peers. Once chrome crashed, and the second time I made it past the 24 hour mark which was promising, then I closed it manually.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ashley I wish I had more info then what I provided. I could keep running tests but I don't see how that will help, I've done it about 6-7 times. Could you possibly try this overnight tomorrow, and just see what happens? Could you try running the ghost shooter multiplayer demo and seeing if it can last longer than a day? (has it ever in the past?)

    Let me know if there's anything specific that you want me to provide, but like I said nothing shows up in the web console - the host just simply disconnects some random time after 12 hours or so.

    We discussed this issue here:

Badmiracle's avatar

Badmiracle

Member since 31 Aug, 2015

None one is following Badmiracle yet!

Trophy Case

  • 9-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

11/44
How to earn trophies