Closed balthazar closed 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
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?
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!
Yes the serialization part is good, didn't acknowledged that I apologize.
This way we could see the replay of previous races of any users, reducing cheat possibilites.