CodinGame / codingame-game-engine

CodinGame Engine
https://www.codingame.com
MIT License
112 stars 41 forks source link

reduce replay size when using the ToggleModule #32

Closed eulerscheZahl closed 4 years ago

eulerscheZahl commented 4 years ago

Right now the ToggleModule increases the replay size a lot when creating a debug view, e.g. \"toggles\":[{\"2\":{\"name\":\"d\",\"state\":false},\"3\":{\"name\":\"d\",\"state\":true},\"4\":{\"name\":\"d\",\"state\":false},\"9\":{\"name\":\"d\",\"state\":true},\"10\":{\"name\":\"d\",\"state\":false},\"13\":{\"name\":\"d\",\"state\":true},\"14\":{\"name\":\"d\",\"state\":false}}] This pull request stores the same information more efficiently: \"toggles\":{\"d\":\"2-3+4-9+10-13+14-\"}