Page 1 of 4

Friday Facts #147 - Multiplayer rewrite

Posted: Fri Jul 15, 2016 3:21 pm
by kovarex

Re: Friday Facts #147 - Multiplayer rewrite

Posted: Fri Jul 15, 2016 3:35 pm
by Koub
Very good news (imho) :).

Re: Friday Facts #147 - Multiplayer rewrite

Posted: Fri Jul 15, 2016 3:40 pm
by StoneLegion
Very good news. Someone who pretty much only plays multiplayer with friends using force lua commands I can say this is a massively a good thing for the future.


I been using this with my friends we want out own bases but we want to play a bit more Co-Op so own bases / research and friendly turrets. I wish we had more control like allowing to use each others gates and such but it's a good start.

Code: Select all

/c game.create_force('force 1')
/c game.create_force('force 2')
/c game.create_force('force 3')
/c game.create_force('force 4')
/c game.forces['force 1'].set_cease_fire('force 2', true)
/c game.forces['force 1'].set_cease_fire('force 3', true)
/c game.forces['force 1'].set_cease_fire('force 4', true)
/c game.forces['force 2'].set_cease_fire('force 1', true)
/c game.forces['force 2'].set_cease_fire('force 3', true)
/c game.forces['force 2'].set_cease_fire('force 4', true)
/c game.forces['force 3'].set_cease_fire('force 1', true)
/c game.forces['force 3'].set_cease_fire('force 2', true)
/c game.forces['force 3'].set_cease_fire('force 4', true)
/c game.forces['force 4'].set_cease_fire('force 1', true)
/c game.forces['force 4'].set_cease_fire('force 2', true)
/c game.forces['force 4'].set_cease_fire('force 3', true)

/c game.get_player('Kane').force = game.forces['force 1']
/c game.get_player('Togy').force = game.forces['force 2']
/c game.get_player('BennerKaj').force = game.forces['force 3']
/c game.get_player('Sgt').force = game.forces['force 4']

We really love MP and we can't wait for the future for factorio.

Re: Friday Facts #147 - Multiplayer rewrite

Posted: Fri Jul 15, 2016 3:42 pm
by Smarty
Good news and good luck

Re: Friday Facts #147 - Multiplayer rewrite

Posted: Fri Jul 15, 2016 3:44 pm
by Compboy
Good news.
When will we see this? .14?

Re: Friday Facts #147 - Multiplayer rewrite

Posted: Fri Jul 15, 2016 3:46 pm
by Rockstar04
Compboy wrote:Good news.
When will we see this? .14?
Thats what I'm wondering as well. 0.14 or beyond seems the most likely to me, but they may wish to try to get the best multiplayer experience for the stable release of 0.13 since it has the game lobby and other MP features.

Re: Friday Facts #147 - Multiplayer rewrite

Posted: Fri Jul 15, 2016 4:05 pm
by iamwyza
Compboy wrote:Good news.
When will we see this? .14?
I'm guessing probably. This sounds like a pretty major re-write, I kind of doubt they'd stick it in .13. Of course, what that could mean is .14's primary release motivation is MP 1.0. Or maybe not. I suspect we'll know in a couple weeks when they release the updated roadmap.

Re: Friday Facts #147 - Multiplayer rewrite

Posted: Fri Jul 15, 2016 4:25 pm
by Jackalope_Gaming
"but it also keeps the clients from having to deal with the synchronisation and shit."

I'm still laughing about this. :lol:

Re: Friday Facts #147 - Multiplayer rewrite

Posted: Fri Jul 15, 2016 4:32 pm
by Bart
We'd like to take an opportunity to thank all the translators, as their contribution really has a great impact on the game, and their perspective often helps us in understanding how terms and descriptions we write in the game are interpreted by the players.
You're welcome :).

Re: Friday Facts #147 - Multiplayer rewrite

Posted: Fri Jul 15, 2016 4:36 pm
by roidal
like that!

Re: Friday Facts #147 - Multiplayer rewrite

Posted: Fri Jul 15, 2016 4:53 pm
by Swidilator
I have an idea, though I don't know of it's practicality:

To combat the freeze when a new play joins, is it not possible for the server to keep the updated map(If its not dedicated it should already have it in the exact form) and then while sending the map to the new player, queue all new merged packets to be sent after the map sending is completed? This means the other players can get on with playing(though the background upload might kill the 'playability' of all players, maybe limit the upload speed somehow) while the connecting client is the only one that has to wait.

