[jdev] how to program a jabber game server
Daniel Noll
daniel at noll.id.au
Thu Feb 1 15:22:03 CST 2007
On Friday 02 February 2007 07:48, Neil Stevens wrote:
> Michal 'vorner' Vaner wrote:
> > On Thu, Feb 01, 2007 at 12:18:58PM -0800, Neil Stevens wrote:
> >> Actually for a game like battleship, and any game with incomplete
> >> information, you HAVE to do everything server-side. Otherwise it's too
> >> easy to cheat.
> >
> > Why? You can do the check after the game (as you would have done in real
> > world). It can be done for example lake this:
>
> ....
>
> > So it would be the same safety as in real game
>
> That's a good protocol for making such cheating detectable, but it
> doesn't prevent the cheating. A trusted server acting as moderator
> prevents the cheating, so it's still superior.
The only exploits in a game like Battleship are as follows (both of these
occur in the real game):
(a) Ability to look at the other player's layout - usually this didn't
happen directly but I do remember situations where a "spy" off-side
would hint to me the location of the ships.
(b) Ability to palm a ship and play it later in the game - this happens
quite often, and the only way around it IRL is to have a referee.
Nothing can work around (a) because it's basically some other user sitting in
the same room as the opponent, relaying their ship locations by IM to the
player. But Michal's protocol works around (b) in such a fashion that I
can't immediately see a way to successfully cheat through it.
I can think of a better way to implement it, however. Each player *encrypts*
the full contents of the board at the start, and sends the password for it at
the end. That removes the (albeit small) hash collision risk (though I guess
if you're playing against some guy in the CIA, they might have the computer
power to brute force your playing field still...)
Anyway as has been shown in various computer games, server-side game rules
just make it possible for only the server admins (or the guy running the
moderation bot) to cheat. :-)
Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://www.jabber.org/jdev/attachments/20070202/e9127c36/attachment-0002.pgp>
More information about the JDev
mailing list