Ways to speed up map transferring in multiplayer.

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Post Reply
ManselD
Inserter
Inserter
Posts: 26
Joined: Mon Apr 01, 2013 10:43 pm
Contact:

Ways to speed up map transferring in multiplayer.

Post by ManselD »

Send data in chunks and store them on the disk (for each client). Then if there's been an updated chunk, send it to the client when they connect to the server again.
Maybe hash the chunk to check whether it's been updated?

The Lone Wolfling
Long Handed Inserter
Long Handed Inserter
Posts: 97
Joined: Tue Oct 28, 2014 3:33 pm
Contact:

Re: Ways to speed up map transferring in multiplayer.

Post by The Lone Wolfling »

You can do one better than that: Use a Merkle tree.

(Essentially, you have a n-ary tree, where each (non-leaf) node is labelled with the hash of the labels of its children nodes.)

(There's a time versus bandwidth efficiency tradeoff here, as well. For minimal bandwidth use, you want to send only the top node, have them respond if they have it or don't, if they don't have it then send children of the top node, repeat as necessary. But if you want it to be faster you can just send the tree in a top-down approach, stopping sending children of a particular node if you receive confirmation that they already have that node.)

Still doesn't speed up initial map transfer, though.

ManselD
Inserter
Inserter
Posts: 26
Joined: Mon Apr 01, 2013 10:43 pm
Contact:

Re: Ways to speed up map transferring in multiplayer.

Post by ManselD »

Ooh very fancy...

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

Re: Ways to speed up map transferring in multiplayer.

Post by MF- »

Also note that large part of the save is the replay data,
which has a "log" structure - ie. there exists a point before which the replay data is good.
Solutions to that are thus far simpler - I suggested one at https://forums.factorio.com/forum/vie ... 377#p51377

User avatar
cube
Former Staff
Former Staff
Posts: 1111
Joined: Tue Mar 05, 2013 8:14 pm
Contact:

Re: Ways to speed up map transferring in multiplayer.

Post by cube »

These are all great suggestions, but if we wanted to do any of this, we would use the binary diff mechanism that is used in updates. BUT... I think that our effort will be better spent if we get rid of desynchronizations (at least of most of them) instead of making the recovery faster.

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

Re: Ways to speed up map transferring in multiplayer.

Post by SHiRKiT »

cube wrote:These are all great suggestions, but if we wanted to do any of this, we would use the binary diff mechanism that is used in updates. BUT... I think that our effort will be better spent if we get rid of desynchronizations (at least of most of them) instead of making the recovery faster.
Just want to point it out that there will be a point where fixing those desyncs will take too long and speeding up the recovery may actually be the better solution at that point.

Psycix
Burner Inserter
Burner Inserter
Posts: 14
Joined: Sat Nov 08, 2014 3:51 pm
Contact:

Re: Ways to speed up map transferring in multiplayer.

Post by Psycix »

For me it's more about joining than re-syncing.

I think most of us play the same game mostly with the same friends, so I'd love to see a "synced save" feature, where the game is saved at the same tick (and state) for everyone. Then, the next day or so, as soon as I load up the game it is paused, and people who join and happen to have the save do not need to download anything (other than doing a quick hashing check for validity)
This can be expanded to synchronised auto-saves, where if someone joins with an older save available of his client, provided my client has that autosave as well, I only have to send him the diff patch.

User avatar
cube
Former Staff
Former Staff
Posts: 1111
Joined: Tue Mar 05, 2013 8:14 pm
Contact:

Re: Ways to speed up map transferring in multiplayer.

Post by cube »

This makes sense. I've added it into our list for 0.12.0.

User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Ways to speed up map transferring in multiplayer.

Post by bobingabout »

I've not experienced a Desync myself yet, but during setting up a multiplayer game, it's basically.... oh look, someone is joining, time to go make a cup of tea.

Especially when transfering to literally the oposite side of the planet, with a really slow upload, and Oz net at the other end, it takes 5 mins+ even with the most basic small map.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.

Post Reply

Return to “Ideas and Suggestions”