Friday Facts #76 - MP inside out

Regular reports on Factorio development.
slpwnd
Factorio Staff
Factorio Staff
Posts: 1835
Joined: Sun Feb 03, 2013 2:51 pm
Contact:

Friday Facts #76 - MP inside out

Post by slpwnd »

This week Blue Cube brings a bit more technical look at the Multiplayer: http://www.factorio.com/blog/post/fff-76

MeinAccount
Burner Inserter
Burner Inserter
Posts: 16
Joined: Wed Apr 30, 2014 7:49 pm
Contact:

Re: Friday Facts #76 - MP inside out

Post by MeinAccount »

Technical posts are always awesome. :D (I'm a developer myself.)
A peer acting as a proxy sounds like a good idea for future development. Couldn't that also be done by a dedicated server?

thuejk
Fast Inserter
Fast Inserter
Posts: 113
Joined: Fri Feb 13, 2015 8:41 pm
Contact:

Re: Friday Facts #76 - MP inside out

Post by thuejk »

To help with this, in Factorio we implement sort of a buffer time interval (called "latency" when starting the game). This determines amount of time that a peer can wait for anyone's messages without lagging the game. Unfortunately this also causes the game to delay all local actions by this time.
But why do I have to guess the latency manually, instead of the game automatically (and perhaps dynamically) determining it?

FrozenOne
Fast Inserter
Fast Inserter
Posts: 177
Joined: Mon Mar 04, 2013 8:10 pm
Contact:

Re: Friday Facts #76 - MP inside out

Post by FrozenOne »

Because 0.11 is multiplayer for the brave ones, and if you are not the brave one then you need to wait for 0.12 and finished multiplayer.

marsch
Burner Inserter
Burner Inserter
Posts: 6
Joined: Sat Dec 21, 2013 6:20 pm
Contact:

Re: Friday Facts #76 - MP inside out

Post by marsch »

I always wondered why you chose such difficult algorithm.

Go on with the Friday facts as usual.

Rakshasa
Long Handed Inserter
Long Handed Inserter
Posts: 97
Joined: Sat May 31, 2014 7:21 pm
Contact:

Re: Friday Facts #76 - MP inside out

Post by Rakshasa »

marsch wrote:I always wondered why you chose such difficult algorithm.

Go on with the Friday facts as usual.
Because not going for a deterministic state engine with only delta's passed around would mean we would never have MP in this game.

It isn't original, EVE Online does the same thing to enable 3000+ player fleet fights.

pcmaster160
Inserter
Inserter
Posts: 26
Joined: Wed Oct 23, 2013 12:51 pm
Contact:

Re: Friday Facts #76 - MP inside out

Post by pcmaster160 »

Technical posts are my favorite Friday facts.

I'm curious of the details on what you guys plan in .12 to handle latency better.

Marconos
Filter Inserter
Filter Inserter
Posts: 301
Joined: Mon Jun 02, 2014 10:46 pm
Contact:

Re: Friday Facts #76 - MP inside out

Post by Marconos »

Really enjoyed this. The lock step model is something that I hadn't considered in how information is passed between clients and makes a lot of sense.

Great post, keep them coming.

User avatar
Sharlenwar
Burner Inserter
Burner Inserter
Posts: 12
Joined: Mon Dec 22, 2014 5:33 pm
Contact:

Re: Friday Facts #76 - MP inside out

Post by Sharlenwar »

Hey Blue Cube! Thanks for writing the post. I love the technical posts to see how the inner workings of Factorio work. Keep it up devs!
**My Corner Of The Web**
YouTube Channel

User avatar
Narnach
Inserter
Inserter
Posts: 32
Joined: Sun Mar 10, 2013 4:45 pm
Contact:

Re: Friday Facts #76 - MP inside out

Post by Narnach »

I liked reading it. Nice change of pace. Do write more! :-)
Identity is cheap, reputation is priceless.

Let's Player over at https://youtube.com/narnach

User avatar
SHiRKiT
Filter Inserter
Filter Inserter
Posts: 706
Joined: Mon Jul 14, 2014 11:52 pm
Contact:

Re: Friday Facts #76 - MP inside out

Post by SHiRKiT »

I still think that the buffer should be calculated instead of being an user input.

Also, I suggest you to allow people to a information/data share with the developers. You can create a totally optional checkbox on the options menu that players, when selected, will record some informations and will send to the server (the devs). This can give input on the average user usage of your game. Things like internet speed (?), bandwidth usage, entity count, computer specs etc. I would be one of the players that would gladly share information with the devs, as long as it's anonymous.

