Anti-cheating, part 2

Yay, I finally got the feature I was talking about in the last post working! It means that now the client cannot see the other player’s cards until they are actually played, and that this is enforced by the server (the info on the card is not transmitted to a client until the server judges that it is legal for it to see the card). I can also make spectating easy (spectators will only see what would be visible to an external player, i.e. neither of the players hands). It took longer than I thought, because I changed my mind a couple of times on the details. At first, I wandered a bit too far on the over-design side, but I  settled on a much simpler design that I think will be easier to live with in the future.


About fparadis2

Lead Game programmer
This entry was posted in Mox. Bookmark the permalink.

2 Responses to Anti-cheating, part 2

  1. Incantus says:

    Hey Black Mamba,

    I’d be more interested in hearing how you solved the cheating problem. I designed Incantus so that a network game was p2p, without a server involved. So each client runs the full state of the game. That eliminates the first category of errors, as you pointed out in a previous post, but there is the possibility of the player hacking his client to peek at cards in hidden zones (either his own library, or his opponent’s hand/library). I was looking into some mental poker protocols (basically, how would you build a p2p poker game where the only way the deck can be reconstructed is by the participation of all clients – so it would be impossible to cheat by peeking), but I couldn’t figure out how to make it work for a rules based magic game (unlike a non-rules based game, where it’s easy to hide the identity of the card since it has no relevance for play). Anyway, nice work. I look forward to being able to check out how you handled certain aspects of the rules (like replacement effects, last known information, etc).

  2. fparadis2 says:

    That looks like a terribly hard problem! You can probably do something about it though, and I don’t think that the fact that MTG has more rules than poker forbids this class of protocols. Basically, we want to hide the same information in MTG than we want to hide in poker: the “identity” of the card (and also the order of the cards in the library, etc…) As far as I can see, the rules are made in such a way that they will only apply to “visible” cards. You can only target visible cards. When playing a card, you have to show it to opponents anyway. It doesn’t make sense to “check a rule” against an unknown card.

    So this might work. For example, when drawing a card (which is the only way a completely hidden card can become visible to a player), the player can ask the other players for their “part of the decryption process” to decrypt the card. The other case, where a card known to a single player becomes known to everyone (comes into play), is more trivial: It is simply a matter of verifying that the given card was indeed in the deck at the start and that it is legal to play now.

    ps. I didn’t venture into replacement effects or the dreaded dependency layers yet 🙂

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s