timotheeg / nestrischamps

A web-based OCR and restreamer system for NES Classic Tetris players
MIT License
45 stars 11 forks source link

Suppress sending data at high score screen #175

Open Javantea opened 2 months ago

Javantea commented 2 months ago

Looking at the traffic while the player is sitting at the high score screen, I notice a lot of data. By using the binary=0 flag, I am able to see the JSON version of the data that is being sent. It's sending information that can be suppressed to save some bandwidth and processing. This seems like it would have some benefit to players and those trying to debug.

{"gameid":21167,"lines":null,"level":null,"preview":null,
"field":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
"score":null,"T":null,"J":null,"Z":null,"O":null,"S":null,"L":null,"I":null,
"game_type":1,"ctime":12446}