WilsonCWu / battlegame

init
0 stars 0 forks source link

game verification #1547

Open WilsonCWu opened 2 years ago

WilsonCWu commented 2 years ago

@Daniel-Wang should have better details on this for the server side of things:

now that we have bot sims, lets set it up to verify and mark games as legit or not for quickplay. we need to be able to flag games, and raise alerts for MANUAL banning (automated later, when we;re sure it works). for now, we should only sim reported, and not verified games.

lets operate under the assumption that the python server will have an instance of the game to communicate with.

this flow should end with: easy way to see players thatare being reported a lot, and be able to generate data about them (num unique reports, num mismatched games, etc)

misc request: also make sure the thing doesnt take down the server if the request hangs or the sim server isnt even up, i noticed when testing that sometimes the request would fail for whatever reason, and it would hang indefinitely. python's requests.get(url) has no timeout if not set. I think the unity side might need not be sending a response if sim fails? have not tested in detail.

WilsonCWu commented 2 years ago

secondary part of this: can we make it run as a more often cron, and can we make sure it wont kill the server's performance? simulating games on the server is going to be pretty expensive (~20-30ms of hogging up a core per game, assuming its performance is similar to my computer)

WilsonCWu commented 2 years ago

you can test with unity editor for now, we;ll eventually be deploying this as a linux built version of the game, or if that fails, a small, seperate windows box

shaunlazaro commented 2 years ago

while working on this, I started by trying to test using a headless linux build, but I wasn't able to actually run the game with desktop (win/mac/linux) as the target due to some error with missing firebase files on launch. After resolving enough errors for the game to actually launch though, a linux build with the only difference from master being InitMainMenu.ClientListenMode=true should work as the sim server. Note that the option for headless is now called "server build" in the build options.

Daniel-Wang commented 2 years ago

oh yeah, for firebase issues need to put another ifdef flag for linux platform, we removed the linux firebase files which aren't used and exceed git's max file size limit LOL

WilsonCWu commented 2 years ago

how hacky were the error resolutions? is it unhacky enough that it's commitable?

shaunlazaro commented 2 years ago

oh I didn't actually fix the errors, I was just saying that it'd probably work after fixing them

Daniel-Wang commented 2 years ago

lemme try to push a fix for it, and maybe you can double check it works for you @shaunlazaro, i'll lyk