Shoutbox

Can anyone creat this game - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: Can anyone creat this game (/showthread.php?tid=69282)

Can anyone creat this game by EBFL on 12-08-2006 at 08:17 PM

Is there any way of creating a game by script which is Rock, Paper, Scissors?


RE: Can anyone creat this game by Jimbo on 12-08-2006 at 08:23 PM

quote:
Originally posted by EnglandBoyForLife.
Is there any way of creating a game by script which is Rock, Paper, Scissors?
This is quite easy to do and would be successful i think. if no one has done it by tommorow i will have a go at it
RE: Can anyone creat this game by CookieRevised on 12-08-2006 at 08:34 PM

It isn't so easy at all though...

Not if you want to take in account the very easy way of cheating with this.

Threads about this exist, which also began with "it's dead easy". The cheating problems with implementing this kind of games is also discussed there.

;)


RE: Can anyone creat this game by elektra on 12-08-2006 at 08:39 PM

hmm yes the cheating idea...hmmm how about a lttle message blocker til both users have done !RPS <rock,paper or sissors>
Then it sends them
if its possible


RE: Can anyone creat this game by John Anderton on 12-08-2006 at 10:01 PM

How is the game to be played, between 2 users or between the user and the computer?
I have a solution for either. The solution lies server side ;)
For single player, pulse whether the user selected r,p or s and make the server select a random item as well, apply the rules and voila.
For 2 players, its more complicated. I have an idea but its long. Long story short, pulse what both users have selected to the server and tell it to decide who won :)

If you dont know who pulsed it, you dont know who wins. No cheating :)
So, what do you think? :)


RE: Can anyone creat this game by MicroWay on 12-08-2006 at 10:38 PM

Nice idea, but isn't it take too much of the computer, John Anderton?
Because you need to make, in the "single player mode", the computer "choose" one opition, without a sequence pré-defined and, on the "2 player mode", you gonna need to have the 2 comp. syncronized as I could see...


RE: Can anyone creat this game by CookieRevised on 12-08-2006 at 10:58 PM

quote:
Originally posted by elektra
hmm yes the cheating idea...hmmm how about a lttle message blocker til both users have done !RPS <rock,paper or sissors>
Then it sends them
if its possible
no, in whatever method you come up with like this, a message with the choice of either one of you needs to be send to the other. Upon which this other guy can easly cheat as he already knows what has been choosen...

quote:
Originally posted by John Anderton
How is the game to be played, between 2 users or between the user and the computer?
I have a solution for either. The solution lies server side ;)
Which is indeed a solution to the cheating problem.

The use of a 3rd party which first recieves both choices before sending the result.

------

anyways, all this was already discussed in older threads though. This is actually just repeating ;)

RE: Can anyone creat this game by Baggins on 12-09-2006 at 12:37 AM

how about storing the recived command in a variable until the local user sends theirs or visa versa


RE: Can anyone creat this game by Spunky on 12-09-2006 at 01:15 AM

quote:
Originally posted by Baggins
how about storing the recived command in a variable until the local user sends theirs or visa versa

Not possible without the commad being printed in the chat window first

However, in my ChangeMe! script, when the user receives a request to change the dp (when approve is on), their message isn't shown in the chat window until the user has clicked the yes or no option on the msgbox. Just a though to how it could be done
RE: RE: Can anyone creat this game by CookieRevised on 12-11-2006 at 04:51 AM

quote:
Originally posted by SpunkyLoveMuff
However, in my ChangeMe! script, when the user receives a request to change the dp (when approve is on), their message isn't shown in the chat window until the user has clicked the yes or no option on the msgbox. Just a though to how it could be done
No, that is just the same.... at one point or the other the choice of he who started it first will be known by the other, before that other makes his choice.

In your example, it is not the message which will hold the choice, it is the "request to change the dp" which will already hold the choice and thus seen by the other.
RE: Can anyone creat this game by The Brain on 12-11-2006 at 05:06 AM

This isn't at all finished yet, but it's somewhat functional, and proves that this concept can work. Both participants need the script, and all commands have to be sent via the Plus menu in the conversation window. But it works.

I haven't specifically tested this yet, but I am pretty sure it will break if you try and have more than one game going at once. Anyway, enjoy for now, i'll let you know when it's finished


RE: Can anyone creat this game by CookieRevised on 12-11-2006 at 05:19 AM

It doesn't solve the cheating problem....

It is easy to alter the script slightly to make it cheat and let you always win.


RE: Can anyone creat this game by The Brain on 12-11-2006 at 05:44 AM

If anyone is lame enough to alter the script so they can win every time, then good on them for it. I hope they are proud of their l33t hax0r skillz.

Seriously, that's just stupid. For the rest of us, who want to have a fair game of RPS, I hope you enjoy this.

And yes, I plan to make it more user friendly, with commands and stuff, rather than this whole Menu thing. I'm not going to stop working on it, just because Cookie doesn't like it.


RE: Can anyone creat this game by markee on 12-11-2006 at 05:45 AM

IMO you would be better off making a script for the likes of Connect 4 as it doesn't require having the messages show at the same time and is still easy-ish to make.


RE: Can anyone creat this game by John Anderton on 12-11-2006 at 07:46 AM

Ok. What about something like this.
Me and cookie are in a convo.
I click the rps script and select R (say)
Cookie, (who does have the script) is asked for his choice.
These choices are pulsed online and the script sends a confirmation of the person's choice (if needed 8-))
The result is pulsed back to both of us (and we can see a toast) but my client says out the result in the chat.

