Multiplayer and different results per browser

Get help using Construct 2

Post » Wed Aug 29, 2012 4:20 pm


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
B
3
Posts: 5
Reputation: 290

Post » Wed Aug 29, 2012 5:17 pm

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
B
30
S
6
G
5
Posts: 433
Reputation: 6,061

Post » Wed Aug 29, 2012 5:39 pm


Thanks for the reply !

We are using the physics module which I believe does not use dt by default: http://www.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
B
3
Posts: 5
Reputation: 290

Post » Thu Aug 30, 2012 3:46 pm

Hi

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

http://www.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
B
3
Posts: 5
Reputation: 290


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 17 guests