Wulf2k / DaS-PC-MPChan

77 stars 30 forks source link

Autoconnect to Favorites #55

Closed MadelineRitchie closed 7 years ago

MadelineRitchie commented 8 years ago

Every 19 seconds, will attempt to connect to anyone in the favorites list who is not currently connected. Will always leave 4 nodes free for standard Steam connections.

Chronial commented 8 years ago

I don't think this is good idea. Reasons I can think of why you added somebody to the favorites:

None of these has a strong correlation with that node actually being a good node. All your warm feelings towards that person don't help the fact that they are in another part of the DS world, and thus are not eligible for any kind of matchmaking. They are just blocking one of the node slots that could be filled with somebody that you could actually do multiplayer with.

That is of course not a big issue if you have only one node, but if you have 20 favorites, this completely disables DSCM-Net and steam matchmaking.

MadelineRitchie commented 8 years ago

Solid points of course Chronial. The only thing I'd point out is your final point; the code I checked in leaves 4 nodes vacant similar to the behavior of the DSCM-net's autoconnect.

The reason I wrote this was for my own use case. I run Dark Souls through Steam Streaming, so alt-tabbing to connect to friends is slightly horrible to accomplish. A feature toggle of some sort was an idea, but I didn't want to put something on the UI without some feedback about whether anyone else would use this functionality at all.

Thanks for your comments and all the work you both are doing on DSCM.

Jason

Wulf2k commented 8 years ago

I would agree with Chronial that it wouldn't fit into the main branch as-is. Some preference should be given to people in Favorites at some point, but just blindly connecting to them all isn't ideal and that's a minor code change that can be tacked on whenever it's decided it's ready.

I can see the appeal for specific situations and have no objections to people forking off DSCM for those specific situations but until DSCM is more or less done I'd like to keep it focused on simplicity.

Chronial commented 8 years ago

@JasonRitchie For your use case it might

the code I checked in leaves 4 nodes vacant similar to the behavior of the DSCM-net's autoconnect.

Due to the delayed nature of connections It actually does not. Also don't get fooled by the abstractions I introduced. Due to its implementation it's actually not legal to call connectToSteamId() in a loop. That might even crash your game I think.

If you want to improve your use-case: You could abuse the IRC feature. Change the code to give your client a name you (and please us, too :) can identify. Then on the other machine open a normal irc client and send a direct message with the steamId you want to connect to to your client. You will get that message as a PRIVMSG and can handle it here: https://github.com/Wulf2k/DaS-PC-MPChan/blob/f240b69ba5518d89b8f5679a6af4b3ca8f2455c8/DaS-PC-MPChan/IRCClient.vb#L170. You just need to be aware that you are in the IRC thread here. But if you never release that, you could just access the DSProcess here and ignore thread safety.

But If you do that, please never release a build of it – it would be horribly insecure (but IMHO fine for personal use if your understand it)