Valhalla Legends Forums Archive | General Programming | A problem similar to dice rolling...

AuthorMessageTime
St0rm.iD
I'm making a multiplayer darts game for my job. Basically, the accuracy of your dart throwing depends on how fast you can click your mouse when a scroller thing gets closest to the center (similar to football games where you kick the field goal).

Right now, bascially a player says "I was 82% accurate" to all the other players. As you can tell, this is very easy to exploit. My only other idea was to do it remotely, but that would kind of ruin the point of reaction time. Any ideas?
April 25, 2004, 10:28 PM
Adron
Is the scroller thing just going back and forth?

If it's more like a target that's drifting around, and you're trying to get it to hit the center, you could send a random number seed from the server to the client. The client would move the crosshair following the random numbers generated, and perhaps offset by the mouse cursor.

The response from the client would be how many random numbers were generated before the mouse was clicked, and how much the cursor has been offset by the user. The actual accuracy value would be calculated by the server from generating the same sequence of random values modifying the x/y position, adding the offset from the client, and checking how close that is to the center.

It would still just be obscurity, but it'd be at least a bit more complex to emulate. You could also disregard responses that were too perfect (i.e. where the click happened after the first value was generated).
April 25, 2004, 10:40 PM
St0rm.iD
It's just going back and forth :-\

I think I'll just checkrevision my stuff and use some godawful formula to encrypt the numbers and call it secure.
April 25, 2004, 11:52 PM
Noodlez
Encrypting it would only secure it on the network level. What's preventing a user from directly modifying the program to send 100% accuracy?

How does your connection work? Are all the peers connected to each other individually, or is there one main server which all the users connect to?
April 27, 2004, 1:46 AM
St0rm.iD
1 main server that just echoes everything to everyone else
May 1, 2004, 3:26 PM

Search