Re: Friday Facts #147 - Multiplayer rewrite

Posted: Fri Jul 15, 2016 5:08 pm
by Twinsen
Swidilator wrote:I have an idea, though I don't know of it's practicality:

To combat the freeze when a new play joins, is it not possible for the server to keep the updated map(If its not dedicated it should already have it in the exact form) and then while sending the map to the new player, queue all new merged packets to be sent after the map sending is completed? This means the other players can get on with playing(though the background upload might kill the 'playability' of all players, maybe limit the upload speed somehow) while the connecting client is the only one that has to wait.
This is what was explained in the "Don't wait for upload" section.

Re: Friday Facts #147 - Multiplayer rewrite

Posted: Fri Jul 15, 2016 5:25 pm
by wjessup
sorry but isn't all this a solved problem?

I recently read this: https://bengarney.com/2016/06/25/video- ... ng-online/

and given the pace he's developing at it seems like the whole nat punching and multiplayer libraries are existing robust solutions. Do existing tools and libraries not work for factorio for some reason?

Re: Friday Facts #147 - Multiplayer rewrite

Posted: Fri Jul 15, 2016 6:21 pm
by Dev-iL
kovarex wrote:We'd like to take an opportunity to thank all the translators, as their contribution really has a great impact on the game, and their perspective often helps us in understanding how terms and descriptions we write in the game are interpreted by the players.
You're welcome :)

Re: Friday Facts #147 - Multiplayer rewrite

Posted: Fri Jul 15, 2016 6:46 pm
by Harkonnen604
Would be nice if rotating entities and gathering stuff from belts got visual client-side prediction like with running or construction.

Re: Friday Facts #147 - Multiplayer rewrite

Posted: Fri Jul 15, 2016 7:10 pm
by Aikonn
... the synchronisation and shit.
When discussion gets deep and hightly technical. :D :D :D

Re: Friday Facts #147 - Multiplayer rewrite

Posted: Fri Jul 15, 2016 7:25 pm
by MyrddinE
Thank you for this. I cannot play with my friends, because two of them like out in the boondocks and the game slows to a crawl if we have more than two players in the game. The Peer to Peer architecture you have is only viable for LAN-only games, and I'm glad to see that you're finally beginning work on an actual client-server model.

It can't come soon enough. :-)

Re: Friday Facts #147 - Multiplayer rewrite

Posted: Fri Jul 15, 2016 7:51 pm
by Swidilator
Twinsen wrote:
Swidilator wrote:I have an idea, though I don't know of it's practicality:

To combat the freeze when a new play joins, is it not possible for the server to keep the updated map(If its not dedicated it should already have it in the exact form) and then while sending the map to the new player, queue all new merged packets to be sent after the map sending is completed? This means the other players can get on with playing(though the background upload might kill the 'playability' of all players, maybe limit the upload speed somehow) while the connecting client is the only one that has to wait.
This is what was explained in the "Don't wait for upload" section.
Oh, I see, I must've read wrong :|

Re: Friday Facts #147 - Multiplayer rewrite

Posted: Fri Jul 15, 2016 10:51 pm
by bobingabout
I pointed this out years ago. I kid you not, at least a year ago, like when you were first writing netcode to begin with.

My situation, I play internet games primarily with someone in Australia. I live in England, so this is literally as far away from me on this planet as physically possible. (unless you count the ocean, but realistically, england is closest landmass to the oposite side of the planet to australia, and vica verca)

MINIMUM ping, on a good day is 300 ms, and average is around the 450ms mark, spikes can be as high as 5 seconds.
data transfer between the two of us is around 100kbytes a second, so, quite slow.
on top of that, because of really crappy Australian internet in his area, packet loss is excessively high.

Take all that into account... when we attempt to connect to each other to play factorio, we get like... 1 tick every 2 seconds, if that.

Unplayable would be an understatement.


I seriously hope you manage to pull off some kind of re-write that would allow us to play together.

Re: Friday Facts #147 - Multiplayer rewrite

Posted: Fri Jul 15, 2016 11:15 pm
by DaveMcW
bobingabout wrote:I seriously hope you manage to pull off some kind of re-write that would allow us to play together.
Server vs peer-to-peer is about 3+ players. If two people have a crappy connection, switching to server mode won't help.