ajanata / PretendYoureXyzzy

A web clone of the card game Cards Against Humanity.
https://pretendyoure.xyz/zy
BSD 2-Clause "Simplified" License
1.23k stars 397 forks source link

[RFC] Preserving points: good idea or not? #99

Open uecasm opened 10 years ago

uecasm commented 10 years ago

I was thinking about making games remember the scores from recently-left players, so that their score can be restored if they rejoin the same game later on (provided it hasn't been won and reset in the meantime).

The idea is to avoid penalising players who lose their Internet connection (or browser) mid-game, which sounds like a good idea at first glance.

It does come with some drawbacks though. The first is that by removing the score penalty for getting idle-kicked it might encourage more players to idle (or worse, to idle/rejoin/idle), which is frustrating for everyone playing. (The upside to this is that players who have to unexpectedly AFK for a while are more likely to Leave Game if they know they can come back later without losing their score.)

The other drawback is what to do with their hand. One possibility is to preserve that too, but that would mean having to hold those cards out of play (or risk dupes), and I don't like that idea at all (and it could potentially lead to deck exhaustion if many unique players leave a long-running game). The other possibility is to discard their hand (as at present), but combined with preserving their score this then could be abused to get a free mulligan. (I'm not sure how much of a problem that would be.) The free mulligan could possibly be mitigated by charging one point, but then that's going to penalise the people with bad connections again.

So, given the caveats, before I start writing any code I wanted to see what others think of the idea. Do the benefits outweigh the drawbacks?

ajanata commented 10 years ago

Perhaps only allowing people that legitimately lose connection (via a ping timeout) rejoin with their score would be a decent compromise. It'd still be possible to abuse it to get a mulligan, though.

I could go either way on this. Perhaps it could be a game option, and maybe even controlled by a server option (so some servers allow it and others don't). I don't know. =\

ajanata commented 10 years ago

Maybe a "stand up" feature could also be useful, with a time limit involved. It would remember your cards, but still count you toward the player limit so card starvation shouldn't be a problem. If you disconnect abnormally (ping out), it automatically makes you stand up. You can also manually do so if you need to step away for a minute or two. When you come back, it restores your status to normal.

The only issue I see is keeping track of that for pinged out players. Currently, there's no way to determine that PlayerName1 now is the same PlayerName1 that pinged out 5 minutes ago and restore that state. Once user accounts are implemented, that'd be much easier to do...

uecasm commented 10 years ago

Well, you do have some saved cookies. You could just generate a random hash for each player on first login and link it up if the ids match. Though this'd have to be careful; I've had instances where the server is convinced a player is logged in when they aren't, and they've had to log in with a different name to reconnect. Using session ids could both help and hinder that.

Regarding standups, an easy way to get them in and out of play would be to convert players to spectators and back. But as currently implemented spectators don't have hands/scores and have a separate limit. So there'd probably need to be a third category halfway between.

karlanke commented 4 years ago

Could this be a game option? I'm playing with friends in quarantine, where this is less likely to be abused (and we're seeing kicks on mobile when people switch apps)