Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: May 2001
Posts: 3
Junior Member
Junior Member
Offline
Joined: May 2001
Posts: 3
I was looking to add a little "game" to my boards, and all I could find along those lines was the Q&A game.

I was thinking a Janken (rock paper scissors) hack would be great.

For example, someone starts a game topic, and in addition to whatever text they enter they also select one of the three. It is not displayed, however, until someone replies with their own selection. Then both are revealed and results are listed.

I was hunting down a ROM of one of my childhood favorite games - Alex Kidd - when I came up with this. Anyone who ever had a Sega Master system will know what I have in mind. smile

Sponsored Links
Joined: Mar 2000
Posts: 615
Member
Member
Offline
Joined: Mar 2000
Posts: 615
Now I've seen everything shocked

Joined: Jan 2000
Posts: 825
Member / CodeFixer
Member / CodeFixer
Offline
Joined: Jan 2000
Posts: 825
don't think this is gonna make it past the planning stage.

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
it might be cool...:D

not sure if there'll be many takers on writing it... I do remember a couple of threads in which someone developed a ubb game, may have been easy or borg, can't remember. Search the beta forums, or the German forums.


- Allen wavey
- What Drives You?
Joined: May 2001
Posts: 6,708
Member
Member
Offline
Joined: May 2001
Posts: 6,708
That sounds good, I doubt many scripters would be intertested...

Sponsored Links
Joined: Mar 2000
Posts: 615
Member
Member
Offline
Joined: Mar 2000
Posts: 615

Joined: Nov 2000
Posts: 2,759
Pooh-Bah
Pooh-Bah
Offline
Joined: Nov 2000
Posts: 2,759
Try this as a start laugh

Code
code:

ANybody else want to take it from there...that's about my perl skill limit laugh

-Tacks

[ June 20, 2001 12:44 PM: Message edited by: tackaberry ]

Joined: Nov 2000
Posts: 2,759
Pooh-Bah
Pooh-Bah
Offline
Joined: Nov 2000
Posts: 2,759
OK, I've been playing with this some more. Instead of asking making you lose everytime. I've added a random to pick the computer's choice, so the gameplay works. Keeps track of your record during the play as well.

If anyone wants to give a hand to a newbie it would be greatly appreciated. My pseudo-code needs a lot of scrubbing.

Code
code:

laugh

-Tacks

[ June 20, 2001 12:43 PM: Message edited by: tackaberry ]

Joined: May 2001
Posts: 2,798
Member
Member
Offline
Joined: May 2001
Posts: 2,798
Looks like the code would work .. I can try and implent it into a thread and try and get it to work .. well maybe not because I couldnt figure out how to so nevamind

[ June 20, 2001 02:09 PM: Message edited by: Tech-Ni-Kal ]

Joined: Nov 2000
Posts: 2,759
Pooh-Bah
Pooh-Bah
Offline
Joined: Nov 2000
Posts: 2,759
It works from the shell. I just don't know how to get it into html or ubb.

For that matter, the way it would work is that the person who posts makes their selection. Both the name of the person and their pick are stored in a variable.

The second person then posts their reply. It compares their choice with the first person and determines who wins. The second person is then asked to make another pick, which then is applied when the third person replies.

For the time being, this works as a standalone game, using random picks each time.

I've modified it further to include statistics (W-L-T and %), along with how many times someone played each choice.

Anyway, here is my latest modification:

Code
code:

-Tacks

[ June 20, 2001 02:21 PM: Message edited by: tackaberry ]

Sponsored Links
Joined: Nov 2000
Posts: 2,759
Pooh-Bah
Pooh-Bah
Offline
Joined: Nov 2000
Posts: 2,759
Unless somebody wants to help get this to work in UBB, this thread might as well be moved over to the Perl forum.

I any case, I made some more changes. Instead of the computer making a random pick, there are now 3 different opponents that you can choose from - The Rock, Johnny the Paperboy (Better off Dead) and Edward Scissorhands. Each of them uses a different approach in their "thinking".

