Friday Facts #302 - The multiplayer megapacket
- FactorioBot
- Factorio Staff
- Posts: 430
- Joined: Tue May 12, 2015 1:48 pm
- BattleFluffy
- Fast Inserter
- Posts: 207
- Joined: Sun Mar 31, 2019 4:58 pm
- Contact:
Re: Friday Facts #302 - The multiplayer megapacket
wooo :D
This was a fascinating read. Looking forward to my next multiplayer session now.. :>
This was a fascinating read. Looking forward to my next multiplayer session now.. :>
Last edited by BattleFluffy on Fri Jul 05, 2019 1:33 pm, edited 1 time in total.
Re: Friday Facts #302 - The multiplayer megapacket
Why does the game state need to know what entity the player has selected anyhow? If the player executes an action, pass that action to the server rather than passing the player.selected property. This seems like an unnecessary linkage between view and controller of model/view/controller design.
Re: Friday Facts #302 - The multiplayer megapacket
In terms of debugging multiplayer, can't you just pull a frozen state out of the multiplayer server for offline replay for, say, the last dozen ticks?
Then if you crash out, you could instruct the server to send you that state, and then replay it offline to your heart's content without interfering with other people's games and without having to guess, by proper breakpointing and retrace?
I'm sure that's how everything multiplayer since the days of Doom has done debugging on multiplayer games.
Then if you crash out, you could instruct the server to send you that state, and then replay it offline to your heart's content without interfering with other people's games and without having to guess, by proper breakpointing and retrace?
I'm sure that's how everything multiplayer since the days of Doom has done debugging on multiplayer games.
Re: Friday Facts #302 - The multiplayer megapacket
Twinsen, you are a hero!
-
- Filter Inserter
- Posts: 952
- Joined: Sat May 23, 2015 12:10 pm
- Contact:
Re: Friday Facts #302 - The multiplayer megapacket
If it were me I'd have added another edge case, if the packet has too many selection changes, delete them all from the queue instead have it send single absolute value.
But I'm sure there'd be issues with that as well
But I'm sure there'd be issues with that as well
Re: Friday Facts #302 - The multiplayer megapacket
What exactly are the giant basketball hoop and the four pillars entities in the video linked in the FFF?
I've only played on .17, but they don't look like any .16 graphics entity I know of. Are mods allowed on specific clusterio servers?
I've only played on .17, but they don't look like any .16 graphics entity I know of. Are mods allowed on specific clusterio servers?
Re: Friday Facts #302 - The multiplayer megapacket
I was thinking the same. Other players don't have to see what you have selected and what you have selected shouldn't directly influence any gamestate that have effect on other players. Similar to the details on mouse movements.Mylon wrote: βFri Jul 05, 2019 1:29 pm Why does the game state need to know what entity the player has selected anyhow? If the player executes an action, pass that action to the server rather than passing the player.selected property. This seems like an unnecessary linkage between view and controller of model/view/controller design.
Re: Friday Facts #302 - The multiplayer megapacket
I don't know - can mods do things when you hover over something? Does the server tell clients what you click on, or just that you click?Lubricus wrote: βFri Jul 05, 2019 4:00 pmI was thinking the same. Other players don't have to see what you have selected and what you have selected shouldn't directly influence any gamestate that have effect on other players. Similar to the details on mouse movements.Mylon wrote: βFri Jul 05, 2019 1:29 pm Why does the game state need to know what entity the player has selected anyhow? If the player executes an action, pass that action to the server rather than passing the player.selected property. This seems like an unnecessary linkage between view and controller of model/view/controller design.
Edit - all very interesting, by the way. I'm looking forward to testing it out .
There are 10 types of people: those who get this joke and those who don't.
Re: Friday Facts #302 - The multiplayer megapacket
Yes, my mod absolutely depends on player.selected. If they were to take that out, my mod would not work at all in multiplayer.Jap2.0 wrote: βFri Jul 05, 2019 4:29 pmI don't know - can mods do things when you hover over something? Does the server tell clients what you click on, or just that you click?Lubricus wrote: βFri Jul 05, 2019 4:00 pmI was thinking the same. Other players don't have to see what you have selected and what you have selected shouldn't directly influence any gamestate that have effect on other players. Similar to the details on mouse movements.Mylon wrote: βFri Jul 05, 2019 1:29 pm Why does the game state need to know what entity the player has selected anyhow? If the player executes an action, pass that action to the server rather than passing the player.selected property. This seems like an unnecessary linkage between view and controller of model/view/controller design.
Edit - all very interesting, by the way. I'm looking forward to testing it out .
Don't forget, you're here forever.
Re: Friday Facts #302 - The multiplayer megapacket
Well there's everyone's answer .Raiguard wrote: βFri Jul 05, 2019 4:35 pmYes, my mod absolutely depends on player.selected. If they were to take that out, my mod would not work at all in multiplayer.Jap2.0 wrote: βFri Jul 05, 2019 4:29 pmI don't know - can mods do things when you hover over something? Does the server tell clients what you click on, or just that you click?Lubricus wrote: βFri Jul 05, 2019 4:00 pmI was thinking the same. Other players don't have to see what you have selected and what you have selected shouldn't directly influence any gamestate that have effect on other players. Similar to the details on mouse movements.Mylon wrote: βFri Jul 05, 2019 1:29 pm Why does the game state need to know what entity the player has selected anyhow? If the player executes an action, pass that action to the server rather than passing the player.selected property. This seems like an unnecessary linkage between view and controller of model/view/controller design.
Edit - all very interesting, by the way. I'm looking forward to testing it out .
(also, there's a debug option that shows what everyone has selected in multiplayer. I like to leave it on, just for fun.)
There are 10 types of people: those who get this joke and those who don't.
- eradicator
- Smart Inserter
- Posts: 5211
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: Friday Facts #302 - The multiplayer megapacket
@Raiguard: Which one? Tapemeasure at least seems to not need them seperate.
Currently "pressed a button" and "selected something" are different events. If i.e. my mod needs to know "did player click on my_building" then i have to listen for the "pressed mouse button" event and then in that event check what the player has currently selected. So theoretically most things could still be done if the two events where combined into a single "player pressed button on something" event. Practically it would be a lot of work to change all existing mods, and of course you lose the edge-case scenarios where you actually want only the selection event, i.e. for some mods that let you "manually revive" ghosts just by hovering them, etcpp.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: ζ₯ζ¬θͺ, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: ζ₯ζ¬θͺ, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
-
- Fast Inserter
- Posts: 195
- Joined: Sun Oct 05, 2014 6:12 am
- Contact:
Re: Friday Facts #302 - The multiplayer megapacket
Tapemeasure uses a blueprint to get extents, so it wouldn't.eradicator wrote: βFri Jul 05, 2019 4:50 pm @Raiguard: Which one? Tapemeasure at least seems to not need them seperate.
Currently "pressed a button" and "selected something" are different events. If i.e. my mod needs to know "did player click on my_building" then i have to listen for the "pressed mouse button" event and then in that event check what the player has currently selected. So theoretically most things could still be done if the two events where combined into a single "player pressed button on something" event. Practically it would be a lot of work to change all existing mods, and of course you lose the edge-case scenarios where you actually want only the selection event, i.e. for some mods that let you "manually revive" ghosts just by hovering them, etcpp.
Look at a mod like the Picker Pipe Tools (I think was the name), it shows overlays of the entire pipe network and dead-ends and all just based on the position of the mouse (of any player); it feels integrated and a natural part of the game.
Re: Friday Facts #302 - The multiplayer megapacket
Since it was done super long ago, probably only kovarex knows the real answer.Mylon wrote: βFri Jul 05, 2019 1:29 pm Why does the game state need to know what entity the player has selected anyhow? If the player executes an action, pass that action to the server rather than passing the player.selected property. This seems like an unnecessary linkage between view and controller of model/view/controller design.
But I can think of 3 reasons:
- we tend to put as much as possible in the game state. By having almost all game information in the game state, it's less probable to cause desyncs, and it's generally easier to work with code wise.
- keeps actions like open entity, rotate entity, copy settings, paste settings, shoot, etc quite simple and small since they don't need to send the selected entity.
- more flexibility for mods, as mentioned above
Re: Friday Facts #302 - The multiplayer megapacket
In addition, since LuaControl::selected exists in the API, entity selection input action has to be sent anyway. And I haven't check but I would say the API property is older than multiplayer.
Re: Friday Facts #302 - The multiplayer megapacket
I've been playing online some (redmew mostly) and it seems that a decent number of people agree that lag/latency (especially in combat) got worse in .54, what are everyone else's thoughts?
There are 10 types of people: those who get this joke and those who don't.
Re: Friday Facts #302 - The multiplayer megapacket
I'm not saying to remove player.selected property. But the player.selected event. You could still fetch it via a hotkey or possibly a timer. This could lead to some weird edge cases in multiplayer where the server asks, "What do you have selected?" And before the server gets the client's reply, the entity could be removed so mods would have to validate it to avoid an error.Raiguard wrote: βFri Jul 05, 2019 4:35 pmYes, my mod absolutely depends on player.selected. If they were to take that out, my mod would not work at all in multiplayer.Jap2.0 wrote: βFri Jul 05, 2019 4:29 pmI don't know - can mods do things when you hover over something? Does the server tell clients what you click on, or just that you click?Lubricus wrote: βFri Jul 05, 2019 4:00 pmI was thinking the same. Other players don't have to see what you have selected and what you have selected shouldn't directly influence any gamestate that have effect on other players. Similar to the details on mouse movements.Mylon wrote: βFri Jul 05, 2019 1:29 pm Why does the game state need to know what entity the player has selected anyhow? If the player executes an action, pass that action to the server rather than passing the player.selected property. This seems like an unnecessary linkage between view and controller of model/view/controller design.
Edit - all very interesting, by the way. I'm looking forward to testing it out .
- Unknow0059
- Fast Inserter
- Posts: 101
- Joined: Tue Aug 08, 2017 7:37 pm
- Contact:
- eradicator
- Smart Inserter
- Posts: 5211
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: Friday Facts #302 - The multiplayer megapacket
I have no clue what you tried to say there, but tapemeasure uses a capsule.OvermindDL1 wrote: βFri Jul 05, 2019 5:17 pm Tapemeasure uses a blueprint to get extents, so it wouldn't.
The event is a consequence of syncing the "selected" input action as far as i understand. Thus "removing the event" would only reduce moddability while doing nothing for latency. And besides the server doesn't "ask" stuff as explained in the FFF.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: ζ₯ζ¬θͺ, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: ζ₯ζ¬θͺ, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Re: Friday Facts #302 - The multiplayer megapacket
That would be the clusterio custom entity that does the sending and receiving of stuff. Clusterio itself is a mod. You could probably also play it with bob's or angel+bob's