geerlingguy / beast-challenge

A control system for MrBeast's 1-100 challenge
GNU General Public License v3.0
26 stars 1 forks source link

Separate 'Game Mode' - Push the button to survive #20

Closed geerlingguy closed 1 year ago

geerlingguy commented 1 year ago

UPDATE: Here are the requirements:

geerlingguy commented 1 year ago

Making some headway on this:

Screen Shot 2023-03-08 at 4 08 23 PM

Have to get all timey-wimey and use some javascript wizardry to keep that countdown fresh though.

Gonna be a little rough doing it all real time :/

geerlingguy commented 1 year ago

Disabling the button game on the production servers for now (one less thing to keep running).

geerlingguy commented 1 year ago

At this point, very likely not gonna happen before go-live.

geerlingguy commented 1 year ago

And at this point, very likely to happen after go-live. Need to gather some requirements.

geerlingguy commented 1 year ago

New frontend for timer countdown bit, at least...

Screen Shot 2023-03-21 at 3 37 09 PM
geerlingguy commented 1 year ago

Just did a load test with the whole thing running, and got at least 1000 votes per second throughput with the frontend updating every second:

  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     2.18ms    4.07ms  60.89ms   93.96%
    Req/Sec   711.21    130.47     1.07k    71.00%
  Latency Distribution
     50%    0.93ms
     75%    2.17ms
     90%    4.49ms
     99%   20.83ms
  7088 requests in 5.01s, 1.49MB read
  Non-2xx or 3xx responses: 4070
Requests/sec:   1415.13
Transfer/sec:    305.36KB

And I also traverse the dom like a madman to get all the classes set correctly via Javascript (and otherwise, the page refreshes and shows the latest data if JS is broken):

image

geerlingguy commented 1 year ago

I've also added a 'force reset timer' functionality that turns a room 'on' again and saves a vote so you can see it's back active. This should be helpful for debugging, and for the case where someone's buttons just stop working, for whatever reason. They could kinda 'pause' the game for that room.

Screen Shot 2023-03-22 at 1 42 03 PM

I don't have any other pause functionality, though. The game will continue pretty much forever, until all rooms are counted down to 0.

geerlingguy commented 1 year ago

I added functionality to force reset ALL live room's timers:

Screen Shot 2023-03-22 at 3 41 22 PM