buttonmen-dev / buttonmen

Buttonmen - an online dice game
Other
16 stars 24 forks source link

allow privacy settings for game chat #464

Closed cgolubi1 closed 7 years ago

cgolubi1 commented 10 years ago

Players in a game should be able to specify whether the game chat is visible only to the participants, or is visible to anyone who looks at the game.

cgolubi1 commented 10 years ago

On the old site, chat was private by default, but if both players checked a box to make it public, it became public and could be viewed by anyone. So as a first cut, we should do something at least that good.

(On the old site, it was only possible to change the privacy setting while submitting your attack. A very desirable improvement would be the ability to change the privacy setting on game chat separately from attacking.)

cgolubi1 commented 10 years ago

Flagging this as a wish list item for the beta because i think people might like the ability to have non-public chat at all. If i don't get to it, i don't, but setting the milestone to indicate that i'd like to.

AdmiralJota commented 10 years ago

The other two tickets that mentioned this are closed, so I'm mentioning it here so it doesn't get lost:

Rather than the chat being private by default, it might be more convenient if it were public by default, with a checkbox that either player can use to make it private at any time (including when the game is being created/accepted).

cgolubi1 commented 10 years ago

I was thinking about this functionality, and swung by to make sure this ticket was listed for beta, which it is. Responding to the comment above this: i think chat for individual games should be private by default because it will match player expectations and provide some relatively easy way for players to chat privately with each other before we implement player mail.

I think the following functionality would be sufficient to get around the convenience problems with private chat we had on the old site:

Frankly, i think that last one would solve 95% or more of the annoyance around default-private chat on the old site, which was really almost all around story tournaments.

AdmiralJota commented 10 years ago

Are there any other opinions on whether chat should default to public or private?