The Rock will still just make a random guess.

Johnny will assume you will repeat your past choices, so if you keep chosing Rock, chances are he will pick Paper to beat you.

Scissorhands assumes that you will pick something different, so if you pick Rock, he will guess next time you will probably pick either Paper or Scissor, and will guess accordingly.

Anyway, if any of your Perl-gods want to help me out, please chip in. Granted I've been having fun with this little script.

Code
code:

-Tacks

Joined: Nov 2000
Posts: 652
Member
Member
Offline
Joined: Nov 2000
Posts: 652
Looks great tackberry, I look foreward to seeing the finished thing.

Joined: May 2001
Posts: 2,798
Member
Member
Offline
Joined: May 2001
Posts: 2,798
Wow thats even better. Well it looks awesome .. Are you thinking about making it an official hack?

Joined: May 2001
Posts: 3
Junior Member
Junior Member
Offline
Joined: May 2001
Posts: 3
Wow. I must say I never expected this little idea of mine to go anywhere. I'm impressed guys. smile

Anyway, I figured if nothing else I could find some images to contribute to the effort.

[Linked Image]
[Linked Image]
[Linked Image]

[Linked Image]

Joined: Mar 2001
Posts: 9
Junior Member
Junior Member
Offline
Joined: Mar 2001
Posts: 9
Um, I don't get it. What would this be used for?

Joined: May 2000
Posts: 251
Member
Member
Offline
Joined: May 2000
Posts: 251
I think they just ran out of ideas for usefull hacks laugh

Joined: Oct 2000
Posts: 32
Member
Member
Offline
Joined: Oct 2000
Posts: 32
lol@radio


[Linked Image from gringo14.virtualave.net]
Joined: Nov 2000
Posts: 2,759
Pooh-Bah
Pooh-Bah
Offline
Joined: Nov 2000
Posts: 2,759
The point is to have a game thread, where one person initiates the thread making a choice: rock, paper, scissors. Then a person replies to the post, making their choice of : r, p, s. The reslts are determined and the second player makes another pick, which sets up the game for the third person.

The scripts as it stands works, but isn't suited for UBB. I'm VERY new to Perl, as you can probably tell by my attempt to code it.

Ideally the "hack" would allow the game to progress, and would possibly provide stats on the people who participated in the thread.

Personally, I think the game threads can be a lot of fun. Regardless, it's been a useful exercise for someone trying to gain a working knowledge of Perl, but needs some coaxing from a more seasoned programmer familiar with html, cgi and ubb.

Those of you who have had kind words, thanks! It's been a fun challenge, and its a good feeling to get something to actually work, then rip it apart and improve it again smile

-Tacks

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
I think it looks pretty cool, and if integrated into a thread, would spur newbies on to post... not that we need it here, mind you ;), but could prove useful on a lotta sites...


- Allen wavey
- What Drives You?
Joined: Nov 2000
Posts: 2,759
Pooh-Bah
Pooh-Bah
Offline
Joined: Nov 2000
Posts: 2,759
Thanks AA,

So any chance you or someone else may be up to the task to UBB it?


Actually, I'm now working on a version of Mastermind in Perl (Not the MM here mind you--so it's nothing like Ultimate Navaho). I think that would actually work better as a thread than Rock, Paper, Scissors. I'll post it when done.

-Tacks

[ June 22, 2001 11:05 AM: Message edited by: tackaberry ]

Joined: Nov 2000
Posts: 2,759
Pooh-Bah
Pooh-Bah
Offline
Joined: Nov 2000
Posts: 2,759
I up-ed the file so it can be downloaded for those of you who don't want to cut/paste laugh

Rock, Paper, Scissors Script

I also was able to get my Mastermind script to work.

Like RPS, MM also needs some help. It works as a basic script, but needs work in order for it to possibly appear in UBB. If anyone wants to help work this through, it would be greatly appreciated.

-Tacks


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)