siggame / Viseur

Visualizer for the Cadre AI game framework
http://vis.siggame.io
MIT License
5 stars 9 forks source link

Ignore deltas without animations #25

Open KendallHarter opened 7 years ago

KendallHarter commented 7 years ago

Currently, all deltas are "played" even if there is no animation width the delta. This greatly slows down the rate of playback, particularly if a client generates many errors.

These deltas should never update relevant game structures because if an animation isn't played generally only back-end stuff will be updated. It may still be better to supply an option to play them / only play them if an option is selected and the inspect tab is open.

JacobFischer commented 7 years ago

I think this is a great idea.

You are correct, the gamelog will contain deltas that store the invalid action the player did. For fast playback if they did hundreds of invalid actions it will "animate" nothing quite alot. Though using the inspect tab would tell them precisely when and why they got the invalid.

So here's my proposal:

We add a general setting Skip Invalids, where then we go to the next delta, if it is just an invalid message delta, skip it and go to the next. continue this until you hit an non-invalid delta or the end.

My upcoming turn-by-turn enhancement will also help, but even then it would try to "compress" the invalid deltas.