(I'm assuming that regardless of the default, it would require both players to agree to change it from private to public, but that either player could change it from public to private unilaterally, which I think is something we both agree on.)

irilyth commented 10 years ago

I like the idea of having it default to public in tournaments. (Or having a checkbox at tournament-creation time, but having the box default to public, so if you want a private-chat tournament, you have to remember to do that, rather than vice-versa.) And then just generally promote the idea that tournaments are public, and voila.

cgolubi1 commented 10 years ago

Sure, as long as non-tournament games default private, i'm happy to see tournament games default public. I still think the checkbox-at-game/tournament-creation solution i outlined above is the way to go, but if we're talking about how the checkboxes are checked by default, default-public for tournaments and default-private for games seems perfectly fine.

yawetag commented 10 years ago

Would it be possible to make tournament games public to only players in the tournament, yet still allowing the players to make it public?

Andrew Senger asenger@gmail.com

On Sun, Aug 24, 2014 at 8:19 PM, cgolubi1 notifications@github.com wrote:

Sure, as long as non-tournament games default private, i'm happy to see tournaments default public.

— Reply to this email directly or view it on GitHub https://github.com/buttonmen-dev/buttonmen/issues/464#issuecomment-53219123 .

cgolubi1 commented 10 years ago

Would it be possible to make tournament games public to only players in the tournament, yet still allowing the players to make it public?

Anything's possible, but that sounds like significant effort, and i can't think of a good use case for it. Do you have one in mind?

yawetag commented 10 years ago

I guess the first question is how public we want the chat to be.

If the idea is that players want privacy as a default, it should be understood that their chat is visible by as few people as possible. In a one-on-one match, that assumption is that only the two players can see it. For a tournament, that privacy would naturally expand to all players in the tournament.

If the idea is that players want public chat as a default, it should be specifically stated to the players, just above the chat area and next to the Submit button for the chat message.

Andrew Senger asenger@gmail.com

On Sun, Aug 24, 2014 at 9:27 PM, cgolubi1 notifications@github.com wrote:

Would it be possible to make tournament games public to only players in the tournament, yet still allowing the players to make it public?

Anything's possible, but that sounds like significant effort, and i can't think of a good use case for it. Do you have one in mind?

— Reply to this email directly or view it on GitHub https://github.com/buttonmen-dev/buttonmen/issues/464#issuecomment-53221607 .

dwvanstone commented 8 years ago

I'm adding this as my bugfix of the month -- I think as new players come in they would expect their chats to be private (by default).

AdmiralJota commented 8 years ago

I'll place my vote, then: I'd like it to be public by default.

There's a lot of potentially entertaining chat out there, such as story games, or interesting tidbits like http://buttonweavers.com/ui/game.html?game=1, or cases where one player wants to share something cool that happened but the other player isn't around to change the game settings to public. But on the old site virtually no one ever bothered to turn on public chat, so all of that was lost.

But of course, it should be very clear to players when the game chat is public, and it should be very easy for players to unilaterally make it private (both from the game creation screen and from the game page -- I like @cgolubi1's suggestion of a button that's independent of submitting your turn, to make it even easier).

Perhaps it's voyeuristic of me, but I like being able to go back and see what people were talking about during a game, their thoughts on strategies and so on. And it's very rare that I'd be using game chat to discuss anything private -- and that'll be especially true once we implement player mail.

irilyth commented 8 years ago

I've been in chats where people said things that they didn't realize were public, not catastrophically so, but things they wouldn't have said if they'd realized.

I still think they should be public by default, for basically the reasons that Jota mentioned. Just put "(PUBLIC)" in bold under the word "Chat" next to the box (and perhaps "(private)", perhaps not in bold, if its private), and I think it'll be quite obvious. (Or something else if that turns out not to be obvious enough.)

dwvanstone commented 8 years ago

I think game creation would be a good place to add a dropdown option of "Chat is public" [by default, which is fine by me] and "Chat is private". Marking somewhere on the page itself that Chat is PUBLIC would be helpful.

Maybe in a alter fix we could allow users to change the chat from public to private or private to public.

blackshadowshade commented 8 years ago

I don't like the idea of an interim fix here. If we're going to do this, then let's do it right from the beginning.

I'm all for having chat default to public, but with an easy way on the game screen to change the privacy setting. We would store and display both player's settings, and if either player has chosen private, then that game's chat would only show for the two of them.

blackshadowshade commented 8 years ago

Chaos, you're currently assigned to this issue. Will you be tackling this issue this month, or will I?

cgolubi1 commented 8 years ago

Sure, i'll work on this for 2h in February.

blackshadowshade commented 8 years ago

So, I've been looking at this, and unfortunately, it's also blocked by #1942.

Hurtay commented 8 years ago

I would like to pick this as my current BotM but it got this label alrady. So please count it as double label.

I'm not sure which way I'd like the default chat to ge. Either way is ok with me. But when I came to the site I expected the chat to be private and was quite surprised to find out it's public.

I think it would be good when players don't have to decide beforehand if the chat should be public or private. Sometimes you don't expect the chat to drift to private things. Then it would be the right moment for one player to ... tick the "private" box or whatever.

cgolubi1 commented 8 years ago

Okay, so i owe four hours of work on this. Since we don't have a consensus on what the default setting for new games should be, i think the implementation order should be:

  1. Database and backend support for chat to be private, without a way to set it
  2. UI support for modifying the publicness of chat during a game
  3. Support for setting the publicness of chat for new games, as a per-player default, or whatever

(But i doubt my four hours will get me past item 1 and possibly item 2.)

In terms of 2, i think the way this should work is that the "Recent game chat" column header should say whether the chat is public or private, and there should be a toggle button on that column which invokes a standalone API function. The DHS site let you toggle your chat publicness as part of submitTurn (in effect); i don't see any benefit to tying the setting change to either submitTurn or submitChat (i remember it being super annoying that you could only set your chat to public while making an attack). So that's what i'm going to spec out, but probably the standalone inaccessible backend will be a separate pull to keep pulls smaller.

irilyth commented 8 years ago

+1 for the idea of not tying the chat setting change to submitTurn or submitChat.

I suspect that there's no particular reason to work on #1041 or #1801 at the same time as this, but in the perhaps unlikely event that there's any overlap/synergy there (e.g. "given that we also want #1041 and #1801, we should implement this a different way than we would otherwise"), I figured I'd mention it. (Those other things came to mind in particular because they're in the same "argh, why do I have to wait for the game to change state before I can do that" category as the privacy setting was on the DHS site.)

cgolubi1 commented 8 years ago

Yeah, that's fair enough --- i don't think this implementation will have anything to do with #1041 or #1801, but good examples. :>)

