[jdev] how to program a jabber game server
Michal 'vorner' Vaner
michal.vaner at kdemail.net
Thu Feb 1 14:34:50 CST 2007
On Thu, Feb 01, 2007 at 12:18:58PM -0800, Neil Stevens wrote:
> Michal 'vorner' Vaner wrote:
> > Do I get Volity right that just everything happens on the server and you
> > can not have games without server support? It is a bit glitch for things
> > like tic-tac-toe or battleship, IMHO.
>
> 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:
• Every side makes its sea
• Generates a random string
• Puts that together and makes a hash
• Sends that hash to the other side
• The other side does not know your sea, even by trying all seas - it
does not have tho random data
• After the game, you send the sea and hash
• It can be tested if it fits
• You can not decide you change your sea in the middle, because your
hash would not fit (with a good hash, you could not generate proper
"random" data)
So it would be the same safety as in real game
--
This email has not been checked by an antivirus system.
No virus found.
Michal "vorner" Vaner
-------------- 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/20070201/18a8698a/attachment-0002.pgp>
More information about the JDev
mailing list