[0.12]The M-word

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
Post Reply
User avatar
provet
Fast Inserter
Fast Inserter
Posts: 133
Joined: Thu Feb 12, 2015 9:49 pm
Contact:

[0.12]The M-word

Post by provet »

So Multiplayer is what this topic will be about! A hot topic which a lot of people feels very different about .
I've been playing with a friend who has a VERY shitty wireless connection: his download is 100KB/s and his upload is probably worse!
So we've actually managed to play multiplayer with this and it works pretty decent!
Good job devs!


However! We had another friend join our game, and all of a sudden the ping went from 60-200 -> 360+

My wireless friend told me about p2p which basically works like this:
Image
Every peer connects to give all the other peers data and all peers receive all the other peers data.
So in this instance with an octagon, it has 8 edges(or peers), each edge is connected 7 times! So that would mean 7 times the up/download with an increase of 6 peers from 2 peers to 8 peers. So every action/simulation that normally would we 1x sized (moving forward etc) would be 7x sized


So the reason the ping went up when a 3:d peer was presented was that all the data had to be sent and received at a doubled rate.

If this is how it works, my question is; wouldn't it be better to establish a lower amount of peer connections as the number of peers increase?
Image
8 Peers in total; now each peer only has 4 connections.

Would it even be possible from a developing standpoint?
Last edited by provet on Sat Aug 22, 2015 5:37 pm, edited 1 time in total.

SilverWarior
Filter Inserter
Filter Inserter
Posts: 559
Joined: Mon Mar 04, 2013 9:23 am
Contact:

Re: [0.12]The M-word

Post by SilverWarior »

The problem with P2P multiplayer setup is that each client needs to send its information to every other client in multiplayer session. This means that one client with slow connection can cause slowdowns and lag for everyone.
But the main advantage of P2P multiplayer is that the person who initially created the multiplayer session can even logout or disconnect and the session will still remain active as long as there is at least one player online.
Now I have seen some game to use more advanced P2P multiplayer mechanisms where each client can actually serve as a router to forward data from one client to another. This avoids clients who have slow network connection to be forced to send its data to every other client. But the problem is that implementing of such mechanism is much more difficult.

While when you have multiplayer with dedicated server each client is sending its own information to the server and then the server forwards that information to other clients. Advantage of dedicated servers is that server usually have necessary information to know which information is actually needed by each client. So the usually don't forward all received information to each client.
The main disadvantage with dedicated servers is that if the connection to the server is lost the whole multiplayer session is lost.

User avatar
y.petremann
Filter Inserter
Filter Inserter
Posts: 410
Joined: Mon Mar 17, 2014 4:24 pm
Contact:

Re: [0.12]The M-word

Post by y.petremann »

SilverWarior wrote:The problem with P2P multiplayer setup is that each client needs to send its information to every other client in multiplayer session. This means that one client with slow connection can cause slowdowns and lag for everyone.
But the main advantage of P2P multiplayer is that the person who initially created the multiplayer session can even logout or disconnect and the session will still remain active as long as there is at least one player online.
Now I have seen some game to use more advanced P2P multiplayer mechanisms where each client can actually serve as a router to forward data from one client to another. This avoids clients who have slow network connection to be forced to send its data to every other client. But the problem is that implementing of such mechanism is much more difficult.

While when you have multiplayer with dedicated server each client is sending its own information to the server and then the server forwards that information to other clients. Advantage of dedicated servers is that server usually have necessary information to know which information is actually needed by each client. So the usually don't forward all received information to each client.
The main disadvantage with dedicated servers is that if the connection to the server is lost the whole multiplayer session is lost.
I think that, even it's dificult, factorio should make like mesh networks with the possibility to control how the mesh should work normally. For factorio it would permit to have a a dedicated server and to have client only communicating with the server but if the server sundenly shutdown, the clients would back to p2p until they could recontact the server.

Post Reply

Return to “Technical Help”