AdmiralJota commented 8 years ago

Regarding part 1, I strongly favor making the database field for this per-player, so that either player can set their public/private preference for a given game independently, and the game will use the more conservative of the two.

cgolubi1 commented 8 years ago

Regarding part 1, I strongly favor making the database field for this per-player

Yep, that's what i was planning to do --- it's what DHS did, and it seems obviously correct.

yawetag commented 8 years ago

Can players set defaults for their chat? If I always want mine to be private, I shouldn't have to change it each time I start/join a game, and the same if I always want it public.

Also, the players should be able to see what their opponent's setting is set.

Andrew Senger asenger@gmail.com

On Sat, Jul 2, 2016 at 9:43 PM, cgolubi1 notifications@github.com wrote:

Regarding part 1, I strongly favor making the database field for this per-player

Yep, that's what i was planning to do --- it's what DHS did, and it seems obviously correct.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/buttonmen-dev/buttonmen/issues/464#issuecomment-230132104, or mute the thread https://github.com/notifications/unsubscribe/AFx8YnVtJXN8RYGNvXNBJvP_w5_CaYhbks5qRyHugaJpZM4BcYVW .

cgolubi1 commented 8 years ago

SIGH. Okay, wise guys, i have realised we're going to need a bit of a refactor in order for this to work. So i need to think about how it should work.

Here's the issue: suppose you have a game with private chat, and you continue the game copying chat. What should happen? For context, please note that right now i'm only working on the "game load" part of this feature, that is, the part where if a player in a game has specified (via an interface that doesn't exist yet and i'm not designing yet) that chat should be private, the chat does not get loaded when a non-participant views the game. So i'm not interested in defaults, i'm just interested in logic.

Say a player in game N has specified private chat. Then game N is continued into game M. Then both players in game M (again, not talking yet about how or about what the default is) have specified public chat. What should happen when a non-participant loads game M? Here are some types of options:

  1. The non-participant can see chat for game M and for game N
  2. The non-participant can see chat for game M, but not for game N
  3. This situation is illegal --- we should somehow force every game in a continuation chain to have the same chat publicness settings
  4. Modify chat loading so that a non-participant can never see chat from a previous game, even if all games involved are public

My opinions on these in the next comment.

cgolubi1 commented 8 years ago

IMO, option 1 is obviously incorrect; it has the dubious advantage of being what i'd built before i realised there was a problem, and that's about it.

Option 2 has logical coherency going for it --- it's the thing which in some sense makes the most sense as an implementation, but the downside is that right now, loading chat from previous games uses pretty heavy cheating/direct database access, and has no awareness of the game structure of the previous game. So in other words i'd have to add a bunch more logic and additional database selects to implement option 2. That's not a dealbreaker, but it's why i didn't just implement this option without polling y'all.

Option 3 strikes me as very difficult for players to use (regardless of how i build the UI for it), and likely to not support use cases players actually want and should expect (e.g. a continuation game from a story tournament in which the continuation game has private chat but the story tournament game should stay public for posterity). So i don't like that much either.

Option 4 is my actual proposal here --- it does make an active change to how chat continuation is visible to non-players for public games right now, but it leads to the simplest and least error-prone implementation of chat privacy.

Note that i do think that, in option 4, the message which says "Continued from Game N" should always be visible to the non-player, regardless of chat privacy, because the chain of games is potentially interesting to other players and is orthogonal to chat privacy. So i do plan to implement that.

What think? Anyone think option 4 is a bad idea and/or that one of the others would be substantially better?

irilyth commented 8 years ago

Say a player in game N has specified private chat. Then game N is continued into game M. Then both players in game M (again, not talking yet about how or about what the default is) have specified public chat.

This seems like a somewhat weird situation. You said "the heck with defaults", but one thing I'd note is that if a continuation game by default gets its chat settings from the previous game, I wouldn't expect this to come up all that often.

That said, my opinions:

  1. The non-participant can see chat for game M and for game N

This seems probably ok, but not quite logically correct. If a participant changes the chat settings for M, they might expect it to affect everything on screen in the chat log when someone loads M, including the N chat; but they might not.

  1. The non-participant can see chat for game M, but not for game N

