|
|
|
|
|
by forrestbthomas
4270 days ago
|
|
Thanks so much for the interest and the questions. You are correct in that the web-workers repo is related. Its the repo we use on the back end. To answer your questions in turn:
"How are you isolating the brains from the sensitive game data and from each other?"
- We are sandboxing each user's code in an isolated environment where a server listens for a POST request on a specified endpoint. That request carries the game data with it and after the user's code runs, the server sends back the result of that function, which is supposed to be a string (North, East, South, West, or Stay). The game data itself is update on our server, after receiving the response.
"How long does a single game take to run given max users?" The games will take a maximum of 24 users, which will take a maximum of 30 minutes to run, if every user does something like "while(true)." Each server has a max-timeout setting of around 2 seconds.
I hope that answers your questions and please feel free to offer any feedback.
Thanks again! |
|
No matter how many turns are played, a match ends after 30 minutes? According to the rules, no team wins in this case?
[0] http://www.hacker.org/bitbath/