How do I fix lag in multiplayer ???

Get help using Construct 2

Post » Mon Sep 28, 2015 4:03 pm

I creat game with host and - 1 peer
on LAN it no lag
but when i and friend play it in internet
host play able but peer veery lag :o :?: :?: :?:
Here is my Sync object

Image
Image
Bytes host Bw
Image

Wish i can fix it !
Thanks if you read :)
B
5
Posts: 3
Reputation: 233

Post » Mon Sep 28, 2015 7:25 pm

You will need a dedicated server to host the game. I had the same problem with only 3 or 4 inputs synced, it appears they eat the bandwidth and make the game unplayable.

For turn based games it would be ok to have 1 player as the host. From what ive seen though, using this method for real-time games is not possible.
B
9
S
3
Posts: 104
Reputation: 1,033

Post » Tue Sep 29, 2015 2:20 am

Frostein wrote:You will need a dedicated server to host the game. I had the same problem with only 3 or 4 inputs synced, it appears they eat the bandwidth and make the game unplayable.

For turn based games it would be ok to have 1 player as the host. From what ive seen though, using this method for real-time games is not possible.


C2 multiplayer using peer to peer connect , why i need a dedicated server to host the game???
B
5
Posts: 3
Reputation: 233

Post » Tue Sep 29, 2015 5:51 am

Because having so many inputs makes the game lag, more so for the peer. Its too much bandwidth, Making the game unplayable and unfair.

Im not an expert, but ive played around with the multiplayer object enough. It seems to me that a peer to peer connection, just does not cut it for real time.
B
9
S
3
Posts: 104
Reputation: 1,033

Post » Fri Oct 02, 2015 11:01 am

You are syncing wayyyyyyy to many objects ....

Just imagine that each of those objects their instances tries to update their info at least 10 times a second ..... (some up to 30)

The inputs should be reduced to 1, using the getbit/setbit methods. (you can set 8 1's or 0's in a single synced var, see it as 8 booleans)

The player objects should just 1 for its position and the rest of the items should be created based on who has connected.

All other info should be transmitted via messages. (1 time action instead of continuously updating)
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,572

Post » Fri Oct 02, 2015 12:28 pm

Thanks , now i know how to fix , thanks all ^^!
B
5
Posts: 3
Reputation: 233


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 18 guests