• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

events not always processed in correct order

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    #11
    Originally posted by NotAllThere View Post

    Are the players using a single smartphone between them? If that's the case, I can't understand how you'd be able to get a noticeable discrepancy. The code is running on the phone. Maybe you need to upgrade your phone.
    If the webpage was hosted on the phone, yes. But not so sure if it's on a remote internet site. Any network latency would certainly explain discrepancies, especially over slower mobile internet.

    I opened http://topffl.co.uk/fiona/buzzer.html in my browser, and then switched off my router. When I press the button, I get a "no internet" error. That suggests there's communication taking place with the remote server.
    Last edited by woody1; 3 July 2024, 10:20.

    Comment


      #12
      This is great. You should release it on an app and call it Contractor Cash Generator. I just spent an hour playing this and earned 100's of pounds.

      I found it a bit complex at first but great fun when I got the hang of it.
      'CUK forum personality of 2011 - Winner - Yes really!!!!

      Comment


        #13
        Originally posted by woody1 View Post

        If the webpage was hosted on the phone, yes. But not so sure if it's on a remote internet site. Any network latency would certainly explain discrepancies, especially over slower mobile internet.

        I opened http://topffl.co.uk/fiona/buzzer.html in my browser, and then switched off my router. When I press the button, I get a "no internet" error. That suggests there's communication taking place with the remote server.
        Yeah it redirects - I needed to stop it processing further messages - originally I had it on the same page but would sometimes get the first then second message. But the code is dead simple. I think it is better now that I added the 'clicked' check, but still not perfect.

        Thanks all - probably gonna be more hassle than it's worth.

        NLUK - happy to take 10%

        Comment


          #14
          Originally posted by mudskipper View Post

          Yeah it redirects - I needed to stop it processing further messages - originally I had it on the same page but would sometimes get the first then second message. But the code is dead simple. I think it is better now that I added the 'clicked' check, but still not perfect.
          I tried saving the page to my machine, as a "complete webpage", and running it locally, but the page didn't work.

          If you could get it to run on the phone/tablet, with the network disabled, then it might solve the problem.
          Last edited by woody1; 3 July 2024, 11:00.

          Comment


            #15
            OK, I got it to work locally on my laptop, as follows:

            (NB. this was with Opera; other browsers may be different)

            1. Created a folder TEMP on the desktop
            2. Opened http://topffl.co.uk/fiona/buzzer.html
            3. Saved "complete webpage" in TEMP as buzzer (.html)
            4. Pressed Player 1
            5. Saved "complete webpage" in TEMP as player1 (.html)
            6. Pressed Reset
            7. Pressed Player 2
            8. Saved "complete webpage" in TEMP as player2 (.html)

            Now, if I go to TEMP, and double-click buzzer, it runs with the network disconnected.
            Last edited by woody1; 3 July 2024, 11:47.

            Comment


              #16
              Originally posted by mudskipper View Post

              Yeah this is the scenario I need to address - with the top countdown players most conundrum solves are pretty much instant. Thanks for checking!
              To be exact, the scenario you need to address is that the VAR can't ever see the difference. It's always going to be possible for the "wrong" person to get it - even if you need ultra-high speed video cameras to spot it!

              My son adds these comments:


              A better solution to using the clean would be to use timestamps + IDs, so you know the time when each person buzzed.

              Even better: The click function should know nothing of the state of the buzzer. That should be handled by a separate class. The 'clicked' function informs the game of the click and the game handles what to do with it.
              woody1 Thanks for the explanation.
              Down with racism. Long live miscegenation!

              Comment


                #17
                Originally posted by NotAllThere View Post

                To be exact, the scenario you need to address is that the VAR can't ever see the difference. It's always going to be possible for the "wrong" person to get it - even if you need ultra-high speed video cameras to spot it!

                My son adds these comments:




                woody1 Thanks for the explanation.
                Which was my suggestion in post 2 - record the timestamps and use that to display who won.
                merely at clientco for the entertainment

                Comment


                  #18
                  actually I think it's good enough now - back to one page but the 'clicked' variable seems to do the trick to stop it processing the other click - will do some testing. Thanks all!

                  Comment


                    #19
                    Originally posted by eek View Post

                    Which was my suggestion in post 2 - record the timestamps and use that to display who won.
                    you're so smart, well done you

                    Comment


                      #20
                      Originally posted by eek View Post

                      Which was my suggestion in post 2 - record the timestamps and use that to display who won.
                      Yes. I know. I was just giving complete information.
                      Down with racism. Long live miscegenation!

                      Comment

                      Working...
                      X