Multiplayer and different results per browser

0 favourites
  • 4 posts
From the Asset Store
This music pack covers differents situations for visual novels, anime games and many more!
  • Hi

    We have a multiplayer game with its own backend.. It's basically a race game where the data is supplied via our backend servers..

    So far so good.

    However, we have encountered a bug. Depending on the browser being used or the machine being used, the game takes longer or shorter to compete.

    Just to give you an example, an outside client sends data to the server and the server broadcasts this data to all Construct 2 clients. The same race data is sent to all browsers in near real-time.

    On some browsers and on the same browser under different based machines, the games (which is realtime)take longer to complete..

    As a result, if the user with the fastest browser/machine ends up winning the game, he stops sending race data.. Yet the others still haven't computed all the incoming data.. I hope that makes sense..

    Any ideas on how to debug this ? What should we be looking for ? Is this a FPS problem ?

    Thanks, I appreciate it.

    J

  • depending on the way u made to dend data, yes.. might be something related to fps. try to use deltatime to make evrry machine run at the same speed

  • Thanks for the reply !

    We are using the physics module which I believe does not use dt by default: scirra.com/tutorials/67/delta-time-and-framerate-independence/page-1 (super interesting article).

    So maybe that's it.. We'll take a look and report back.

    Thanks again!

    J

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi

    We are using the physics platform and according to this section:

    scirra.com/tutorials/67/delta-time-and-framerate-independence/page-1

    "Note that Physics is an exception. By default it does not use dt, and therefore is framerate dependent. This is because dt usually has small random variations. These variations can make the same setup in a physics game give different results even if exactly the same thing is done twice. This is often annoying for physics games, so by default it is framerate dependent. However, you can enable use of dt by using the Set Stepping Mode physics action on start of layout, and choose Framerate independent."

    The game is basically a race of 6 objects running a straight line from left to right.. They don't jump or do any other movement then run a straight line. We do require that they have some sort of fade in speed when the user stops moving forward.. That is, they don't stop dead but instead slow down.

    Given the above, and given the problem we have, would be we better off dumping the physics platform for another ?

    Or do you think it's possible to make this work using the physics behavior ?

    Thanks !

    J

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