SIGSEV / KeyCode

:keyboard: Improve your coding speed, like a god.
https://keycode.sigsev.io
6 stars 2 forks source link

Record every keystroke with timestamp #16

Closed balthazar closed 6 years ago

balthazar commented 6 years ago

This way we could see the replay of previous races of any users, reducing cheat possibilites.

meriadec commented 6 years ago

sounds good! also, we should think about a "compressed" way to store them. first, instead of unix timestamps we can start at 0, and store all that in a string. e.g:

0|k 120|e 144|y 210|c 251|o 312|d 400|e

and we need to think about how to store Enter and Space

balthazar commented 6 years ago

What I had to change for mongoose to be able to save . and $ for the valid and wrong keys is to use the char code rather than the real char, maybe we can use something similar, and stock the.... KEYCODE!!? Or would that wouldn't work with different layouts?

meriadec commented 6 years ago

Using keycodes (lel) will solve the problem, yep! But I think it's still better to store that serialized in a string rather than in some complex/big object. It could be deserialized easily client side to do some replays!

balthazar commented 6 years ago

Yes the serialization part is good, didn't acknowledged that I apologize.