Friday Facts #302 - The multiplayer megapacket
Posted: Fri Jul 05, 2019 1:22 pm
www.factorio.com
https://forums.factorio.com/
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.
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.
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.
Well there's everyone's answerRaiguard 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.
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.Jap2.0 wrote: Fri Jul 05, 2019 4:29 pm 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?
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.Jap2.0 wrote: Fri Jul 05, 2019 4:29 pm 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?
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.
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.
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.Mylon wrote: Fri Jul 05, 2019 10:10 pm I'm not saying to remove player.selected property. But the player.selected event.
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'sUltros wrote: Fri Jul 05, 2019 3:22 pm 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?