This seems ideal to me.

  1. This situation is illegal --- we should somehow force every game in a continuation chain to have the same chat publicness settings

I don't like this one: The simple way would be to make it so you can't change the chat setting in a continuation game, which seems bad if you accidentally say something you wish wasn't public; the complicated way would involve going back through the chain and changing things for a bunch of closed games, which seems undesirable. Especially if one was a story game, or whatever -- in general, if I start wanting to have a more-private or more-public conversation in a game, I don't want to have to worry about whether that's going to somehow retroactively change things in other already-finished games.

  1. Modify chat loading so that a non-participant can never see chat from a previous game, even if all games involved are public

This seems simple, and probably ok. If you want a non-participant to see chat from game N, point them to game N, and voila. I guess it could be annoying if you have two-game-long stories, and you want to see the whole thing at once by loading M.

So, I vote for #2, #4, and #1 as relatively fine, and preferable in that order; and #3 as not really good.

I've now read Chaos's comments too, and am inclined to agree that if #2 is a pain, #4 is fine, for now and perhaps forever.

cgolubi1 commented 8 years ago

This seems like a somewhat weird situation. You said "the heck with defaults", but one thing I'd note is that if a continuation game by default gets its chat settings from the previous game, I wouldn't expect this to come up all that often.

Yeah, i definitely agree that we can and should tweak defaults to minimize how often this comes up. But if we make it easy to change chat privacy on the fly, it will ever come up, so i wanted to talk about what would happen if it did.

I have no memory at all of how the DHS site handled privacy and game continuation, but one reason i don't is that on DHS, chat was private, and it was a pain to change it. So it was pretty unlikely that you'd wind up in a situation in which you had a public-chat game which was a continuation of a private-chat game (and thus might be surprised by your previously-private chat being made public). I personally don't remember ever making chat public except during tournament games, which aren't continuations.

But if we do things that we've stated we might want to do, like have a per-player default chat-publicness preference, and make it easy for players to change their chat settings on the fly, then we have to expect there will be a non-zero number of private-then-public continuation chains floating around, and thus that we actually have to handle this case.

irilyth commented 8 years ago

Yep yep, I definitely agree that we need to handle it -- if nothing else, the code is obviously going to do something one way or another. :^)

I brought up the likelihood that it wouldn't happen often (a) in case others had in mind more common situations when it might happen; (b) by way of suggesting that even if the initial solution isn't ideal, it'll probably be non-ideal for a pretty small number of people.

In any case, it sounds like we agree that #2 is better but harder than #4, and that both are ok. (If so, if anyone else disagrees, they should speak up. :^)

cgolubi1 commented 8 years ago

I guess it could be annoying if you have two-game-long stories, and you want to see the whole thing at once by loading M.

Yeah, another argument i'd make in favor of 4 being consistent with the current state of technology is that right now, when game M ends, continuation chat from the previous game N stops being visible (to everyone, including the participants). I haven't heard any complaints about that, which makes me think that people aren't using continuation chat to write things for which it's important to have two full games of chat visible on the same page. (Or they are, and they're just not complaining where i can hear them, of course.)

irilyth commented 8 years ago

Huh, interesting. A couple of the first few story games I was in spilled into two games, and it was nice to have the game N chat visible while game M was in progress. But indeed I didn't notice (and it didn't bother me) when it wasn't visible after the game ended, something that I always forget even happens.

AdmiralJota commented 8 years ago

Unfortunately, it seems that number two really is the Right Answer. One and three are bad for the reasons you specified, and number four breaks a common case (game with public chat follows on from earlier game with public chat) in order to support a much rarer one (private chat following on from public chat).

If number two really is prohibitively hard, then I guess it'll have to be four. But I wonder if this is the kind of situation that would benefit from letting it simmer for a couple of days before looking at the code again, to see if on a second pass you might end up seeing a way to implement it that's not quite so painful. By the way, what/where are the functions in questions? Maybe extra eyes looking at it might help.

There is also another related case: a game with private chat that follows on from a game with public chat. In that case, is the assumption that non-participants just don't see any chat at all on the second game? (That seems like the most reasonable thing to do.)

You said "the heck with defaults", but one thing I'd note is that if a continuation game by default gets its chat settings from the previous game, I wouldn't expect this to come up all that often.