What this is doing is,
A) Taking results
B) Online verification as to whom sent the data ie the rps game was between me and cookie so the results come back to us.
C) Both of us get the results as a toast so we know who won without any cheating. Even if i edit my script (ie the script on my client), cookie is still getting the same result so i can't cheat :)

What do you say cookie? ;) I could make this but just not before the end of the scripting contest since i have my exams :) Maybe after them unless someone else is working on the script (in which case there are a few ideas for checking that which game is between which 2 people :P)


RE: RE: Can anyone creat this game by CookieRevised on 12-11-2006 at 11:40 AM

quote:
Originally posted by The Brain
If anyone is lame enough to alter the script so they can win every time, then good on them for it. I hope they are proud of their l33t hax0r skillz.
hehehe, good point though... but still :p

quote:
Originally posted by The Brain
I'm not going to stop working on it, just because Cookie doesn't like it.
Where did I say I didn't liked it???

I never said anything remotely about my personal preferences about this script. All I said where objective observations about the programming aspect of making such a script in general...

seriously, what's up lately with reading stuff which isn't there? :-/


quote:
Originally posted by John Anderton
Ok. What about something like this.
Me and cookie are in a convo.
I click the rps script and select R (say)
Cookie, (who does have the script) is asked for his choice.
These choices are pulsed online and the script sends a confirmation of the person's choice (if needed 8-))
The result is pulsed back to both of us (and we can see a toast) but my client says out the result in the chat.

What this is doing is,
A) Taking results
B) Online verification as to whom sent the data ie the rps game was between me and cookie so the results come back to us.
C) Both of us get the results as a toast so we know who won without any cheating. Even if i edit my script (ie the script on my client), cookie is still getting the same result so i can't cheat :)

What do you say cookie? ;) I could make this but just not before the end of the scripting contest since i have my exams :) Maybe after them unless someone else is working on the script (in which case there are a few ideas for checking that which game is between which 2 people :P)

It would work since this uses a 3rd party.
eg: a php script (or whatever) on a server. Or even a third contact for that matter (a bot?) which recieves the input from all players.

Thus, all it takes is a very small server side script which takes the input from all the players before it gives back the results. And thus before any of the players can see the otherone's choice.

This method should be used for all similar games where players need to give some input and where the winner is decided upon that input. Any other method will be cheatable.
RE: Can anyone creat this game by John Anderton on 12-11-2006 at 03:00 PM

quote:
Originally posted by CookieRevised
eg: a php script (or whatever) on a server. Or even a third contact for that matter (a bot?) which recieves the input from all players.
cbf to make abot so ill make a php soon. I hope no one minds if it comes around christmas cause my exams dont leave me much time to work :)
RE: Can anyone creat this game by Deco on 12-11-2006 at 05:20 PM

Ok let me clear this up....

The end point is that in a two player only version of any game using scripts will be open to cheating because at some point either personA will have to send their choice before PersonB sends his choice and by doing that PersonA will be transmitting a packet to personB and thus PersonB could sniff that packet and read the info even though it doesnt show in his chat window yet.

What you could do would be:

Person A chooses Rock and encrypts a package with MD5 containing "password1Rock" and sends it to Person B

B acks A's packet

B sends A a packet with md5 encryption containing "password2Paper"

A acks B's Packet

B sends A a packet with his password
A decypts B's first message and outputs his result

A sends B a packet with his password
B decrypts A's first message and outputs his result

If results are different someone cheated. (and if you didn't cheat, the other guy did so you should go play with someone else)

If results are equal A and B declare the winner for this round.

How can you cheat that Cookie?

Have fun!


RE: RE: Can anyone creat this game by CookieRevised on 12-11-2006 at 08:06 PM

quote:
Originally posted by Deco
Ok let me clear this up....

The end point is that in a two player only version of any game using scripts will be open to cheating because at some point either personA will have to send their choice before PersonB sends his choice and by doing that PersonA will be transmitting a packet to personB and thus PersonB could sniff that packet and read the info even though it doesnt show in his chat window yet.

What you could do would be:

Person A chooses Rock and encrypts a package with MD5 containing "password1Rock" and sends it to Person B

B acks A's packet

B sends A a packet with md5 encryption containing "password2Paper"

A acks B's Packet

B sends A a packet with his password
A decypts B's first message and outputs his result

A sends B a packet with his password
B decrypts A's first message and outputs his result

If results are different someone cheated. (and if you didn't cheat, the other guy did so you should go play with someone else)

If results are equal A and B declare the winner for this round.

How can you cheat that Cookie?

Have fun!
yep, indeed workable... without a third party...

Never thought of encrypting...

(Y)

But you don't need to bring packet sniffing into this though. Contact A can (and will) send a plain message to contact B and vice versa, which can (and will) be catched by the script's events.
RE: Can anyone creat this game by Deco on 12-11-2006 at 09:02 PM

I'm in the middle of making it :)

Post it as soon as it's ready!


RE: Can anyone creat this game by CookieRevised on 12-13-2006 at 12:58 AM

see [Release] RockPaperScissors - "Uncheatable"


Next time, please don't make multiple threads in cases like this, even if it is for releasing something.

Stuff said in the original thread might (and almost always will) be repeated in the new thread, etc...

As a matter of fact, people already requested for info on the how and why of the method you used in that new thread, forcing you (or anybody else) to repeat what has already been said here.

;)