MF-
Smart Inserter
Smart Inserter
Posts: 1235
Joined: Sun Feb 24, 2013 12:07 am
Contact:

Re: Friday Facts #76 - MP inside out

Post by MF- »

MeinAccount wrote:Couldn't that also be done by a dedicated server?
Good point.
If I would be paying for a dedicated map storage/server, I would probably like
this particular computer to also help clients with "internet issues".
Or aid with network configuration in general, for that matter.

User avatar
provet
Fast Inserter
Fast Inserter
Posts: 133
Joined: Thu Feb 12, 2015 9:49 pm
Contact:

Re: Friday Facts #76 - MP inside out

Post by provet »

Would it be possible to change the "latency-buffer" in-game in later versions of factorio? Rather than per started server?

User avatar
Xterminator
Filter Inserter
Filter Inserter
Posts: 981
Joined: Sun Jun 15, 2014 4:49 pm
Contact:

Re: Friday Facts #76 - MP inside out

Post by Xterminator »

Even though I am not a programmer and know nothing about programming, I still find these technical posts very interesting. :) I like to see how things behind the screen work for Factorio. Definitely keep the technical type of posts coming in the future!
Image Image Image

nours77
Inserter
Inserter
Posts: 42
Joined: Mon Jun 10, 2013 12:06 pm
Contact:

Re: Friday Facts #76 - MP inside out

Post by nours77 »

i dont really like the peer to peer idea, beacause it punish player who have a poor upload like me, 0.75 upload 5.75 download...(i don t want see end game with a lot to upload) I m not in a city and i don t want to go for play factorio... not a good news !

Dupl3xxx
Inserter
Inserter
Posts: 40
Joined: Sat Mar 07, 2015 6:50 pm
Contact:

Re: Friday Facts #76 - MP inside out

Post by Dupl3xxx »

nours77 wrote:i dont really like the peer to peer idea, beacause it punish player who have a poor upload like me, 0.75 upload 5.75 download...(i don t want see end game with a lot to upload) I m not in a city and i don t want to go for play factorio... not a good news !
In fact, using P2P is one of the most efficient ways to do it, and because they use lockstep, and as they said in the post itself, there is only a few hundred bytes that is generated each second. Think 0.0003Mbps.
FF#76 wrote:Because people with keyboards can only generate a few hundred bytes per second, this approach scales really well for large maps.
So no, it doesn't punish people with poor upload at all. And even if it did, using P2P doesn't mean it uses more or less bandwidth. And 5.75/0.75 isn't bad at all. More would always be better, but most if not all multiplayer games work with a lot less than 0.75 up. And remember, you only have to send your own input to others, and you receive input from many. In other words, factorio (along with most other multiplayer games) use a lot less upload than download.

Richwarf
Burner Inserter
Burner Inserter
Posts: 8
Joined: Fri Feb 14, 2014 11:42 pm
Contact:

Re: Friday Facts #76 - MP inside out

Post by Richwarf »

Why cant you mix both server client and step locking together?

Have the "auto-save" become "auto-push", so all the clients still run on there own but one player pushes there game to all other clients. So this way everyone wins.

I don't know, call it "step server"?

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Friday Facts #76 - MP inside out

Post by ssilk »

They currently send as much checksum-data as possible over the line to see as soon as possible if there is some desync.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

albatrosv13
Long Handed Inserter
Long Handed Inserter
Posts: 80
Joined: Wed Apr 30, 2014 5:36 pm
Contact:

Re: Friday Facts #76 - MP inside out

Post by albatrosv13 »

deleted
Last edited by albatrosv13 on Thu May 19, 2016 4:30 pm, edited 1 time in total.

ofca
Long Handed Inserter
Long Handed Inserter
Posts: 70
Joined: Sat Feb 21, 2015 1:49 pm
Contact:

Re: Friday Facts #76 - MP inside out

Post by ofca »

Major changes from current architecture probably won't happen, nor would they be feasible. As to the hundred thousand entities, while one can't dispute their existence, I think there's only one troublesome entity in this game, and it's the more-or-less unpredictable player. Other entities are deterministic to a fault, and one may argue that them behaving differently on multiple ends are either 1) coding errors, 2) result of cheating, or 3) hardware/software errors outside the game, right?

Could you tell us more about your final vision for multiplayer? What are the gains of true full visibility P2P over other solutions? What are your plans for making game playable in scenarios like 10 players playing on LAN and one playing with over 100ms latency or on ZX Spectrum-class machine? ;)

Post Reply

Return to “News”