I do agree that, when we get around to that point, having a continuation game inherit its chat privacy settings from its parent on creation makes sense.

irilyth commented 8 years ago

number four breaks a common case (game with public chat follows on from earlier game with public chat) in order to support a much rarer one (private chat following on from public chat).

Just to clarify, the nature of the breakage is that if a non-participant loads game N+1, they'll see the chat from game N+1 (if N+1 is public) just not the chat from game N, while the game is in progress -- exactly what they'd see if the game was over. Nothing will change at all for participants; this only affects people looking at the game, before it ends, who aren't players.

That seems sufficiently minor to me that I think it's ok to save some dev cycles on it. (Especially if it wouldn't be any harder to fix later than to fix now, because then we can always fix it later if we decide it's more important than we thought.)

cgolubi1 commented 8 years ago

Yeah, i also want to question the assertion that what option 4 breaks is "a common case" --- specifically what it breaks is the ability for a non-participant to see chat from game N+1 and chat from game N on the same page while game N+1 is in progress.

My guess is that that's not a very common case, mostly weighed through the fact that i can't remember ever personally taking advantage of it, can't think of something it enables which would be hard to do otherwise, and don't have the impression that player satisfaction is very bothered by that kind of detail of chat continuation in general (e.g. i don't feel like we get a lot of feature requests related to ways in which chat continuation is broken or works strangely or whatnot).

Anyway, i may be wrong, that's why i'm asking. Why do you think this is a common case?

AdmiralJota commented 8 years ago

The "common case" I was referring to was "a public game is a continuation of another public game".

cgolubi1 commented 8 years ago

The "common case" I was referring to was "a public game is a continuation of another public game".

Sure. Public games which are continuations of other public games are common on the site right now. My argument is that it's not very common for people to actually use the ability for a non-participant to see chat from game N+1 and chat from game N on the same page while game N+1 is in progress, and thus that if we changed that functionality so that the non-participant had to click on "Continued from game N" in order to see the game N chat, people would not be sad (and the mechanism by which they would not be sad is that they would not notice the difference).

I know it's speculative, but that's what i'm looking for counter-arguments about.

AdmiralJota commented 8 years ago

I suppose I don't have any stronger argument than just "something works right now but would stop working if we did this".

dwvanstone commented 8 years ago

I think case 4 is reasonable.

I've never tried looking at this before on other people's games. I found a game thread that I'm not involved in with comments: (earlier games)->13238->13498->13916->14614 [active]. When I look at game 14614 I also see comments made in 13916, with a link to 13916. I don't see the earlier game comments. I have to click on the links anyway to see the earlier games. There's not much difference for me if game 14614 only shows me comments to 14614 with links to the earlier games.

cgolubi1 commented 8 years ago

I suppose I don't have any stronger argument than just "something works right now but would stop working if we did this".

Yeah, there's nothing wrong with that argument. I make it a lot myself. :>)

It's not that 2 is prohibitively hard, but 2 gets harder and harder the more cleanly i want to implement it (i.e. the right implementation is to strip those hackish "Continued from game N" messages from the chat lot, and instead modify the game table so that chat continuation is a property of the game and therefore we can load the continued-from game info at game load time, rather than doing loads from the game table at chat load time, but then you're still adding another select from the game table to get the privacy settings of the continued-from game, so do you want to just do those selects, or do you want to load the entire continued-from game as its own game object, and who even knows what kind of crazy things would break if we did that. And also to a comment you made earlier, obviously the right answer is that if N+1 is private and N is public, the non-player browses to N+1 and sees that N+1's chat is private but also sees N's text (which actually isn't that much additional code complexity since we already have all the data at that point)...) Basically that all seemed to get very complicated very quickly, whereas if we just say "okay, chat continuation is only for participants" (except for the handy nav tabs, which i use all the time for all sorts of games), suddenly modelling this reasonably cleanly is much easier.

irilyth commented 8 years ago

About doing it more cleanly: Are there any other open tickets that would also benefit from a cleaner implementation of continuation? If so, that might make it more worthwhile (or might imply that we'll do it later, when we address those tickets, or something).

At a glance, searching for "continuation", I don't actually see anything obvious, but I'm not sure about some.