Author Topic: [Inform Rock Paper Scissor game]  (Read 426 times)

[Inform Rock Paper Scissor game]
« on: October 08, 2018, 07:20:08 PM »
Hy Guys
Here I post a my little program
The Inform version of Rock Paper Scissor. Building it in Inform has been interesting to re-think some ideas under the light of evnt driven coding.
So in compressed file attached you get the Assets folder for image files, the .FRM and 2 file .BAS because I hae used 2 different ways to get the pause between two different moments of the output

in the first the flow in modulated by this
Code: [Select]

    IF PlayerChoose = 20 THEN ' wait 2 sec
        in! = TIMER
        DO WHILE TIMER - in! < 2
        LOOP
        restoreGame
    END IF
    IF PlayerChoose THEN PlayerChoose = PlayerChoose + 1 ' here we pass one time(20 frames) into sub_Display before to reset the game

in the second way I have used a more suitable QB64 code
Code: [Select]


    IF PlayerChoose THEN _DELAY 1
    IF PlayerChoose = 5 THEN restoreGame
    IF PlayerChoose THEN PlayerChoose = PlayerChoose + 1 ' here we pass one time(20 frames) into sub_Display before to reset the game

Thanks to try
Welcome feedback

Offline Pete

  • Cuz I sez so, varmint!
Re: [Inform Rock Paper Scissor game]
« Reply #1 on: October 08, 2018, 07:35:55 PM »
I'll wait for BPlus to make it into...

Rock-Paper-Scissors-Lizard-Spock.

I'll check back in 10-minutes.

Pete :D

Re: [Inform Rock Paper Scissor game]
« Reply #2 on: October 08, 2018, 09:03:13 PM »
Hey Pete, you've seen that? :D

Hi TempodiBasic, worked without a hitch. You give points for ties? Good way to get quarters!
« Last Edit: October 08, 2018, 09:25:39 PM by bplus »
B = B + ...
QB64 x 64 v1.2 2018 0228/86 git b30af92
QB64 v1.2 20180228/86 git 6fde149
QB64 v1.2 [dev build]_d84bb00

Offline FellippeHeitor

  • QB64 Developer
  • LET IT = BE
    • QB64.org
Re: [Inform Rock Paper Scissor game]
« Reply #3 on: October 09, 2018, 04:21:43 AM »
That was fun, Tempodi! Thanks for sharing.

BTW, if you just set the pictures .Hidden property to true it's already enough to keep users from clicking them - no need to also set .Disabled = True.

Disabled is usually to indicate a control can't be clicked (although it's still visible) since that'll make it look different. For a picture box that wouldn't make sense, so you're right to hide them (in which case hiding is enough).

Re: [Inform Rock Paper Scissor game]
« Reply #4 on: October 09, 2018, 10:19:00 AM »
Thanks Fellippe
this is one of the bad behaviours that I must kill, coming from previous experience with other RAD WYGISWYG programs.

Re: [Inform Rock Paper Scissor game]
« Reply #5 on: October 09, 2018, 07:53:46 PM »
@Bplus

please go to see at this link https://www.qb64.org/forum/index.php?topic=686.0
you'll find our new game! :-)

see here some screenshots

Re: [Inform Rock Paper Scissor game]
« Reply #6 on: October 09, 2018, 07:56:48 PM »
@Fellippe

about
Quote
BTW, if you just set the pictures .Hidden property to true it's already enough to keep users from clicking them - no need to also set .Disabled = True.
it is equal to say that I cannot use an hidden item (button, radiobutton, checkbox, switch) that interacts with user...
I must find another way to code a joke that I have in mind.

Offline SMcNeill

  • QB64 Developer
Re: [Inform Rock Paper Scissor game]
« Reply #7 on: October 09, 2018, 08:06:08 PM »
@Fellippe

about
Quote
BTW, if you just set the pictures .Hidden property to true it's already enough to keep users from clicking them - no need to also set .Disabled = True.
it is equal to say that I cannot use an hidden item (button, radiobutton, checkbox, switch) that interacts with user...
I must find another way to code a joke that I have in mind.

Can you set the button to a transparent color? _RGBA32(0,0,0,0)

Offline FellippeHeitor

  • QB64 Developer
  • LET IT = BE
    • QB64.org
Re: [Inform Rock Paper Scissor game]
« Reply #8 on: October 09, 2018, 09:07:11 PM »
Buttons won't go transparent but, if you must, you can have a transparent picture box with no border, as that would likely fit what you seem to want to do.

Re: [Inform Rock Paper Scissor game]
« Reply #9 on: October 11, 2018, 08:38:10 AM »
@Steve 
thanks for the idea

@Fellippe
thanks for the feedback and the idea to get a invisible item that responds to clickevent

Re: [Inform Rock Paper Scissor game]
« Reply #10 on: November 01, 2018, 01:59:32 PM »
Good Halloween  spent!

Here attached an Halloween version of Rock Paper Scissor.
That original not the pentaversion :-)


Re: [Inform Rock Paper Scissor game]
« Reply #11 on: Yesterday at 02:10:22 PM »
Hi
I cannot believe to my eyes

there is an history behind Rock Paper Scissor Spock Lizard....
https://it.wikipedia.org/wiki/Morra_cinese#La_variante_con_Lizard_e_Spock

Great!

Offline Pete

  • Cuz I sez so, varmint!
Re: [Inform Rock Paper Scissor game]
« Reply #12 on: Yesterday at 03:22:24 PM »
Yeah, I hope you didn't think I made it up. The first time I saw the game was on an American TV comedy series, The Big Bang Theory.

https://www.youtube.com/watch?v=x5Q6-wMx-K8

Pete